Virtual desktops at startup

Hi.
I run some aplicattions in the startup and I use virtual desktop but all the apllications open in startup en desktop 1.
I want the differente apllicante to star in diffente virtual desktop.
Any idea?
Thanks

I use Debian Trixie, sorry

You can set that in system settings. For example, let’s say I want audacious on a specific desktop. Open audacious, hit alt+F3. More actions. Special window settings ( something) In the window that pops up, add a property. Scroll down to virtual desktops.


Ps: you can do it in system settings>window management>window rules as well, but this is the easy way.

To be more accurate you must be on the apps title bar the do alt+F3 or simple right click on the apps titlebar. Now that said some apps rightclicking won’t work and you’ll have to use alt+F3. Then mouse to More Actions, Configure Special Application Settings. On the window that opens doublecleck detect display properties and then from that popup find what you need, select it, once added adjust it to you liking, click apply and then ok.

After you have set many virtual desktops all of them with window rules, you may add a script inside a new folder you create in .config/autostart/ so that on start up it will focus on a specific desktop with this content :
-sleep time depends on how long it takes to load all your applications on start
-5 is the position of your virtual desktop which you may find with ‘wmctrl -l’


#!/bin/bash
sleep 14 && wmctrl -s 5

For my initial set of applications I have been using a saved Plasma session.

I think by default it restores the last session but I switch to manually saved session.

With that I started an empty session once, started all my “initial apps” put the onto the activitiy/desktop/monitor where I want them to be and then saved this (application menu → leave → save session).

Works fine.
Thanks
Happy new Year from Argentina!
i am Happy.
Plasma is the best

1 Like

very interesting

Happy new year too man :wink:

Good if you session remains saved. I don’t know after certain updates from KDE. I choose to start an empty session with just a lot of application in autostart as I think it frees the zram dimininushing thus the risk of issues in certain unexpected circumstances but I may be wrong.