Xfce Forum

Sub domains
 

You are not logged in.

#1 2025-09-07 12:43:44

KitchM
Member
Registered: 2009-08-15
Posts: 393
LinuxFirefox 142.0

Workspace Designation On Login

Is it possible to change to a specific workspace when logging into the desktop?

Last edited by KitchM (2025-09-07 12:44:10)

Offline

#2 2025-09-07 13:59:12

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 12,380
LinuxFirefox 142.0

Re: Workspace Designation On Login

You can use wmctrl to change workspaces:

wmctrl -s WORKSPACE#

...where WORKSPACE# is the number of the workspace to change to (starting at 0).

You can add this to your application startup. You might need to add a delay in case the window manager doesn't start up quickly enough, so something like:

sh -c "sleep 1 && wmctrl -s 2"

Mark solved threads as [SOLVED] to make it easier for others to find solutions.
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2025-09-07 14:27:27

KitchM
Member
Registered: 2009-08-15
Posts: 393
LinuxFirefox 142.0

Re: Workspace Designation On Login

So, something like this in a terminal situation:
firefox -P wmctrl -s WORKSPACE3 sh -c "sleep 1 && wmctrl -s 2"

Is that the idea?

Offline

#4 2025-09-07 15:02:25

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 12,380
LinuxFirefox 142.0

Re: Workspace Designation On Login

No, it was to change the workspace only. If you want to start an application in a different workspace, refer to your other thread about devilspie2. It would be something like:

if (get_window_name()=="firefox") then
   set_window_workspace(2);
end

Mark solved threads as [SOLVED] to make it easier for others to find solutions.
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#5 2025-09-07 18:51:31

KitchM
Member
Registered: 2009-08-15
Posts: 393
LinuxFirefox 142.0

Re: Workspace Designation On Login

Does devilspie2 just watch in the background for windows to be created?  If so, does it just match a window's program with any directions it has for that program in its scripts?

Offline

#6 2025-09-07 19:01:06

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 12,380
LinuxFirefox 142.0

Re: Workspace Designation On Login

Yes and yes. You need to be running the devilspie2 executable so it does the listening.


Mark solved threads as [SOLVED] to make it easier for others to find solutions.
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#7 2025-09-07 19:06:56

KitchM
Member
Registered: 2009-08-15
Posts: 393
LinuxFirefox 142.0

Re: Workspace Designation On Login

Now that is so cool!  Why don't they just say that in the various places it is described? I have read at least a dozen places on that topic, as well as the programmer's own page, and I didn't get that.

And starting it is as simple as adding it to the Settings>Settings Manager>Session and Startup>Application Autostart?  How do I add it early enough to do some good for apps loading after that point?

Offline

#8 2025-09-09 19:53:56

KitchM
Member
Registered: 2009-08-15
Posts: 393
LinuxFirefox 142.0

Re: Workspace Designation On Login

Devilspie2 has some interesting features.  One is to put a program on a particular workspace and then follow it there.  That would likely solve the problem.  I'll keep you all posted on my results in testing this all out.

Offline

#9 2025-09-23 20:43:39

KitchM
Member
Registered: 2009-08-15
Posts: 393
LinuxFirefox 143.0

Re: Workspace Designation On Login

This subject ties in well with my post at https://forum.xfce.org/viewtopic.php?id=18802.

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.011 seconds, 7 queries executed - Memory usage: 570.02 KiB (Peak: 587.3 KiB) ]