Apparent hate for Linux Mint populism, Plan Bs, CSDs and life after Xfce? ►
◄ Project Zebra: An open mind is like a fortress with its gates unbarred
This entry is part of my Project Zebra series covering migration to Linux for personal computing use.
Title reference: Doctor Who, The Day of the Doctor.
See the previous blog entry for musings on client side window decorations and my reasons for looking at choosing another Linux distro or desktop environment. This is going to be back to freeform notes, albeit including a migration to KDE Plasma, so let's start with something that won't add much new for a lot of people but is a nice bit of mainstream reporting on open source from the end of last year:
Elsewhere, DestinationLinux discusses 'papercut' annoyances with desktop Linux, the little bits of friction -- https://www.youtube.com/watch?v=5EMeidXOVQQ
I'll start with an easy one. Recently I burnt some DVDs for the first time in ages, so a tip if you use Brasero and don't want it to to take ages verifying burns: disable the "Image Checksum" plugin.
A bigger one for me is resource balancing and making sure that the desktop environment is still relatively usable whilst doing intensive file I/O operations even if that means the operations are slightly slower. I'd already configured swappiness and cache pressure, but at some point since upgrading to Xubuntu 19.10 (maybe since the initial upgrade) copying files to the NAS or external USB hard drives made the keyboard and mouse become varying degrees of unresponsive. That may not have been the OS at all, or not entirely. For a start, the session had been running on and off for 11 days,with various updates installed in that period including kernel updates, which isn't wise. And also crucially, not all of the external hard drives I've got perform equally despite being bought in roughly the same period from a handful of manufacturers, so I can't compare with the last off-site backups I took onto a set of those.
Either way, it's a case of default system settings not being appropriate for the hardware, and a couple more edits needed to /etc/sysctl.conf
https://askubuntu.com/questions/397249/system-freezes-unresponsive-unusable-when-copying-large-file-to-usb / https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1208993
I've already got;
vm.swappiness=1 vm.vfs_cache_pressure=50
then either specify a % of memory
vm.dirty_background_ratio=5 vm.dirty_ratio=10
or fixed values;
vm.dirty_background_bytes=16777216 vm.dirty_bytes=50331648
Specifying the _bytes parameters should force the _ratio parameters to 0 (i.e. use a fixed value rather than a percentage of memory). The ones I've adopted per suggestions are low and should be comfortably within the throughput of the drives in most circumstances. The dirty_ entries are basically telling the OS to clear write buffers relatively frequently, so it doesn't get caught with a lot to write in one action and briefly lock up.
Then load the updated values with: sudo sysctl -p
These articles explain more, in ascending order of detail;
https://www.vertica.com/kb/Tuning-Linux-Dirty-Data-Parameters-for-Vertica/Content/BestPractices/Tuning-Linux-Dirty-Data-Parameters-for-Vertica.htm
https://lonesysadmin.net/2013/12/22/better-linux-disk-caching-performance-vm-dirty_ratio/
https://www.kernel.org/doc/Documentation/sysctl/vm.txt
The machine I'm using has 8GB RAM and neofetch informs me is an Intel i5-3470T (4) @ 3.600GHz. However, it's using a 1TB drive for the OS that isn't the latest and the external drives are using USB 2.0, so I can easily believe that defaults favour SSD and/or USB 3.0 devices and that's tripping it into making large synchronous writes.
After a restart I applied the changes. It seems to have done the trick and the machine is back to being able to multitask backups, streaming video playback. downloads and typing documents in ways that previous systems would never have coped with.
I did some simple VSTO development over new year, which I'll probably bash out a separate entry on, and a lot of which involved working out which Microsoft development components were required, so it involved resizing the drive of the virtual machine I was working in (a roughly thirty gigabyte development environment to compile a few dozen lines of code... ouch). So this is a) a reminder that the command VBoxManage is case-sensitive, and b) how to do that;
https://www.patricia-anong.com/blog/2017/11/1/extend-vmdk-on-virtualbox
VBoxManage createhd --filename “new_and_larger.vmdk” --size [number in megabytes]
VBoxManage clonehd “new_and_larger.vmdk” --existing “old.vmdk”
Don't forget to expand the drive from within the VM. Apparently to shrink, you can zero out the free space from within the VM (eg, "sdelete.exe c: -z" with the sysinternals tool) and then clone it like in the example above.
Sharing folders to a Linux VM isn't quite point and click, but it is something you only need to set it up once within the quest system, per https://averagelinuxuser.com/virtualbox-shared-folder/ (after that you can change the folder shared with the VM and reuse the mount point).
sudo usermod -a -G vboxsf `whoami`
sudo chown -R `whoami`:users /media/
Still on virtual machines, the more I try out Kubuntu the more confident I became about KDE Plasma as a replacement for Xfce when the latter gets Ruined FOREVER by headerbars. (Incidentally, it's not a thing to be proud of but my longest-standing fandom named that trope).
There's been a good bit of discussion in the Xfce forums about CSD, although I doubt it'll make any difference with changes already being committed.
I went for a minimal Kubuntu install (it's nice to have the option of minimal installs) and went through a quick setup: panel to the top, turning off animations, reducing shadow size, using lighter options for Breeze in some places and Noto Sans 8pt in most. Cut the panel down to: Application Menu, Launcher for Nemo, Task Manager, System Tray, Display Configuration, System Load Viewer, Digital Clock Lite and some Latte Separators, and locked it. Installed Synaptic, Elementary icons, Nemo, Kdocker (when for real, if I end up reinstalling I'll want to compile 5.2).The default choices of K3b, Okular, Skanlite, Kate, Ark, Kcalc, Konsole, Spectacle, etc would generally be fine, but since I planned on replacing the DE in my current install rather than reinstalling, some GTK apps would doubtless stick around as well or instead of.
To get things closer in feel to my current setup I took 'quiet splash' out from kernel parameters in grub, then installed a bunch of other software (in no particular order Geany, Chrome,Thunderbird, Veracrypt, XnViewMP, LibreOffice, Krita, Gimp, FileZilla, Audacity, Avidemux, etc) to see how it sat in the environment. Very well, it would seem, and should my wits leave me apparently there'll even be better integration for GTK CSD applications in Plasma 5.18, which is due in Kubuntu 20.04 shortly.
Using Breeze, I haven't been moved to do something about the thin/disappearing scrollbars yet, although no doubt that may change in regular use. I have told the window manager to interpret double-clicking on titlebars as vertically maximise, as this include the top edge; I can live with snapping the window to the top of the screen or using the window button to fully maximise. And keyboard shortcuts need to be recreated too, since in Linux desktop environments you generally don't need to use additional software to set those. A nice thing about the Plasma Desktop is that it already handles the Win/Meta key for the applications menu, and shortcuts for show desktop and lock screen, although ultimately I replaced Ctrl+L with a slightly dfiferent action.
A slightly hacky thing I did was to copy the app menu from /usr/share/plasma/plasmoids/org.kde.plasma.kicker to ~/.local/share/plasma/plasmoids/org.kde.plasma.kicker and figure out a little bit of Qt code to style the small icon (which I've set as the Kubuntu logo) into one the height of the panel and add 'Apps' next to it so that there's a larger area for clicking. The screenshot below shows the effect.
The bit to change in CompactRepresentation.qml is:
function updateSizeHints() { var scaledWidth = Math.floor(parent.height * (buttonIcon.implicitWidth / buttonIcon.implicitHeight)); root.Layout.minimumWidth = 78; root.Layout.maximumWidth = 78; root.Layout.minimumHeight = units.iconSizes.small; root.Layout.maximumHeight = inPanel ? units.iconSizeHints.panel : -1; } Text { text: "Apps " font.pointSize: 10 anchors.right: parent.right anchors.verticalCenter: parent.verticalCenter } Connections { target: units.iconSizeHints onPanelChanged: updateSizeHints() } PlasmaCore.IconItem { id: buttonIcon anchors.left: parent.left anchors.verticalCenter: parent.verticalCenter readonly property double aspectRatio: (vertical ? implicitHeight / implicitWidth : implicitWidth / implicitHeight) source: useCustomButtonImage ? plasmoid.configuration.customButtonImage : plasmoid.configuration.icon active: mouseArea.containsMouse && !justOpenedTimer.running smooth: true roundToIconSize: !useCustomButtonImage || aspectRatio === 1 onSourceChanged: updateSizeHints() }
Skimming mentions of people switching to KDE from Xfce, I didn't anticipate particular problems;
https://forums.linuxmint.com/viewtopic.php?t=180307
https://number1.co.za/how-to-change-desktop-environment-from-xfce-to-kde/
https://forum.manjaro.org/t/completely-switch-from-xfce-to-kde/63318/14
https://wiki.manjaro.org/index.php?title=Remove_XFCE_and_install_KDE
https://www.reddit.com/r/linuxmasterrace/comments/7kgnol/do_you_have_more_than_one_de_installed_at_the/
https://www.forbes.com/sites/jasonevangelho/2019/10/23/bold-prediction-kde-will-steal-the-lightweight-linux-desktop-crown-in-2020/
The last one is interesting, and I'd agree resource usage is good; testing in a VM with just 2GB of RAM allocated the desktop is using less than a quarter of it.
Then I jumped the gun by installing kubuntu-desktop on my main machine and figuring out the rest from there. I've gotten to the stage of replacing LightDM with SDDM and clearing out Xfce packages;
https://itsfoss.com/install-xfce-desktop-xubuntu/
sudo apt purge xubuntu-desktop xubuntu-icon-theme xfce4-*
sudo apt purge plymouth-theme-xubuntu-logo plymouth-theme-xubuntu-text
sudo apt autoremove
Plus some things I'd specifically installed such as compton, gnome-software, etc.
Following https://forum.manjaro.org/t/where-can-the-transparency-of-the-kde-panel-be-set/50219/8 and using https://store.kde.org/p/1178558/ as an example I copied panel-background.svgz and background.svgz from /usr/share/plasma/desktoptheme/default/widget and /usr/share/plasma/desktoptheme/default/dialogs respectively to equivalent 'widget' and 'dialogs' folders in ~/.local/share/plasma/desktoptheme/breeze-edit and created a bare-bones metadata.desktop in the root of that folder
[Desktop Entry] Name=Breeze-Edit Comment=Breeze with the panel and dialogs modified to be opaque.
The file is here if you want it. You can edit other .svgz files if you really hate transparency, but it was the panel and application menu I found it distracting on. Everything else falls back to the default theme, Breeze.
I've kept my frankensteined icon theme but modified ~/.local/share/icons/admech-icons-(elementary+faenza)/index.theme by specifying Inherits=adwaita,gnome,hicolor,breeze since adding Breeze as a final fallback for icons means that the rarer Plasma symbolic icons aren't missing from settings windows.
Rather than panel icons and shortcuts, I've stuck to binding useful commands to shortcuts. For example, Ctrl+Win+ F1 to F3 handle the multi-monitor setup;
sh -c "xrandr --output VGA1 --auto --output HDMI3 --auto ; xrandr --output VGA1 –off"
sh -c "xrandr --output HDMI3 --primary --auto --output VGA1 --auto --below HDMI3"
sh -c "xrandr --output VGA1 --auto --output HDMI3 --auto ; xrandr --output HDMI3 –off"
One thing I particularly liked about my previous desktop environment was that locking the screen immediately suspended the monitor, so adapting a tip from this forum thread I've bound Win+L to:
qdbus org.freedesktop.ScreenSaver /ScreenSaver Lock && xset dpms force off
There is a gotcha with switching desktop environments it would be wise to pay attention to if you're going from a Gnome/GTK one to a KDE/Qt type one: some software will store passwords encrypted in the desktop environment's secure area;
https://askubuntu.com/questions/525019/where-are-my-browser-passwords-stored
"Chromium chooses which store to use automatically, based on your desktop environment. Passwords stored in GNOME Keyring or KWallet are encrypted on disk, and access to them is controlled by dedicated daemon software. Passwords stored in plain text are not encrypted. Because of this, when either GNOME Keyring or KWallet is in use, any unencrypted passwords that have been stored previously are automatically moved into the encrypted store."
Apparently it's possible to force Chrome or other browsers to use a particular mechanism, but I didn't have much luck with this. In the process I tried setting up some specific shortcuts specifying command line parameters and inadvertently broke link handling. https://bugs.kde.org/show_bug.cgi?id=400006 notes that you need to remember include %U on chrome shortcuts to avoid this.
If you like taskbar popup previews (I don't, I turned them off) it's possible to turn them on for all taskbar app items, but with a caveat this can prevent applications from suspending things if they aren't visible; https://old.reddit.com/r/kde/comments/5pq0ta/kde_plasma_not_showing_windows_previews_in_task/
It appears that in tidying up .desktop files I broke the 'Software Sources' button in Discover, but reinstalling software-properties-kde sorted this out so that it prompts for admin rights.
If you find KDE's layout of Save / Cancel buttons on dialogue windows problematic or otherwise prefer different layouts, you might like to know that Qt (by installing qt5ct) allows you to configure this, even Windows-like layouts. You can also supposedly switch them around in GTK by adding gtk-alternative-button-order=1 to ~/.config/gtkrc-2.0 and to the [Settings] section of ~/.config/gtk-3.0/settings.ini but I haven't found this to work, so in the interest of consistency and because I've been using another DE for the last three plus years, I've gone with the GTK order in Qt.
The only unresolved minor irritation so far is that some system tray icons are a bit blurry... I've seen comments that this is because some applications don't offer the icon size the panel wants by default, that it's the difference between the task manager window buttons using PNG and the tray trying to use SVG where available, and that is might be resolved by installing libappindicator3-1 (which already is). It isn't a problem with KDocker, which can remember a custom icon per app, and isn't a big problem full stop. I'll keep investigating.
All in all, KDE Plasma seems to have a large community, active development, positive ideals and probably won't arbitrarily break things I care about much soon. A quick run through some recent news;
https://www.omgubuntu.co.uk/2020/01/kde-plasma-plans-a-new-look-new-menu-for-2020
https://www.omgubuntu.co.uk/2019/12/kde-gtk-csd-integrated
https://www.omgubuntu.co.uk/2019/10/kde-goals-wayland-apps-consistency
https://www.omgubuntu.co.uk/2019/10/kde-plasma-5-17-features
And more nice stuff is coming https://dot.kde.org/2020/01/16/plasma-518-lts-beta / https://kde.org/announcements/plasma-5.17.90
This isn't to say the project doesn't have to deal with external drama, eg the very recent
https://valdyas.org/fading/software/about-qt-offering-changes-2020/
https://tsdgeos.blogspot.com/2020/01/the-qt-company-is-stopping-qt-lts.html
http://www.mardy.it/blog/2020/01/theqtcompany-and-a-silly-decision-waiting-to-be-reverted.html
But KDE is a much bigger project than Xfce, as the press page suggests; https://kde.org/presspage/ -- it's of similar mid-to-late-90s vintage, but surviving and thriving into the "millions of users" category. Importantly, they have fairly large governance structures (and lawyers) and reading https://ev.kde.org/reports/ev-2018/ and https://timeline.kde.org/ it's hard not to be impressed.
💬 Comments are off, but you can use the mail form to contact or see the about page for social media links.