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

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

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

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.

apk add xfce4 xfce4-terminal xfce4-screensaver lightdm-gtk-greeter
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, and enter the password you have set for the created system user.

XFCE graphical user interface on Alpine Linux

Other Articles:

How to install MongoDB Server on Alpine Linux
How to install CURL on Alpine Linux
How to install Docker Engine on Alpine Linux

2 thoughts on “How to install XFCE GUI on Alpine Linux”

  1. hi, i am on a mission to speed test my emulated machine. I am running alpine-linux-x86_64 emulated under qemu on a raspberry -pi-4. I followed the instructions, was able to install all the packages and did not get any error message. But when i start lightdm the gui interface is not showing. Any help will be appreciated.

    Reply

Leave a Comment

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