1

I'm using KDE Plasma, and I would like to disable cursor blinking in Qt5 applications (KWrite for example, but not only) thanks to the .so file in this git repo*, as there is no checkbox "disable cursor blinking" in the config panel :(

I've added an export LD_PRELOAD=/full/path/to/qt5noblink.so in my .bashrc file, but it only works for apps I launch from my shell, not when I doubleclick on a file.

Is there any way that Plasma globally takes care of this export line? (without rewriting all my executables: this previous question is not really what I'm looking for...) Thanks!

(*For tricks on cursor blinking for other desktop environment read this, it's gorgeous!)

  • Does KDE Plasma source your .login file when you log in to environment? – Andrew Henle May 7 '17 at 15:01
  • I do not have a ~/.login file, so... – ratnoz May 7 '17 at 15:28
  • 1
    You need to modify the startkde script, or ~/.xinitrc, I can't remember the exact file name, but you got it – daisy May 7 '17 at 15:52
  • It is usually a bad idea to set a global LD_PRELOAD – daisy May 7 '17 at 15:52
  • I've created a file here: /etc/plasma/startup/15-no-cursor-blinking.sh with the export statment, and it works! It's surely a bad idea, but still the only way... – ratnoz May 7 '17 at 16:01
1

.bashrc is only read when you run an interactive shell. It's the wrong place to set environment variables: as you've discovered they are only set in applications started through an interactive shell.

To set an environment variable for your whole session, on most systems, you can set it in ~/.profile. Since you're using KDE, a better place might be ~/.config/plasma-workspace/env/preload.sh. This way the variable would be set only if you log in under KDE, not if you select another GUI environment or if you log in in text mode (e.g. over the network). Beware, however, that setting LD_PRELOAD very broadly can be dangerous: the library will be loaded into every single program that you run, not just into programs using the Qt library. This one looks harmless enough though.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.