Adding a GUI (Graphical User Interface) to our Alpine Linux virtual machine installation.
Xfce desktop environment

Adding a GUI (Graphical User Interface) to our Alpine Linux virtual machine installation.

Welcome back to yet another tutorial from our Alpine Linux series. Today we are going to add a GUI (Graphical User Interface) to our Alpine Linux virtual machine installation. 

 We need to enable all necessary Linux Software Package repositories.

 Step 1. Power on the virtual machine from the Oracle VM Virtual Box Manager.

 Step 2. Log in using the account we created on our previous tutorial session. 

Log in to Alpine Linux
Log in to Alpine Linux

Step 3. We need to edit the configuration file found at /etc/apk/repositories.

 In order to do this we need to change back to the root user by executing the command ‘su root’.

 Step 4. Then we use the text editor vi to edit the configuration file by running the command ‘vi /etc/apk/repositories’.

Using the text editor vi to edit the Repositories
Using the text editor vi to edit the Repositories

Step 5. We delete the character ‘#‘ in front of each line for the repositories we want to enable.

 Step 6. Enable all of them by deleting the character ‘#‘ in front of each line.

Enable all repositories
Enable all repositories

Step 7. Save the changes made to the configuration file /etc/apk/repositories by using the vi command ‘:wq‘.

 Step 8. Update the repositories information by running the command ‘apk update’. This will enable our Linux Alpine installation to read the list of available software packages from all these newly enabled repositories and determine if any updates are available as well.

Running apk update command
Running apk update command

Now we are ready to begin the installation of the graphical user interface. We are going to install the X Server known as Xorg. This will add graphical capabilities to our system.

 It is, essentially, an X Windows System (WIMP=windows, icons, menus, pointer).

 Step 9. In order to do this, we shall run the command ‘setup-xorg-base’

Running setup-xorg-base
Running setup-xorg-base

Now we have the X Server installed. We could try to set it up to run a very basic graphical mode or try to add a desktop environment. 

 Step 10. We are going to use the xfce desktop environment. First we run the command ‘setup-desktop’.

Running setup-desktop
Running setup-desktop
Installing xfce desktop environment
Installing xfce desktop environment

Step 11. We also enable an extra feature to ensure proper stability and functionality of our Alpine Linux system by running the command ‘rc-update add dbus’.

Step 12. Now we can reboot to finalize the installation process of our newly added graphical interface.

 And we should be greeted with a beautiful graphical login interface.

GUI X Server is Running
GUI X Server is Running

That concludes our tutorial session for today. See you next time! #linux

Using Alpine v3.20.x (Xen iso), there seems to be some additional packages and configuration for xcfe desktop. With a combination of this article and a few others, I was able to sort out why I was getting only a flashing cursor at boot, via XenCenter/XCP-ng Center/XOA by using SSH and adding the additional packages listed here: https://wiki.alpinelinux.org/wiki/Xfce This guide for Alpine v3.17.x does fill in the missing gaps for the needed apk repositories not included in the "official alpinelinux.org" linked guide 🙏 This guide was also insightful for adding a non-root user and permissions (sudo): https://breder.org/alpine-setup

To view or add a comment, sign in

More articles by Razvan Alexandru Ionica

  • Updating Rocky Linux 9.4 packages

    Rocky Linux was founded by Gregory Kurtzer, one of the original founders of CentOS, in December 2020. The project was…

  • Installing GUI on Oracle Solaris 11 (sol-11_4-text-x86.iso)

    Sun Solaris, now known as Oracle Solaris, is a Unix operating system originally developed by Sun Microsystems. Oracle…

    9 Comments
  • Updating Rocky Linux 9.4 Kernel

    Rocky Linux is a free and open-source enterprise operating system designed to be fully compatible with Red Hat…

    8 Comments
  • Updating Rocky Linux 9.4 Multimedia Codecs

    Rocky Linux is an open-source enterprise operating system designed to be a downstream, community-supported…

  • Setting up OpenSolaris 2009.06 (osol-0906-x86.iso) for a virtual machine

    UNIX is a powerful, multiuser, multitasking operating system originally developed in the 1960s and 1970s at AT&T's Bell…

    14 Comments
  • OpenSolaris 2009.06

    OpenSolaris was an open-source operating system based on the Solaris kernel and associated tools. It was initiated by…

    32 Comments
  • Force RHEL 7 to set the date 2 years in the past

    Here is a question from one of our fellow UNIX Europe group members: How can he force RHEL 7 to set the date 2 years in…

    12 Comments
  • Setting up RHEL 7 (rhel-server-7.9-x86_64-dvd) for a virtual machine

    RHEL 7, or Red Hat Enterprise Linux 7, was a major release of the RHEL operating system that was introduced in June…

    8 Comments
  • Update Rocky Linux from 9.3 to 9.4

    Rocky Linux is an exciting development in the world of Linux distributions. It was created as a direct response to the…

    2 Comments
  • Install LibreOffice on Rocky Linux 9.3

    Rocky Linux was created as a community-driven, enterprise-focused Linux distribution. It aims to be a downstream…

Others also viewed

Explore content categories