Learn the steps in this tutorial to install Graphical User Interface (GUI) XFCE Desktop on Alpine Linux using the command terminal.
Alpine Linux is popular for its lightweight, security, and performance. And that is the reason it comes out of the box with a command-line interface. However, if you want then we can install a graphical user interface on Alpine to use it as a normal Dekstop operating system. And here we learn how to do that by installing the XFCE Linux desktop environment on it.
- Installed Alpine Linux
- root user rights
- Internet connection
- Access to Terminal
Steps to install XFCE GUI Desktop on Alpine Linux
Here we are using Alpine 3.14, however, you can follow the given command in older or latest versions.
Run the Alpine Update command
Go to your Alpine Linux terminal and run the system update command that will refresh the repositories cache. However, make sure to log in as the root user.
By default, the Alpine Linux installation will be running using the root user. Hence, create a standard one-to-login graphical user interface, later.
Note: Replace “username” with the one you want to use.
Install the graphical environment basic Xorg package
Before installing any Window manager, let’s first install the Xorg, an X Window System display server that provides an interface between hardware and the graphical software, we want to use on Linux. It is an open-source implementation. Simply run:
Install XFCE on Alpine Linux
Once the installation of Xorg is completed, we can install different available desktop environments such as KDE, LXDE, XFCE, MATE, and others. Here we install, the popular and easy-to-use XFCE.
apk add xfce4 xfce4-terminal xfce4-screensaver lightdm-gtk-greeter
Starting dbus (desktop bus) service
The service allows the system to communicate with multiple processes running simultaneously. Hence, we need to enable it to run the Graphical desktop properly.
rc-service dbus start
Enable to start automatically with system boot:
rc-update add dbus
Enable and start Display Manager
Let’s first make the display manager start automatically with system boot. This is very important otherwise, on every boot the user has to start the graphical user interface manually.
rc-update add lightdm
Now, start a Display manager
rc-service lightdm start
Login to XFCE Graphical user interface
Now, you will see the login interface, and enter the password you have set for the created system user.