Linux how to install gui

Run Linux GUI apps on the Windows Subsystem for Linux (preview)

You can now preview Windows Subsystem for Linux (WSL) support for running Linux GUI applications (X11 and Wayland) on Windows in a fully integrated desktop experience.

WSL 2 enables Linux GUI applications to feel native and natural to use on Windows.

  • Launch Linux apps from the Windows Start menu
  • Pin Linux apps to the Windows task bar
  • Use alt-tab to switch between Linux and Windows apps
  • Cut + Paste across Windows and Linux apps

You can now integrate both Windows and Linux applications into your workflow for a seamless desktop experience.

Install support for Linux GUI apps

Prerequisites

You will need to be on Windows 11 Build 22000 or higher to access this feature. You can join the Windows Insiders Program to get the latest preview builds.

Installed driver for vGPU

To run Linux GUI apps, you should first install the preview driver matching your system below. This will enable you to use a virtual GPU (vGPU) so you can benefit from hardware accelerated OpenGL rendering.

Fresh install — No prior WSL installation

If you have not already done so, install WSL and set up a user name and password for your Linux distribution.

Open a command prompt with administrator privileges.

Select Start, type PowerShell, right-click Windows PowerShell, and then select Run as administrator.

Run this command and reboot your machine when prompted:

Once your machine has finished rebooting, installation will continue and you will be asked to enter a username and password. This will be your Linux credential for the Ubuntu distribution.

You’re now ready to begin using Linux GUI apps on WSL!

Existing WSL install

If you already have WSL installed on your machine, you can update to the latest version that includes Linux GUI support by running the update command from an elevated command prompt.

Select Start, type PowerShell, right-click Windows PowerShell, and then select Run as administrator.

Enter the WSL update command:

You will need to restart WSL for the update to take effect. You can restart WSL by running the shutdown command in PowerShell.

Linux GUI apps are only supported with WSL 2 and will not work with a Linux distribution configured for WSL 1. Read about how to change your distribution from WSL 1 to WSL 2.

Run Linux GUI apps

You can run the following commands from your Linux terminal to download and install these popular Linux applications. If you are using a different distribution than Ubuntu, it may use a different package manager than apt. Once the Linux application is installed, you can find it in your Start menu under the distribution name. For example: Ubuntu -> Microsoft Edge .

Update the packages in your distribution

Install Gedit

Gedit is the default text editor of the GNOME desktop environment.

To launch your bashrc file in the editor, enter: gedit

Install GIMP

GIMP is a free and open-source raster graphics editor used for image manipulation and image editing, free-form drawing, transcoding between different image file formats, and more specialized tasks.

To launch, enter: gimp

Install Nautilus

Nautilus, also known as GNOME Files, is the file manager for the GNOME desktop. (Similiar to Windows File Explorer).

To launch, enter: nautilus

Install VLC

VLC is a free and open source cross-platform multimedia player and framework that plays most multimedia files.

To launch, enter: vlc

Install X11 apps

X11 is the Linux windowing system and this is a miscellaneous collection of apps and tools that ship with it, such as the xclock, xcalc calculator, xclipboard for cut and paste, xev for event testing, etc. See the x.org docs for more info.

To launch, enter the name of the tool you would like to use. For example:

Install Google Chrome for Linux

To install the Google Chrome for Linux:

  1. Change directories into the temp folder: cd /tmp
  2. Use wget to download it: sudo wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
  3. Get the current stable version: sudo dpkg -i google-chrome-stable_current_amd64.deb
  4. Fix the package: sudo apt install —fix-broken -y
  5. Configure the package: sudo dpkg -i google-chrome-stable_current_amd64.deb
Читайте также:  Windows loader notification status что это

To launch, enter: google-chrome

Install Microsoft Teams for Linux

To install Microsoft Teams for Linux:

  1. Change directories into the temp folder: cd /tmp
  2. Use curl to download the package: sudo curl -L -o «./teams.deb» «https://teams.microsoft.com/downloads/desktopurl?env=production&plat=linux&arch=x64&download=true&linuxArchiveType=deb»
  3. Use apt to install it: sudo apt install ./teams.deb -y

To launch, enter: teams

Install Microsoft Edge browser for Linux

Find information on how to install the Microsoft Edge browser for Linux using the command line on the Edge Insider site. Select Get instructions under the Command line installation section of the page.

Источник

How to install a Desktop Environment (GUI) on Ubuntu Server

Do you want to install GUI on your Ubuntu server? You can totally do that in most scenarios and I am going to discuss the steps in details in this tutorial.

But before you see that, let me tell you why the server edition does not come with GUI and in which cases you could install the GUI on your server.

Why does Ubuntu server not have a GUI?

If you compare Ubuntu desktop with server, the main difference will be the absence of GUI, i.e. the desktop environment in the server edition. Ubuntu Server is basically a striped down version of Ubuntu desktop without the graphical modules.

This is intentional. A Linux server intends to use the system resources on running services. The graphical desktop environment consumes a lot of system resources and for this reason, the server operating systems do not include a desktop environment by default.

You may use an Ubuntu server on 512 MB of RAM but an Ubuntu desktop will need at least 2 GB of RAM to function decently. That’s considered a waste of resources in the server world.

As a server user (or sysadmin), you are expected to use and manage your system through command line. You should have decent knowledge of the Linux commands for this purpose.

Do you really need to install GUI on your server?

Some people do not feel comfortable with the idea of doing everything using commands in the terminal. Most people are conditioned to use a computer graphically after all.

You may choose to install a desktop environment on your server and use it graphically. That’s not how most people do it but it’s an option.

But this works only if you have direct access to the server. If you are running it on a physical machine like a server, a desktop/laptop or devices like Raspberry Pi. You may also install it on a server running in a virtual machine if you have direct access to the host system.

If you have a server deployed using a cloud server provider like Linode, DigitalOcean or AWS, installing GUI won’t be a good idea. If you have a remote server that you want to manage graphically, you may use tools like Webmin or Cockpit. These tools allow you to use and manage your servers graphically in a web browser. It consumes a lot less system resources than a full-fledged desktop environment.

How to install GUI on Ubuntu server?

Once the basics are clear, let’s see the steps for installing a desktop environment on an Ubuntu server.

You’ll need the following things:

  • Ubuntu Server configured and running with at least 2 GB of RAM
  • Administrative privileges (you need to run sudo commands)
  • Internet connection (you are going to download and install new packages)

In my case, the Ubuntu server is installed in a virtual machine and I have direct access to the host machine. I have used the same method on an Ubuntu server installed on a Raspberry Pi.

These things are fine for experimental purpose when you are learning and exploring. Please do not add GUI on a production server. Removing GUI afterwards could cause dependency issues and leave a broken system in some cases.

Preparing your system

First, since you are going to make some system-wide modifications, let’s update & upgrade everything to make sure that our system is running the latest packages:

Installing the desktop environment

With the updates out of the way, you can continue with the installation of a desktop environment.

There are two ways to do this:

  • Using apt to install the packages
  • Using a Debian tool called tasksel which helps with the installation of multiple packages in one coordinated process (tasks)

Either one will let you install the full desktop environment you choose as a full package, just like if you were installing the desktop version from scratch. By this, I mean that you will get all the default applications and tools you get with the desktop version.

If you want to use tasksel you must first install it using the following command:

Once this task is finished, you can use tasksel to install the desktop environment (also referred as DE).

Now, you probably know that there are several desktop environments available. You may choose the one you like. Some desktop environments need more system resources (like GNOME) while some use fewer system resources (like Xfce, MATE etc).

Читайте также:  Oracle mysql для windows

It is up to you to decide which DE you would like to use. I am going with the GNOME Desktop since it is the default desktop for Ubuntu. Later on, I’ll share some tips for installing different desktops too.

If you are using tasksel run this command:

if you want to use only apt, then run this command:

Depending on your connection speed and hardware this process will take from a couple of minutes to an hour.

I want to point that both actions will result in the full installation of the GNOME Desktop Environment. I ran both commands for the sake of this tutorial and ended up having the exact same results.

Installing and setting up the display manager

After this process is completed, you will need a component called a Display Manager, also known as a “login manager”. This tool is going to be responsible for starting the display server and loading the desktop while managing user sessions and authentication.

By default, GNOME Desktop uses GDM3 as its display manager, but it is a bit heavy on the resources side. You can use something lighter and more resource-friendly. In this case, let’s go with lightdm, a platform independent display manager. Install it with apt:

When installing lightdm the system is going to ask for a default display manager because only one can run at a time, although you can have several installed.

Just choose lightdm from the list and hit . This shouldn’t take more than a couple of minutes. After this task is done, you can then start the display manager and load the GUI with the following command:

If you want to check what display manager is configured in your system you can run:

and you will get a prompt similar to this:

installing gui ubuntu server default

If everything went according to the plan, you will have a greeting screen loaded.

installing gui ubuntu server gnome desktop greet

Enter your credentials and you will have your desktop running.

GNOME Desktop fully loaded on Ubutnu server

If you want to shutdown the GUI open a terminal window and type:

Installing other desktop environments (optional)

Earlier on I said that we could choose different desktops, so let’s take a look at some alternatives.

MATE is a lightweight desktop based on GNOME2 base code, it’s fully open source and a very nice option.

To install MATE, you would run:

Lubuntu / LXDE/LXQT

Lubuntu is another lightweight option which I recommend if your system is low on resources or if you are giving new life to an older computer. Install it using this command:

Xubuntu / Xfce

Xubuntu is an Ubuntu derivative based on the Xfce desktop environment that is light, simple, stable, but it’s also highly customizable. If you want to try it, use the following command:

I’m leaving some other desktops out, like KDE, Cinnamon, and Budgie, not for anything wrong, they are all excellent desktops too and you are free to install them as you want.

How to remove the GUI from Ubuntu server?

If you realize that the desktop environment is taking too much computing resources, you may remove the packages you installed previously.

Please keep in mind that it may cause dependency issues in some cases so please make a backup of your important data or create a system snapshot.

Reboot your system now. You should be back to the normal command line login.

Wrapping up

Installing a GUI for a desktop is possible but not needed in most scenarios. If you are not too comfortable with the command line, use a server distribution like YunoHost that is built on top of Debian to give you a server that can be managed via GUI.

That said, if you are installing a system from scratch, then I’d recommend that you go with a desktop version and avoid the extra steps afterwards.

With this information, I leave the comment section to you. Do you use GUI on a server? Did you face any issues in following this tutorial?

Like what you read? Please share it with others.

Filed Under: Server Tagged With: Ubuntu

About Chris Patrick Carias Stas

Chris is an old-school techie, Linux and FOSS advocate, avid reader and a teacher by vocation. He is usually found deep into books, playing TTRPGs or having fun with his many pets.

I’m a seasoned Linux/Unix user,
and I would say sometimes you do feel convenient if your server had a GUI interface.

I still don’t understand what tasksel gives you more (or less) than apt…

Just followed your instruction on my win 11 after many failures from others.. GUI work finally. appreciate your blogs

I’m really conflicted when it comes to this article.
First, on one hand, you state “Most people are conditioned to use a computer graphically after all”. Let’s get this straight, most people don’t run servers. Then you actually give a shoutout to proper server administration software like Webmin and Cockpit. Why not make an article on those instead? It’s actually going to help people manage their servers.

Читайте также:  Как удаленно сменить пароль администратора windows

Second, what exactly are you going to manage from a GUI on your server? Installing a desktop doesn’t give you the tools to manage httpd, nginx, php or whatever it is you’re *serving* from that server. You’re basically turning it into a poor man’s desktop that can barely crawl, since you most likely have no GPU that can run the 3d compositors used in all modern desktop environments. And even if you find the GUI tools for managing those services (as I’m sure there are many), how do you think average Joe is going to find them, when you’re not listing them here?

Third, `autoremove` does not remove installed packages via recommendations, so you’ll be left with a bunch of stuff laying around. You need additional apt options to do that, and then there’s the danger of breaking your system because ubuntu-desktop’s recommendations go back to `sudo` and removing that will lock you out of your system. It’s definitely not as straightforward as you think.

Finally, the wrap up statement, “That said, if you are installing a system from scratch, then I’d recommend that you go with a desktop version and avoid the extra steps afterwards”. We’re talking about servers, right? That’s what the title is, after all. So why would you install a DE on a server in the first place?

“First, on one hand, you state “Most people are conditioned to use a computer graphically after all”. Let’s get this straight, most people don’t run servers. Then you actually give a shoutout to proper server administration software like Webmin and Cockpit. Why not make an article on those instead? It’s actually going to help people manage their servers.”

Webmin and Cockpit both are referenced to articles that show how to install and use them. I cannot include those steps here and make the article 7,000 words long and lose focus on the main goal of this topic.

“Second, what exactly are you going to manage from a GUI on your server? Installing a desktop doesn’t give you the tools to manage httpd, nginx, php or whatever it is you’re *serving* from that server. You’re basically turning it into a poor man’s desktop that can barely crawl, since you most likely have no GPU that can run the 3d compositors used in all modern desktop environments. And even if you find the GUI tools for managing those services (as I’m sure there are many), how do you think average Joe is going to find them, when you’re not listing them here?”

You do realize that not everyone runs a home server on 512 MB RAM. Some people use spare 8 GB system for hosting DIY setup or home server or lab setup.

“Third, `autoremove` does not remove installed packages via recommendations, so you’ll be left with a bunch of stuff laying around. You need additional apt options to do that, and then there’s the danger of breaking your system because ubuntu-desktop’s recommendations go back to `sudo` and removing that will lock you out of your system. It’s definitely not as straightforward as you think.”

Article never claimed that autoremove will remove installed packages. It removes the packages that were installed as a dependency of some other package which has been removed.

“Finally, the wrap up statement, “That said, if you are installing a system from scratch, then I’d recommend that you go with a desktop version and avoid the extra steps afterwards”. We’re talking about servers, right? That’s what the title is, after all. So why would you install a DE on a server in the first place?”

That statement is again for those people who installed Ubuntu server edition because they were supposed to use it in a server setup for their home/lab/DIY setup. If someone installs a fresh Ubuntu server and then installs a GUI on it, perhaps using Ubuntu desktop won’t be that bad an idea because at the end, most setups can be used on desktop Linux as well.

“We’re talking about servers, right? That’s what the title is, after all. So why would you install a DE on a server in the first place?”

If you are so convinced that DE should not be installed on a server, why bother with this article? Just ignore it. Let it be for people who really really want a GUI on there Ubuntu server edition.

I have installed lubuntu using your instructions on DigitalOcean droplet but I am not able to view the desktop once I RDP it from my machine. What I am missing here please let me know.

Источник

Оцените статью