How can I set default virtual desktop in KDE?

I have nine virtual desktops (3 rows and 3 columns), and KDE always starts with top-left virtual desktop, and I want to start with center one.

(I have Arch Linux with KDE Plasma 5.12 installed.)

1 Answer 1


It looks like this isn't natively supported through configuration in KDE/Plasma, however, a forum post here suggests a way to accomplish what you're looking for by using the wmctrl tool in an autostart script to programatically set the desired virtual desktop.

  1. sudo apt-get install wmctrl
  2. Run wmctrl -d to list the available vistual desktops. In a 3x3 grid, the centre desktop is probably number 4
  3. Create an autostart file in ~/.config/autostart/setvd1.desktop with this content:

    [Desktop Entry]
    Exec=sleep 5; wmctrl -s 4
    Name=Set VD #1
  • 1
    Thank you, it worked. Only one thing is that I replaced path ~/.kde/share/autostart/ with ~/.config/autostart/, probably you should replace this path in your answer too. And maybe you will add some info about sleep 5 command: does it mean that startup will always take 5 seconds longer than before?
    – diralik
    Commented Jan 28, 2019 at 14:44
  • 2
    Indeed, ~/.config/autostart/ is the freedesktop.org standard for autostart files. I've updated my answer accordingly. My guess it that the sleep 5 is there to ensure that the subsystem that wmctrl talks to is initialized before trying to set the virtual desktop. It shouldn't, to my knowledge, delay startup. It will only delay switching virtual desktop, which may not be noticeable at all
    – noelob
    Commented Jan 29, 2019 at 23:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .