Probably the reason I can not find it on the web might be that it is so obvious, but I still can not figure it out:
How can I configure XFCE so that a specific program window always automatically opens on the (e.g.) second virtual desktop?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
Most window managers don't offer this functionality. You can run Devil's Pie to perform actions when a window is created, such as sending that window to another workspace. With Devil's Pie 1, create a file
~/.devilspie/myprogram.ds containing something like
(if (and (is (application_name) "specific-program") (matches (window_name) "^Program main window:")) (set_workspace 2))
With Devil's Pie 2, create a file
~/.devilspie2/myprogram.ds containing something like
if (get_application_name() == "specific-program" and string.strfind(get_window_name(), "Program main window") == 1) then set_workspace(2); end
I'm not sure if you can start it in the other workspace, but you can move it there with a script.
Have a look at this page: https://wiki.xfce.org/faq, at the subitem "How do I programmatically switch workspaces, move windows, etc?"
So you could start your program with a simple shell script like:
#!/bin/sh yourprogram & PID="$!" #echo $PID sleep 1s #sleep is required because the window takes some time to open, maybe it can be adjusted WINH="$(wmctrl -l -p | grep "$PID" | cut -d " " -f1)" #echo $WINH wmctrl -i -r $WINH -t 2
Its not ideal as the process may have multiple windows (no idea what would happen then), but it should work for simple programs.