Klaus Zimmermann's Corner

Fixing the Desktop on Alpine Linux 3.14

A little late to the party, perhaps, but Alpine Linux - my new favorite distro that I wrote about a few weeks ago - has just released a new version (3.14) on June 15.

Congratulations for the whole team on this achievement! Truth is that after using Arch for such a long time, I sort of forgot what point releases were, and was delighted to see the announcement on the website as I was going to fetch the latest ISO to try on my other machine. Side note: who knows if this trend will mark me distro-hopping once again towards Alpine?

The installation went smoothly and I was up and running barebones Alpine in the other machine in a matter of 10 minutes total just as I wrote in my previous guide, but from then and on a few problems unseen before started arising. Chiefly, the Graphical Environment was completely frozen and I was unable to do anything after I started Xorg, except press the power button and reboot the machine. I wasn't even able to Ctrl+Alt+F2 and salvage the session from another TTY, or try the funny-sounding but golden trick of Raising Skinny Elephants. Both the mouse and keyboard of the laptop - peripheral or built-in - were dead, completely unresponsive.

Bummer, I thought. Reading a little more into the detailed Release Notes in the Wiki, though, I realized the apparent source of this strange situation: updates to Xorg made by the maintainers.

xf86-input-{mouse,keyboard} have been removed, as upstream maintainers have explicitly declared that they are for non-Linux platforms only. Users should have already switched to xf86-input-evdev or xf86-input-libinput.

/usr/libexec/Xorg.wrap and the suid bit on /usr/bin/Xorg have been removed. X now requires udev or mdev, and either elogind must be enabled or X users must be in the video and input groups.

Ok, there you have it. Apparently, the quickstart script setup-xorg-base which previously pretty much set everything up perfectly now does not automatically fulfill all these requirements anymore. After spending a few minutes bumping my head against the wall to get this sorted, here's what eventually fixed it for me and allowed me to proceed with a nice Desktop session. Here's how:

The fix

As hinted by the release notes, additional packages concerning the graphical environment must be used. Install evdev to make everything work again:

apk add xf86-input-evdev

This should be the bare minimum in terms of packages, but just by doing so the Desktop will still not work: there is still the need to make some manual inclusions on system groups that handle the sort of input and interaction in Xorg. Hence:

adduser youruser input
adduser youruser video
adduser youruser audio # for good measure

Upon having this done, startx should now work pretty seamlessly and you should be able to launch and use your window manager without hassle. Mission complete!

Or almost. One more thing: now that you're back on your way to finish ricing your Alpine install, here's a thing that I missed on the original essay that also make for a better desktop session with it: install the package desktop-file-utils in order to be able to automagically open files on your file manager by double-clicking them!

This was something that I accidentally discovered while installing xarchiver to unzip some files directly on the file manager, and saw that as it pulled out that dependency, other installed graphical applications also were included in the right-click menu. Awesome, I guess. Didn't notice that before.

Alpine was already one of my favorite distros, and now we've got a new version out. Awesome. What are your thoughts in using Alpine on the Desktop? Do you think it's silly, a waste of resources on a distro meant for server-level stuff or that we need to explore more how far we can take it? Let me know on Mastodon!

This post is number #20 of my #100DaysToOffload project. Oh yes, baby: 1/5th done! Follow my progress through Mastodon!

Last updated on 06/23/21