How to install XFCE GUI on Alpine Linux

Learn the steps in this tutorial to install Graphical User Interface (GUI) XFCE Desktop on Alpine Linux using 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.

Requirements:

  • 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 Alpine Update command

Go to your Alpine Linux terminal and run the system update command that will refresh the repositories cache.

apk update

 

Add 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.

adduser username

Note: Replace “username” with the one you want to use.

 

Install 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:

setup-xorg-base

 

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.

Installing XFCE4 on Alpine Linux

 

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.

Start dbus

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, enter the password you have set for the created system user.

XFCE graphical user interface on Alpine Linux

 

 

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.