Low-distraction Linux desktop setup
I use Debian 11 (Bullseye) and decided to document my setup here. I have the same setup on my main PC and Lenovo laptop (T490s).
Hardware
Most of my PC hardware is pretty old. This is what I run right now:
- CPU: i5-6600k
- GPU: RX6600 XT
- Motherboard: Z170A GAMING M3 from MSI
- RAM: Kingston HyperX 16GB DDR4 4200Mhz
- Monitor: Dell Ultrasharp 27" 4k
-
Disks:
- Debian: Samsung SSD 970 EVO Plus 500GB
- Windows 10: Samsung SSD 950 PRO 256GB
- Data share: a 256GB SSD
Base system
I dual-boot Debian 11 and Windows 10. They are on separate NVME drives. There is a common SSD drive to share data between them. I use motherboard boot selector for dual booting.
Debian 11 is a Linux distribution with good defaults. It is compatible with lots of hardware and software:
- It still uses Xorg
- Uses systemd and pulseaudio
- Simple kernel updates
- Large user base
- Usable on desktops, laptops, and servers
Installation
I downloaded Rufus software to create a bootable USB disk from a Debian installation ISO file.
Rufus is a Windows software but it works. I have not found a reliable and easy way to create bootable installation disks from Linux.
I downloaded this ISO file: firmware-11.3.0-amd64-netinst.iso
. It contains packages with non-free firmware. Installation disks can be
found from Debian download pages.
The Windows drive was removed before installing Debian. This ensures that there is potentially no confusion between the drives during installation and no data on the Windows disk is destroyed.
Partitioning
I put everything on a single partition for easier backup later. I don't use RAID, Logical Volume Manager, disk encryption, or a swap partition.
Core system
The Debian installer includes Task Selector where you can choose a "role" for the machine and install various software. I chose nothing except the Standard system utilities. This selection installs the least amount of unnecessary packages.
There were some packages which I needed to install as soon as possible. The APT repositories file (/etc/apt/sources.list
) should
contain:
deb http://deb.debian.org/debian/ bullseye main non-free contrib
deb http://deb.debian.org/debian/ bullseye-backports main non-free contrib
deb http://security.debian.org/debian-security/ bullseye-security main contrib non-free
deb http://deb.debian.org/debian/ bullseye-updates main contrib non-free
Sometimes non-free and contrib tags are missing.
Update the package list (if there were changes in the list file above):
apt-get update
NTFS support to access the shared drive:
apt-get install ntfs-3g
Up-to-date kernel from backports (required for RX 6600 XT):
apt-get install linux-image-amd64 -t bullseye-backports
Binary firmware:
apt-get install firmware-linux firmware-linux-nonfree -t bullseye-backports
After this point I restarted the computer to make sure that I still have a working installation.
Sadly the available firmware in Debian is not enough to run RX 6600 XT. You need to clone the git repository from
kernel.org
and copy the contents of amdgpu
directory to /lib/firmware/amdgpu
.
The last action makes the system potentially non-upgradeable as any newer version of linux-firmware
package upgrade would likely
overwrite the working firmware.
Regenerate the kernel ramfs:
update-initramfs -u
and then reboot.
Graphical environment (KDE)
Install the minimal KDE environment:
apt-get install kde-plasma-desktop
Reboot and log into graphical environment.
KDE settings
Set up desktop scaling: System Settings → Display and Monitor → Display Configuration. I use 200% scaling as it renders text and elements in "logical" FHD size on a 4k display.
Configure the "panel" height: right click on empty space in Task Manager and select Edit panel. Set panel height to 64. It does not scale correctly with desktop scaling.
Set up cursor size in System Settings → Appearance → Cursor. Setting it to 48 gives a good visual size.
Task Manager configuration: right click on empty space on task manager and select Configure Task Manager → Appearance → General. Untick:
- Show tooltips
- Highlight windows when hovering over tasks
- Mark applications that play audio
Unticking the last option disables jumping of Task Manager items when they start or stop playing media (visually very distracting).
Fix the size of System Tray icons: right-click on an empty space in System Tray (can be tricky) and select Configure System Tray → General → Panel icon size: Scale with Panel height.
Set up icon sizes for 4k display: System Settings → Appearance → Icons → Configure Icon Sizes. Sadly it's very difficult to tell what exactly those icon categories are. Just increase everything by 2x.
Enable automatic login: System Settings → Startup and Shutdown → Login Screen (SDDM) → Advanced.
Disable screen locking: System Settings → Workspace Behavior → Screen Locking.
Disable clipboard app (makes System Tray less cluttered): right click on upwards arrow (▲) in System Tray and then select Configure System Tray → Entries → System services → Clipboard and set it to Disabled.
Disable window grouping for the selected applications: right click on app on Task Manager → More Actions → untick Allow this program to be grouped. This reduces the number of clicks to select a window.
Make KDE start with empty session: System Settings → Workspace → Startup and Shutdown → Desktop session and select Start with an empty session.
Enable auto-login: System Settings → Workspace → Startup and Shutdown → Login Screen (SDDM) → Advanced → tick Login Automatically as user and select your username.
Remove Discover (software update app) if you use apt-get
manually for updates later:
apt-get autoremove plasma-discover
KDE additional packages
Install ark (file compression/decompression):
apt-get install ark
Konversation (IRC client):
apt-get install konversation
Firefox:
apt-get install firefox-esr
Krita (drawing app):
apt-get install krita
KDE Spectacle (screenshots):
apt-get install kde-spectacle
Gwenview (image viewer):
apt-get install gwenview
Boot jank
Remove plymouth by running:
apt-get autoremove plymouth
Plymouth tries to switch to graphical display as early as possible to provide eye candy. In my opinion it just hides possible important debugging text messages and delays boot into the actual graphical environment.
Other major software
- Chromium
- Visual Studio Code
- Draw.io editor
- VirtualBox
- Valentina Studio
- MongoDB compass
- Docker
- Microsoft Teams
- Skype
- Zoom
- OBS-Studio
- Postgresql 13
Visual Studio Code
Open settings: File → Preferences → Settings → Open settings (JSON).
To make it easy to use on HiDPI screen:
"window.zoomLevel": 0.5
Disable checking for updates and auto-updates:
"workbench.enableExperiments": false
"update.mode": "none"
"update.showReleaseNotes": false
"extensions.autoCheckUpdates": false
"extensions.autoUpdate": false
Ignore automatic extension recommendations:
"extensions.ignoreRecommendations": true
Chromium
I use Chromium as my default browser because it's much easier to enable hardware accelerated video decoding for it than for Firefox.
I use pinned version of 100.0.xxxx since hardware-based video decoding is broken with every new release and requires different workarounds every time.
Version 100.0.xxxx required the following steps (these will likely not work for any other version or non-AMD GPU).
Edit chromium.desktop
file and update the command to:
/usr/bin/chromium %U --enable-features=VaapiVideoDecoder --disable-features=UseChromeOSDirectVideoDecoder
You can use KDE menu to edit it: Applications launcher (start menu) → Search chromium → Edit application → Command.
Install h264ify extension. The extension will force some sites (YouTube) to use h264 encoded files for videos. h264 hardware-based decoding support is most widespread.
Set Chromium as the default browser: System Settings → Applications → Default Applications.
Disable ads in new tab
Open chrome://flags
and disable NTP Modules to get rid of the ads when opening new empty tab.
Disable KDE Wallet
Chromium and KDE Wallet do not play together. Chromium will lose all cookies and stored passwords randomly if KDE Wallet is enabled.
To disable the Wallet: Systems settings →Personalization → KDE Wallet → untick Enable the KDE wallet subsystem.
This makes the network manager not remember passwords but you can set the passwords manually under Systems settings → Network → Connections → Wi-Fi → select network → Wi-Fi Security.
Docker
Debian packages are too old for most use cases. I had to install Docker from its own instructions.
Same has to be done for docker-compose (not included in the Docker installation for some reason).
Skype
The Skype application will try to use Gnome Keyring to remember the account password. This will prompt for Gnome Keyring password every time after starting the app.
Gnome Keyring password can be disabled by installing seahorse to configure it and set the default password to empty string.
apt-get install seahorse
It can be started with command seahorse
from the terminal. Click Passwords → Change password and set it to empty
string.
Postgresql 13
Postgresql 13 is available from the system packages. However, the system is misconfigured for it. Running commands like psql
or
dropdb
will emit an error:
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
... list of LANGUAGE, LC etc. system variables
are supported and installed on your system.
You need to run:
dpkg-reconfigure locales
as root and select which locales you need (I need en_US.UTF-8
and et_EE.UTF-8
).
In the next step you can choose the default locale (I chose en_US.UTF-8
). The system will "regenerate locales".
You must also set the default locale for Plasma desktop (as normal user):
nano ~/.config/plasma-localerc
and enter:
[Formats]
LANG=en_US.UTF-8
The commands should not show the warnings anymore.
VirtualBox
VirtualBox is not available in official Debian packages. It can be downloaded from VirtualBox homepage.
I downloaded version 6.1.34 for Debian 11. It can be installed using the command:
dpkg -i downloaded-file-name
It will report that package libqt5opengl5
is missing. This can be fixed:
apt-get install libqt5opengl5
Then system will complain about not being able to install necessary kernel modules. This can be fixed (you need matching package name for your kernel):
apt-get install linux-headers-5.16.0-bpo.4-amd64
and running:
/sbin/vboxconfig
The next step was to enable a workaround for the bug where Open File dialog in VirtualBox cannot select any files:
Applications launcher (start menu) → Search VirtualBox → right click → Edit application → Application → Command
and enter as Command:
KDE_FULL_SESSION= XDG_CURRENT_DESKTOP= DESKTOP_SESSION= VirtualBox %U
The bug is likely already fixed in the current release of VirtualBox.
Set display scaling to 200% (saves CPU resources): Open VirtualBox → File → Preferences → Display → Scale Factor.
And disable updates: File → Preferences → Updates → uncheck Check for Updates.
VirtualBox Extensions Pack
Extensions Pack is required to enable hardware (for example, USB) passthrough to the guest system.
Extensions Pack can be downloaded from the homepage and installed in VirtualBox: File → Extensions → Add.
You need to make sure that your normal user is added into the vboxusers
group (use your own username):
adduser raivo vboxusers
This allows to actually bind devices from VirtualBox GUI to the guest OS.