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

Justin M.

Principal Platform Engineer

4 个月

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

要查看或添加评论,请登录

社区洞察

其他会员也浏览了