Bold font in KDE konsole

To get a bold font in Konsole, do this:

  • First, create a new Profil
  • Edit the profile to use DejaVu Sans Mono, Size and Style doesn’t matter
  • Save it and close Konsole
  • Edit $HOME/.local/share/konsole/<Profile Name>
  • Add or replace the Font Entry under Appearance with
Font=DejaVu Sans Mono,9,-1,0,75,0,0,0,0,0,Bold
  • Now edit $HOME/.config/konsolerc and add
[Desktop Entry] 
DefaultProfile=<Profile Name>
  • Replace [Favorite Profiles] with
[Favorite Profiles] 
Favorites=

Kill all instances of Konsole, start it and never touch that stuff again!

DBUS Crap

After today’s (2017/06/16) usual pacman -Syu & systemctl reboot the shit hit the fan. SDDM started up fine, but when I tried to login, nothing happened for a while until I got a nice X11-Widget right from the 80’s telling me that something “could not sync environment to dbus”. Yeah, sure! WTF!?

First stop: Google. I’m not the only one. For some reason I can’t just “startkde” any more, but have to use “dbus-launch startkde” in /usr/share/xsessions/plasma.desktop (that’s where SDDM gets the sessions from). Easy enough. KDE loads and seems to work, but it doesn’t really. Any connection attempt to the session bus fails: can’t connect to the ssh-agent even though it’s started, can’t do systemctl –user <something>, pulseaudio doesn’t work and so on… Craptastic!

Maybe it’s some cruft in ~/.config or ~/.session. Move both away, and just to make sure, ~/.cache, too. One swift reboot later it’s work… Fuck, same shit! While skimming through wiki-pages and forum-posts on my mobile, I read the suggestion to try a new user. OK, can’t hurt, can it?

Yes, it kinda can! Of course that works! Well, at least one way out. So, create a new user and port all settings there. Oh what fun! Well, I learned a lot of lessons, like:

  • If you have an USB2 stick plugged in, entering the UEFI-Crap-Thingy what’s now called BIOS doesn’t work (or takes an eternity, maybe I didn’t wait long enough). At least it still boots if you don’t hit DEL or F2
  • The ssh-agent.service for users is hand-crafted (or stolen from somewhere, I don’t remember). You must have $SSH_AUTH_SOCK set in your .bashrc (the latter is sourced by SDDM, BTW) to make it work.
  • Sometimes it ain’t so bad to have Google accounts. After logging in with Chromium, my bookmarks and extensions were back almost immediately.
  • To start a synergy Server, all you have to do is “systemctl –user enable synergys.service”, if you have a working config in /etc/synergys.conf. Starting the client is another beast, though…
  • How to copy and modify the beet database (stored in $HOME/.config/beets/musiclib.blb in my case):
$ ~/.config/beets $ sqlite3 musiclib.blb
SQLite version 3.19.3 2017-06-08 14:26:16 
Enter ".help" for usage hints. 
sqlite> update items set path = replace(path, '<oldhome>', '<newhome>');
  • You don’t have to fire up QtCreator if rdpk starts and exits immediately. If you tell xfreerdp to use pulseaudio and there’s no daemon running, it will do just that…
  • For some reason, letting minidlnad reindex everything is much, much faster than letting it read the database on startup
  • LibreOffice macros are stored in $HOME/.config/libreoffice/4/user/basic/Standard/Module1.xba for now. You can just copy that file to the new $HOME and have fun with it after restarting it

Maybe it was a good thing ™ to get rid of all the baggage, I don’t know… Sure enough, it happened on othalla, too 🙁

KGlobalAccel

This definitely merits a post. While working on my Qt Audio Player (BeetPlayer), I wanted control it via the Media Keys of my Keyboard. Since I’m using KDE on Linux, I quickly found out about KGlobalAccel.

Unfortunately, there’s no decent documentation available. The API docs are kinda useless, and there’s no tutorial available, at least not with my Google foo, so here is how it works:

First and foremost, set QObject::objectName() for the QAction you want to register. It should be unique!

Don’t forget to change your CMake file or your .pro-File if you’re using qmake.

Then register a shortcut with KGlobalAccel::self()->setShortcut() like this:

QAction *muteA = new QAction(QIcon(":/mute.png"), tr("Mute"), this); 
muteA->setObjectName("beetPlayerMute"); 
connect(muteA, SIGNAL(triggered(bool)), this, SLOT(mute(bool))); 
KGlobalAccel::self()->setShortcut(muteA, QList<QKeySequence>() << QKeySequence(Qt::Key_VolumeMute), KGlobalAccel
::Autoloading);

After that launch KDE System Settings->Shortcuts->Global Shortcuts. There should be an entry for your Application. Select it and set the shortcut. Haven’t figured out how a default shortcut, but it doesn’t really matter when it shows up there.

Restart KDE

When plasmashell crashes, restart it like this without logging out:

$ kquitapp plasmashell ; sleep 3 ; plasmashell --shut-up &

If that doesn’t work, kill the process plasmashell with SIGKILL.

If KWin doesn’t work any more, restart it with:

$ kwin_x11 --replace 2>&1 > /dev/null &

 

Back to KDE

What happened?

Some things were just too annoying with awesome:

  • cvlc -f not opening full screen, just sometimes, completely at random. When  it didn’t, it froze.  When it did, it slowed down everything. First I thought that it had  something to do with VDPAU  and tried to turn it off, but I didn’t even get that far.
  • Maximizing a youtube-video in Chromium seemed to freeze the screen. Eventually I figured out that awesome decided to open it in the background or something. Surprisingly, maximizing the window in that state raised it. Learned that by accident.
  • ffplay and mplayer windows centered right where they shouldn’t: between both screens.

Overall, a tiling window manager is nice when  you use X just as a console multiplexer, but if you want more, the disadvantages outweigh the advantages.

So I decided to give KDE another shot. I used it before, but eventually got annoyed by all the useless crap I don’t want nor need, like Akonadi or Nepomuk.

The Experience

So I replaced

exec awesome

with

exec startkde

in my .xinitrc. First thing I noticed was my CPU fan spinning up. Baloo_file decided to have my 6 CPUs work overtime. I found out that it is the new file indexer of the KDE framework. Don’t want it, don’t need it, but easily fixed. Just turn  off the Desktop Search in System Settings. For good measure I also added

chmod -x /usr/bin/baloo_file

Other than that I’m quite happy with it. cvlc -f  always starts full screen again, and a tabbed Konsole is so much nicer than a tiled urxvt 🙂 Chromium and youtube also work as  expected again.

What I miss

What I really miss is separate desktops per screen, but from what I read that won’t be implemented soon, if ever. Well, you can’t have everything. Fortunately I found workarounds for most cases.