Skip to content

Instantly share code, notes, and snippets.

@Joao-Peterson
Created October 19, 2022 21:25
Show Gist options
  • Save Joao-Peterson/915aeefc121c3a627c038ae2e1a80986 to your computer and use it in GitHub Desktop.
Save Joao-Peterson/915aeefc121c3a627c038ae2e1a80986 to your computer and use it in GitHub Desktop.
KDE plasma taskbar fix on display change

KDE plasma taskbar fix on display change

Recently i connected another display to my laptop, and after putting it in sleep mode and then removing the HDMI cable and after opening it up again i found my KDE plasma desktop missing, the taskbar, widgets and other "plasmoid" thingys, they were in the now disconnected display, even if it was not there.

For a fix i altered the following files on the premisse that KDE stores a lastdisplay property in a config file as means to remember where things belong, and in this sleep/disconnect thing this property did not got updated as it should.

The fix was to alter the property manually in the KDE plasma desktop file, it stores all the widgets and plasmoids data.

Back up your files if you dont know what you are doing!

$ cp ~/.config/plasma-org.kde.plasma.desktop-appletsrc ~/.config/plasma-org.kde.plasma.desktop-appletsrc.back

Set lastScreen=0 for some Contaiments on ~/.config/plasma-org.kde.plasma.desktop-appletsrc:

...
[Containments][2]
activityId=
formfactor=2
immutability=1
lastScreen=0
location=3
plugin=org.kde.panel
wallpaperplugin=org.kde.image
...
[Containments][8]
activityId=
formfactor=2
immutability=1
lastScreen=0
location=3
plugin=org.kde.plasma.private.systemtray
wallpaperplugin=org.kde.image
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment