Configuration notes: KDE Plasma 5
Last modified: 2022-06-18 09:16
Configuration of KDE is scattered across hundreds, if not thousands, of
hidden files that accumulate under your home directory. There is no way to
export a KDE configuration except to bulk copy these files and hope for the
best. Ideally, configuration would all be in ~/.config (XDG_CONFIG_HOME),
but some important things, like Konsole profiles, are stored in
~/.local/share (XDG_DATA_HOME). If copying those files still isn't enough,
the missing pieces could be in ~/.local/state (XDG_STATE_HOME), ~/.cache
(XDG_CACHE_HOME), or ~/.kde.
The important files are comingled with all kinds of unrelated flotsam and
jetsam from which they are not easily distinguished or separated. Nothing
that uses these directories cleans up after itself. XDG_*_HOME is a
reinvention of the square wheel known as Windows Registry: an unregulated
garbage dump that is dangerous to clean and that only gets bigger and worse
over time until it catches fire and you have to start again.
Some of the config files get hardcoded paths to your home directory and
have to be patched if they are copied to another account.
Following is my record of important changes to the default configuration
given in Slackware 15.0 in case it becomes necessary to repeat them.
Make sure that any non-distro apps that will get shortcuts are installed
in /usr/local, including but not limited to Firefox, Psensor, and beep.
Do this first because QWERTY is a pain:
- System Settings (sliders icon near bottom left)
- Hardware
- Input Devices
- Layouts
- Configure layouts
- + Add
- Layout = English (US)
- Variant = English (Dvorak)
- Display and Monitor
- Compositor
- Make sure OpenGL is enabled (look for nasty message about it being disabled because of a crash)
Then the rest:
- Remove unwanted icons from desktop by right click, Move to Trash. (You can trash the Trash icon this way.)
- Right click the task bar
- Show Alternatives... and switch to Task Manager (from Icons-Only Task Manager) [Footnote 1]
- Configure Task Manager...
- Behavior
- Show only tasks
- From current screen = off
- From current desktop = off
- From current activity = off
- That are minimized = off
- Enter Edit Mode
- Panel height = 26
- Move the Pager (currently only appearing as an empty box in edit mode) from the right side to the left (just right of Application Launcher)
- Right click the clock in the task bar
- Configure Digital Clock...
- Appearance
- Information: Show date = on, Always beside time
- Show time zone = Always
- Display time zone as = Code
- Time display = 24-Hour
- Date format = Custom, ddd MMM d
- System Settings (sliders icon near bottom left)
- Appearance
- Workspace
- Workspace Behavior
- Desktop Effects
- Screen Edges
- Maximize: Windows dragged to top edge = off
- Switch desktop on edge = Always Enabled
- Screen Locking
- Lock screen automatically
- After idle time = off
- After waking from sleep = off
- Virtual Desktops
- Rows = 2
- + Add until there are 6 desktops
- Name them Desktop [1-6]
- Options
- Navigation wraps around = off
- Show animation when switching = off
- Show on-screen display when switching = off
- Window Management
- Window Behavior
- Focus
- Window activation policy = Focus follows mouse
- Titlebar Actions
- Maximize Button Actions
- Left click = Vertically maximize
- Middle click = Horizontally maximize
- Right click = Maximize
- Movement
- Window geometry: Display when moving or resizing = on
- Window Rules
- + Add New...
- Description = Window settings for log konsoles
- Window class (application) = Exact Match, konsole
- + Add Property...
- Window matching
- Window title, click the +
- Window title = Regular Expression, ((info)|(messages)).*Konsole [Footnote 2]
- + Add Property...
- Arrangement & Access
- Skip taskbar, click the +
- Skip taskbar = Force, Yes
- + Add New...
- Description = Emacs keys
- Window class (application) = Substring Match, emacs
- + Add Property...
- Appearance & Fixes
- Ignore global shortcuts, click the +
- Ignore global shortcuts = Force, Yes
- Shortcuts
- System Services
- KWin [Footnotes 3 & 4]
- Make Window Fullscreen = F12
- Close Window = Ctrl-F12
- Kill Window = Shift-Ctrl-F12
- Startup and Shutdown
- Autostart
- + Add...
- + Add Login Script...
- Add bash script to launch log windows [Footnote 5]
- Background Services
- Desktop Session
- When logging in = Start with an empty session
- Personalization
- Notifications
- Applications: Configure...
- System Services
- KWin Window Manager
- Configure Events...
- Graphics Reset
- Uncheck everything [Footnote 6]
- Applications
- File Associations
- This is a disaster. There are thousands of them, they're all WRONG, and there's no way to assign them by category (like audio, text, etc.).
- Default Applications
- Web browser = Firefox
- File manager = Dolphin [Footnote 7]
- Email client = Thunderbird
- Terminal emulator = Konsole
Launch Dolphin (File Manager, Manila folder icon)
- 3 lines menu in upper right
- Configure
- Configure Dolphin...
- Trash
- Delete files older than 1 day
Launch Konsole
- Ctrl + Shift + m to show the menu bar
- Right click on the menu bar
- Main Toolbar = off
- Session Toolbar = off
- Settings
- Configure Notifications...
- Bell in Focused Session
- Run command = /usr/local/basics/bin/beep -f 1000
- Uncheck everything else
- Bell in Non-Focused Session
- Run command = /usr/local/basics/bin/beep -f 1000
- Uncheck everything else
- Configure Konsole...
- General
- Process and window
- Remember window size = off
- Profiles
- + New...
- General
- Name = Normal
- Default profile = on
- Initial terminal size = 80 x 24
- Terminal bell mode = Visual Bell
- Appearance
- Color scheme & font
- Click on Black on Light Yellow, then + New...
- Description = Normal Color Scheme
- Background = #D2B48C, #D2BFA7, #D2CBC2
- Font = Liberation Mono 12pt
- Scrolling
- Scrollback: Fixed size = 10000 lines
- Scrollbar position = Left side
- Click on Normal (default), then + New...
- General
- Advanced
- Default character encoding = Western European > ISO 8859-1
- Click on Normal (default), then + New...
- General
- Appearance
- Color scheme & font
- Font = Liberation Mono 7pt
- Click on Normal (default), then + New...
- General
- Name = Beeping
- Terminal bell mode = System Notifications
Right click the task bar
Right click the empty panel
- Enter Edit Mode
- Screen Edge, drag to right side
- Panel width = 26
- More Options...
- Visibility = Windows Can Cover
- + Add Widgets...
- Konsole Profiles (drag to side bar)
For each additional command [Footnote 8]
- Right click desktop
- Create New
- Link to Application...
- General
- Application
- Name = name it
- Command = full command line
- Optional:
- Drag new icon onto the side bar
- Delete icon from desktop
Right click the side panel
- Enter Edit Mode
- Drag the bottom edge arrow up to fit to contents
[Footnote 1] Task Manager emulates the old Windows task bar with a bar for
each window and title text inside. Icons-Only Task Manager is the new
style with just icons.
[Footnote 2] The extra parentheses were necessary to make it match both
strings. Lots of luck finding the documentation to prove that regex is not
working as designed.
[Footnote 3] It seems that you have to Apply and then use the caret ^ to
roll up the key selection dialog or the setting won't stick. Make sure it
takes effect and try again if it did not.
[Footnote 4] Confirm the taking of key combinations from previous
assignments as applicable. Ctrl-Alt-F12 is reserved for virtual console
switching and cannot be taken.
[Footnote 5] This is logterms.sh:
#!/bin/bash
konsole --profile 'Small font' --hide-menubar --hide-tabbar -p terminalrows=7 --qwindowgeometry +0+0 -p tabtitle=info -e tail -f /var/log/info &
konsole --profile 'Small font' --hide-menubar --hide-tabbar -p terminalrows=7 --qwindowgeometry +0+111 -p tabtitle=messages -e tail -f /var/log/messages &
It is possible to get one konsole with two panes, but it was more trouble
than it was worth.
[Footnote 6] I get these every time I resume from sleep mode.
[Footnote 7] Dolphin is KDE's simple default file manager. Krusader is an
alternative "Commander-like" file manager with more functions and less
pretty. Konqueror is the KDE web browser, also usable as a file manager.
Thunar is the Xfce file manager.
[Footnote 8] Additional commands include:
- Firefox
- Emacs
- Latin-1 Konsole (LANG=en_US konsole --profile Latin-1)
- UTF-8 Konsole
- Psensor
- BiBTeX documentation (okular /usr/local/share/doc/bibtex/btxdoc.dvi)
- Thunderbird
- For each relevant news feed, mpv --profile=news 'ytdl://ytsearch1:some news livestream' &>> ~/unkodi.log
In the case of apps whose default launchers are already present and
satisfactory (Emacs, Thunderbird, default Konsole), you can just drag the
icon from the "start menu" in the lower left corner all the way to the side
panel.
Post-deployment
Certain things have to be set individually after the template is copied
in.
- Configure audio devices.
- Disable background services that are not applicable on this particular
device, like WiFi, Bluetooth, or touchpad.
- For accounts where secrets are likely to end up on the clipboard,
configure Klipper settings, uncheck "Save clipboard contents on exit" and
maybe reduce the clipboard history size. Also delete
.local/share/klipper/history2.lst.
- For dubious benefit, change System Settings > Hardware > Display
and Monitor > Compositor > Rendering backend from the default of
OpenGL 2.0 to OpenGL 3.1 or whatever.
- Fix System Settings > Personalization > Applications >
File Associations until the cows come home.
Unsolved problems
There seems to be no support for the PC speaker. "System Bell" in Konsole
is routed to PulseAudio; I worked around with a custom command. Xterms using
XWayland cannot beep at all; XWayland might not implement it.
The system of "Links to Applications" is obscure and error-prone. It's
never clear whether you are creating a new one, cloning an existing one, or
destructively changing an existing one such that every other instance will
change irretrievably.
Additional notes
- Hover previews of tasks on the task bar work in X11 but not in Wayland
- ~/.config/session gets 1 new garbage file on every launch
- Logs are full of spam from dbus-daemon, pulseaudio, and polkitd
- Activities are useless, but KWin won't run without libKF5Activities.so
- KWin does not distinguish mash or directional swipe from plain old click for titlebar buttons, so FVWM* configurations are untranslatable
- None of the widgets was a satisfactory replacement for FvwmTaskBarSwallow xload, or for psensor
- Most window ops can be triggered by clicking somewhere, somehow on the
title bar of a window. Kill Window cannot, but is instead triggered with a
KWin shortcut.
- There's no Identify Window function that you can bind to a menu or
button, but a similar function is buried under the tiny icon in the left
corner of a window's title bar > More Actions > Configure Special
Window Settings... > Detect Window Properties. Select the window to get
info, then cancel out of everything.
- The Quicklaunch widget gave me problems in the sidebar. It does not let
you edit the shortcuts. It makes the icons smaller.
- KDE can launch an alarming number of processes and always leaves junk running after it exits, such as:
- /usr/lib64/libexec/startplasma-waylandsession
- /usr/bin/pulseaudio --start --log-target=syslog
- gpg-agent --homedir /home/user/.gnupg --use-standard-socket --daemon
- dirmngr --daemon --homedir /home/user/.gnupg
- /usr/bin/xprop -root -remove KDE_FULL_SESSION
KB
Home