How to Install XFCE on Ubuntu 22.04?


Desktop Environments enhance the overall aesthetics of the system. Ubuntu comes by default with the GNOME which is quite user-friendly and has an interactive look as well. However, Ubuntu supports other Desktop Environments that can be installed as per the user’s requirement/likeness.

This post will address the potential approaches to install the XFCE on Ubuntu 22.04. XFCE is the default desktop environment of Xubuntu (a renowned Ubuntu-based distribution). XFCE offers all the basic to advanced features, i.e., customization, window management, taskbar/dock panel, accessibility, etc.

How to Install XFCE on Ubuntu 22.04?

Ubuntu offers two different ways to install the XFCE on Ubuntu 22.04, i.e., apt and the tasksel. The tasksel contains the set of tasks (including XFCE) to install that tool via TUI (Text User Interface) and CLI. Whereas the apt allows only the CLI support for installation. Let’s discuss both one by one:

Using apt

The apt fetches the XFCE package from the default repositories/core libraries of the system. Moreover, the XFCE support can also be availed via the “xubuntu-desktop” package. The simple XFCE4 package actually is attached to your Ubuntu whereas some of the core features remain the same, i.e., terminal. If you install the “xubuntu-desktop”, you will get the overall functionality of the XFCE as well as the Xubuntu. The commands to install different variants of XFCE are listed one by one, here:

First, update the core libraries of your Ubuntu via the command:

sudo apt update

Now, install the XFCE using one of the following commands:

For a Basic XFCE (Includes Only Basic Features):

sudo apt install xfce4

For a Feature Enriched XFCE (Inclusive of Some Additional Features):

sudo apt install xfce4 xfce4-goodies

Now, reboot/log out of your system. At the time of logging in, you have two options as per your Display Manager:

For gdm3 (GNOME Display Manager):

Navigate to the “Grear” icon and switch your desktop to the “XFCE”:

For lightdm:

You will find the gear icon at the top of the screen, click on it and you will get the list of installed/available Desktop Environments:

Here you go with XFCE support!

Important: Want to configure/change the display manager (login manager)? Follow This Section.

Using the tasksel

Tasksel is a TUI and CLI-based task manager to install various desktop environments (and other available tools) on Ubuntu (and other Debian-based distros). Tasksel treats the tools as a whole task (set of packages).

Let’s install XFCE using tasksel:

Prerequisites: Install tasksel on Ubuntu

Tasksel is not available in Ubuntu by default. First, update the repositories list:

sudo apt update

And now install the tasksel manager:

sudo apt install tasksel

Now, you have two options, either go for pure command line installation or a TUI. Let’s discuss both and then you can choose as per your likeness:

For CLI:

First, list the tasks of the tasksel using the command:

tasksel --list-tasks

The “u” written before the task name shows the tool is uninstalled (not installed on the system). Similarly, the “i” means the task is installed on the system.

The XFCE package name is “xfce-desktop”. Install the package via the command below:

sudo tasksel install xfce-desktop

Soon after execution of the command, the installation will be started, as shown below:

Before switching, let’s confirm the installation of the XFCE via the “tasksel –list-tasks” command:

The “i” in front of the XFCE shows it is now installed on the system.

If you want to switch to XFCE, you need to reboot/log out and then change the DE from the “Gear” icon placed at the bottom of the login screen.

Tip: Install a Tasksel’s Task Via the apt

Interestingly, you can install the XFCE task (named xfce-desktop) with the help of apt as well:

sudo apt install task-xfce-desktop

This command does not require the installation of tasksel.

For TUI:

Use the command to invoke the TUI of tasksel:

sudo tasksel

The list of tasks available at the tasksel is listed. Select the XFCE and choose OK:

Soon the installation will be completed, and you can get into your XFCE from the login screen.

Important: If you want to change the display manager (alongside the XFCE), Follow the Section.

Using Synaptic Package Manager | GUI Based

Synaptic package manager is the GUI utility to handle the apt-based packages (or tasks). It is noticed here that you can install all the packages (either xfce4, xfce4-goodies, or xfce-desktop) using the synaptic package manager. Let’s do it:

Install Synaptic Support

Synaptic comes by default with the complete installation of Ubuntu 22.04. However, if you haven’t it, you can install it using the command:

sudo apt install synaptic

Launch it using the command:

sudo synaptic

Search for the exact package name, i.e., (xfce4, xfce4-goodies, task-xfce-desktop):

Scroll down to the package, and click on it to mark it for installation:

The next window contains the set of dependencies/packages that will be installed with the “xfce4” package:

Once marked, click on the “Apply” button:

Follow the onscreen instructions to get it installed.

Once installed, you can switch to the XFCE Desktop Environment from the login screen (after logging out or rebooting).

Important: Follow the Section to configure Display Manager for your XFCE.

How to Change the Display Manager on Ubuntu 22.04?

Display Managers are responsible for the interface that you get at the time of logging in. There are two display managers, used frequently, lightdm and gdm3. Lightdm is lightweight as compared to gdm3 and thus recommended.

To change the display manager. you just have to ask your system to reconfigure my display manager via any of the commands below:

sudo dpkg-reconfigure gdm3

sudo dpkg-reconfigure lightdm

The following prompt appears, choose “OK” to proceed further:

Choose the one that you want to, and then select “OK” to confirm (we have selected lightdm):

When you login/restart, the login screen will be like this:

You can revert to “gdm3” or “lightdm” at any time.

How to Change Your Ubuntu to Xubuntu?

As discussed, XFCE is the default desktop environment of Xubuntu. However, if you install the XFCE package, you won’t acquire the overall functionality of Xubuntu. For that, you must install the “xubuntu-desktop”. Here, we will discuss how you can completely switch to Xubuntu:

First, install the xubuntu-desktop:

sudo apt install xubuntu-desktop

If you look at the packages (to be installed), you will probably know the difference between the features and size of the package (as compared to the xfce or xfce-goodies).

Once the installation is finished, reboot your system and you will see that the Xubuntu starts loading:

Change the display to the “XFCE Session” on the login screen:

And here you go with the complete Xubuntu-desktop package:

How to Uninstall XFCE From Ubuntu 22.04?

The XFCE needs to be removed from where you have installed it. There were two methods, i.e., apt and tasksel. Both methods follow different commands to remove XFCE. Let’s see how:

Remove XFCE | Installed Through apt

Use the following “autoremove” command to uninstall XFCE and the associated dependencies:

sudo apt autoremove xfce4 xfce4-goodies

The command will remove both the basic and the advanced XFCE versions installed.

Remove xubuntu-desktop

If you have installed the “xubuntu-desktop”, you can remove it using the command:

sudo apt autoremove xubuntu-desktop

Switch back to your GNOME or any other Desktop Environment from the login screen.

Remove XFCE | Installed Through tasksel

The tasksel allows you to remove the tasks using the command:

sudo tasksel remove xfce-desktop

The command will only remove the XFCE task that was installed using the tasksel (as a task).

 

Note: If you want to remove the XFCE from the TUI support of tasksel, use the “sudo tasksel” command and just uncheck the “XFCE” and then click on “OK”.

Remove XFCE | Installed Through Synaptic Package Manager

If you want to remove the XFCE installed via the synaptic package manager. Open the synaptic manager from the applications menu or the command (“sudo synaptic”). Search the package you want to remove, i.e., xfce4:

Click on the package and then mark it for complete removal:

Apply the changes:

Soon, the package will be removed from the system.

That’s how you can deal with XFCE on Ubuntu 22.04.

Bottom Line

Like GNOME for Ubuntu, XFCE is for Xubuntu. However, XFCE can be installed easily on Ubuntu. If you want to get it on Ubuntu, use the apt or the tasksel. XFCE offers some common and distinct features when compared with Ubuntu’s GNOME.

Additionally, with the one-liner command, you can turn your Ubuntu to Xubuntu and keep using the XFCE. This post has listed all the installation methods of XFCE.

 

Print Friendly, PDF & Email
Categories