- Alpine linux kde plasma
- Standard plasma installation
- Lightweight plasma installation
- KDE Applications
- Starting Plasma
- Using a display manager
- From the console
- Security-Oriented Alpine Linux 3.14 Released with KDE Plasma 5.22, QEMU 6.0, and More
- Installing Alpine Linux and KDE Plasma
- Raindrops System
- Downloading Alpine
- Booting the live system
- Formatting a Btrfs partition
- Installing the base system
- Setup your keyboard
- Setting a computer name
- Initialize networking
- Putting a root password
- Selecting a timezone
- Using a proxy server
- Network Time Protocol
- Installing package mirrors
- Configuring the SSH server (remote login)
- Installing the base system
- Regular installation (Ext4)
- Advanced installation (Btrfs)
- Additional steps if you use a UEFI system
- UEFI system users: If you don’t have a EFI system partition, follow these steps
- Installing the bootloader
- UEFI systems
- Legacy BIOS
- Post-install settings
- (Optional) Make it a rolling release distro
- Enable the Community repository
- Install doas
- Create a user account
- Installing KDE Plasma
- Installing GUI apps
- Additional settings
- Configure the keyboard
- Set a user nick name
- Wrapping Up
Alpine linux kde plasma
KDE is a software project comprising a desktop environment known as Plasma, a collection of libraries and frameworks known as KDE Frameworks, and several applications known as KDE Applications. Their UserBase wiki has detailed information about most KDE Applications.
- Install AlpineLinux
- Create a user account (optional but recommended)
- Enable the Community repository
- Install Xorg
Standard plasma installation
# apk add plasma elogind polkit-elogind dbus
This will install the required Plasma packages, sddm and pre-configure it to use the Breeze theme.
Lightweight plasma installation
Alternatively, a smaller installation can be done:
# apk add plasma-desktop systemsettings sddm breeze elogind polkit-elogind dbus
For both installation methods you need to enable the following services:
# rc-update add dbus
# rc-update add elogind
# rc-update add polkit
# rc-update add udev
To install the full set of KDE Applications, install kde-applications . You can also choose to install a smaller set of applications by installing any of the subpackages:
Plasma can be started using a display manager or from the console.
Using a display manager
When Plasma is installed via the plasma meta-package, the display manager is set up using sddm .
Make sure you enable and start the SDDM service.
- Select Plasma to launch a new session in Wayland
- Select Plasma (X11) to launch a new session in Xorg
From the console
The Xorg session can be launched by installing xinit and appending exec startplasma-x11 to your .xinitrc file. To start X:
Security-Oriented Alpine Linux 3.14 Released with KDE Plasma 5.22, QEMU 6.0, and More
Alpine Linux, a lightweight, security-oriented GNU/Linux distribution based on OpenRC, BusyBox, and musl libc, has been updated today to version 3.14, a new stable release bringing major updates.
Five months in the works, Alpine Linux 3.14 is here as another big update for this security-oriented distribution, featuring the latest and greatest KDE Plasma 5.22 desktop environment series, along with the KDE Gear 21.04.2 software suite, for those who want to install the KDE Plasma desktop.
But, Alpine Linux is a Linux distribution designed for servers, firewalls, routers, VPNs, etc., so it comes with major updates for packages needed for these type of setups. These include Lua 5.4.3, HAProxy 2.4.0, nginx 1.20.0, njs 0.5.3, Node.js 14.17.0, PostgreSQL 13.3, Python 3.9.5, QEMU 6.0.0, R 4.1.0, and Zabbix 5.4.1.
Among other changes, Alpine Linux 3.14 enables the faccessat2 syscall in the musl C standard library, which may create issues with Docker 20.10.0 and earlier versions, as well as libseccomp 2.4.4 and earlier versions, the npm package was made a standalone aport, and the collectd package was split into many subpackages for plugins.
This release also removes nftables’ rate limit for echo-request from the default ruleset and changes the nginx’s default directory for the vhost configs from /etc/nginx/conf.d to /etc/nginx/http.d. Also, the LuaJIT package now uses the official OpenResty branch, and the ClamAV package was moved to community.
Under the hood, Alpine Linux remains powered by the long-term supported Linux 5.10 LTS kernel series.
If you’re using Alpine Linux 3.13 or a previous release, you can update your installation to Alpine Linux 3.14 right now using the apk upgrade —available command in a terminal emulator. If you’re new to Alpine Linux, you can learn more about it and download the latest release from the official website.
Installing Alpine Linux and KDE Plasma
When it comes to choosing a Linux distro, you may want to use Arch Linux because it’s lightweight and you choose what runs on your system. There’s a distro that is even lighter than Arch Linux: Alpine.
In this guide, I will explain how to get a fully working KDE Plasma desktop on Alpine Linux.
The obvious first step is to download the system ISO. Head to https://alpinelinux.org/downloads/. Now pick the extended version since it contains everything we need to get a working install (this guide doesn’t cover installing with other versions).
Once the download is done, put the ISO on a USB stick as you’d do for any Linux distro, and boot on it (these two are out of the scope of this guide).
Booting the live system
Now that Alpine is downloaded and you’ve booted into the live system, login as root .
A live Alpine Linux system, logged in as root
If you have ever installed Arch Linux, this prompt might seem familial, although Alpine Linux comes with a step by step installer that helps you get everything ready.
Formatting a Btrfs partition
Now comes the hard part: formatting your disk to Btrfs. Btrfs is the recommended file system for Linux systems nowadays, but Alpine Linux doesn’t use Btrfs by default. If you want to use Btrfs for your system partition, you need additional setup.
First, load the Btrfs drivers with modprobe btrfs .
Now, partition your disk using your favorite utilities. If you don’t know which tool to use, you can use cfdisk (install it with apk add cfdisk ), but be careful with this tool! Make sure to reboot after changing the partition table.
Finally, run apk add btrfs-progs and mkfs.btrfs -f /dev/sda1 (replacing sda1 with the name of your partition). You now have configured Btrfs for your system partition. If you want to create additional Btrfs partitions, you can do so following these same steps.
Installing the base system
Installing the system is simple: run the setup-alpine command and follow the steps.
Setup your keyboard
You get a list of all the available keyboard layouts. First, enter the name of the keyboard language you have, and then select the variant you want (for example in French I can use AZERTY, BEPO or DVORAK). If you are installing Alpine Linux on a Mac, you might want to use the Mac variant.
Setting up the keyboard on Alpine Linux
Setting a computer name
This part may seem like nothing but it is actually very important. If you want to access your computer remotely from another device in your network, you need to give it a name. Make sure you use a name that isn’t already existing on your network.
The name can only contain lowercase letters, numbers, dots, hyphens and underscores.
Setting a computer name on Alpine Linux
To make sure you get the most up-to-date system once you install, you need to configure the network. While this is not a required step, it is highly recommended that you setup the network.
Generally, just pressing Enter at every prompt should get you connected, unless your network requires special configuration.
Putting a root password
root is the system administrator account on POSIX systems. Alpine, by default, does not create additional users.
At the end of this guide, we will disable the root account for security purposes, but it is required that we give it a password to access the system once it is install.
Putting a root password on Alpine Linux
Selecting a timezone
Selecting a timezone will. obviously, help set the time. If you don’t know what you need to put here, you can view the list of TZ database timezones on Wikipedia.
Selecting a timezone on Alpine Linux, using TZ database timezones
Using a proxy server
If you are on an enterprise network that requires the use of a proxy server, it is now time to enter the address of that proxy server. If you don’t use a proxy server, simply press Enter and continue the installation.
Network Time Protocol
The Network Time Protocol (NTP) is a protocol that helps keep your computer’s time in sync with Internet time.
Alpine asks you what NTP service you would like to use. Unless you know what you are doing and want to use another service, simply press Enter. If you want to not use NTP, enter none .
Installing a Network Time Protocol service on Alpine Linux
Installing package mirrors
A mirror is the server that is used to download packages that will be installed on the system. By default, Alpine comes with no mirror installed, which greatly limits the amount of packages you can install; so the installer helps us get a mirror installed.
The way I recommend to setup a mirror is to enter f , which will pick the fastest mirror near you. It takes a while because it have to test the speed of all known mirrors, but you will end up with a perfect config file with the fastest mirror near you.
Once it is done, it will automatically add the fastest mirror to your config and lets you continue the setup:
Alpine’s installer found the fastest mirror near me
You can also use any of these 3 other options:
- If you want to use a random mirror, enter r
- If you wish to not setup mirrors (not recommended, we assume you will setup mirrors later), simply enter done .
- If you have a specific mirror you want to use, enter its number if it’s in the list, or its URL if it’s not in the list
Installing package mirrors on Alpine Linux
Configuring the SSH server (remote login)
If you wish to access your computer’s command line remotely, you might want to install an SSH server.
When Alpine asks you which SSH server you want to use:
- Enter openssh if you want to enable remote login;
- Enter none if you don’t want
This choice is not permanent, you can always install or uninstall the SSH server after installing the system.
Configuring the SSH server on Alpine Linux
Installing the base system
Regular installation (Ext4)
Selecting the target disk
Alpine will now show you the list of all disks that are attached to the system. Enter the name of the disk you want to use as a system disk (you can setup additional partitions after installing).
Target disk selection
Selecting the contents type
Now, you are asked what is this disk supposed to contain. By default, I recommend setting sys , but:
- if you want to setup encryption, enter crypt , configure encryption, then enter sys ;
- if you want to setup the logical volume manager, enter lvm , configure logical volumes, then enter sys
Confirm that you want to erase the disks, and continue the installation.
Selecting the contents type and confirming erase
Advanced installation (Btrfs)
Alpine will now show you the list of all disks that are attached to the system. Press Ctrl+C to quit out of the installer.
Quitting out of the installer
First, mount the Btrfs partition using mount -t btrfs /dev/sda1 /mnt (replace /dev/sda1 with the name of the partition).
Additional steps if you use a UEFI system
Now, mount your EFI system partition to /mnt/boot/efi:
- mkdir -p /mnt/boot/efi
- mount -t vfat /dev/sda2 /mnt/boot/efi (replace /dev/sda2 with the name of the EFI system partition)
UEFI system users: If you don’t have a EFI system partition, follow these steps
- apk add cfdisk
- Select your Btrfs partition, hit «Resize». Shrink it by around 500MB
- Go down to the «Free space», hit «New», and Enter. Then hit «Type» and select «EFI system».
- Go to «Write», type «yes», and «Enter»
- Hit «Quit»
- mkfs.vfat /dev/sda2 (replace /dev/sda2 with the name of the partition you created)
Install some required utilities with apk add efibootmgr grub grub-bios grub-efi then run setup-disk -m sys /mnt , which will install the entire system.
Installing the base system on a Btrfs partition
Installing the bootloader
The bootloader is already installed and working. You can now remove the installation media from the computer, and enter reboot to boot into the newly installed system.
By default, Alpine Linux wants to use the extlinux bootloader, but I recommend GRUB as it is simpler to use, configure and maintain.
First, remove all the other bootloaders using apk del syslinux ; and install GRUB on the live system using apk add grub grub-bios .
You also need to install GRUB on the installed system, using these commands:
- chroot /mnt
- apk add grub grub-bios
- And exit to go out of the chroot environment
Then, finish installing GRUB using grub-install —root-directory=/mnt /dev/sda (replace /dev/sda with the name of your disk), and these commands to generate a configuration:
- mount —bind /dev /mnt/dev
- mount —bind /proc /mnt/proc
- chroot /mnt
- grub-mkconfig -o /boot/grub/grub.cfg
- And exit to go out of the chroot environment
You’re done installing the bootloader. You can now remove the installation media from the computer, and enter reboot to boot into the newly installed system.
Fully installed Alpine Linux system
Now that you have installed Alpine and that you booted from the disk, there are a number of things you need to do.
(Optional) Make it a rolling release distro
If you want to get software updates as they release, you can use Alpine Linux Edge to transform this install into a rolling release install.
To do this, edit /etc/apk/repositories ( vi /etc/apk/repositories ), comment all the lines, and uncomment the lines that contains edge
Save the file ( :wq ), run apk update to fetch the repositories, and apk upgrade to update your system. Finally, run reboot to make sure you run the latest kernel.
Enable the Community repository
The Community repository contains additional packages that are not included in the base distro. If you followed the Make it a rolling release distro section, you don’t need to enable the Community repository as it should already be enabled.
To enable the Community repository, edit /etc/apk/repositories ( vi /etc/apk/repositories ) and uncomment the first line that ends in community . Save the file ( :wq ) and run apk update .
With doas, a user can gain administrator privileges without using the root password. Installing doas is recommended but not necessarily required.
First, run apk add doas , then edit /etc/doas.d/doas.conf ( vi /etc/doas.d/doas.conf ), add permit persist :wheel as the last line of the file.
Create a user account
Most desktop apps (including the desktop itself) won’t start if you try to run them as root. This means you need to create a user account on this system.
First, run adduser (replace with the name you want), and run adduser wheel to make this user administrator.
Type exit , and log in as the user you just created. Run doas whoami to make sure doas is configured properly. Now, disable the root account by running doas passwd -l root (you can enable it again with doas passwd -u root ).
Installing KDE Plasma
Now that we have a working system, we need to install a desktop environment. Run doas apk add plasma elogind polkit-elogind dbus which will install all the required packages, and complete installing Xorg with doas setup-xorg-base
Now enable the required services by running these commands:
- doas rc-update add dbus
- doas rc-update add elogind
- doas rc-update add polkit (may not exist)
- doas rc-update add udev
- doas rc-update add sddm
Then, reboot the system ( doas reboot ), and you should be greeted with SDDM. If that’s not the case, make sure you have the proper video drivers installed.
Installing GUI apps
Now, it’s great, we have a working KDE Plasma desktop, but it’s missing a lot of apps (we don’t even have a terminal). We can easily solve that:
- log out from KDE Plasma
- press Ctrl+Alt+F2 to access the console
- login from here
- run doas apk add oxygen-sounds kde-applications-base
You’ll obviously also want a browser. KDE recommends using Falkon, but you can also install any browser you want.
Once you’re done installing apps from the console, press Ctrl+D to log out, and then Ctrl+Alt+F7 to go back to the GUI.
Configure the keyboard
Earlier during the installation process, the keyboard was configured. Now that Xorg (or Wayland, depending on the session type you select) is running, your keyboard may be set back to QWERTY.
To fix that, head into Plasma’s System Settings, Input Devices, then Keyboard, Layouts, and check Configure layouts. Add your prefered keyboard layout, and hit Apply.
Plasma’s System Settings showing the keyboard layout(s)
To make sure it applies also to the login screen, edit /usr/share/sddm/scripts/Xsetup ( kate /usr/share/sddm/scripts/Xsetup ) to add setxkbmap «fr» (replace fr with your prefered X11 keyboard map)
Set a user nick name
Earlier when we created our user, we didn’t specify a name for it. The default name is «Linux User», so we want to change that.
Click on Plasma’s Application Launcher, and click on the profile picture. This opens the System Settings, where you can set a proper username (and profile picture if you want).
Plasma’s System Settings showing user info
Once you are done with this, you need one final reboot. You can now enjoy KDE Plasma on a lightweight system (less than 3 GiB of disk space used on a full install, less than 300 MiB of RAM used at boot) that is Alpine Linux.
KDE Plasma running Konsole and KSysGuard, showing used RAM and disk space
Next time, I will try running GNOME on Alpine Linux, so stay tuned.