How to specify workspace when starting a program?

Chris Green chris at
Wed Jun 8 00:18:39 CEST 2005

On Tue, Jun 07, 2005 at 07:42:56PM +0200, Kristoffer wrote:
> hmm. i'm not sure i understand. if you open an app and move it to
> another workplace and click the xfce4 quit button and start it up again
> xfce4 will remember where all your open windows and in which workspace
> they should be in. i'm not sure if you start up another firefox window
> if it will go to the desktop you put firefox in though; but i think so.
What I want though is to start with the same layout every time, not to
start with the layout I left the last time I exited.

> in $HOME/Desktop/Autostart/ you can just put a bunch of scripts(*.sh)
> and xfce4 will execute them in the order they are listed with ls, i think
Yes, that's what I'm doing, well actually I just have my startup
commands in $HOME/Desktop/Autostart/default.

> if you want wmctrl to run with the specified options each time you start
> firefox, make a script( and run firefox with that instead of the
> usual 'firefox' or whatever it's called startup script.
This doesn't work.

If you do:-

    /usr/local/firefox/firefox &
    wmctrl -r firefox -t 1

then wmctrl runs and finishes long before firefox has got anywhere
near opening a window so wmctrl doesn't do anything for you.

I have also tried with utilities like xtoolwait, e.g.:-

    xtoolwait /usr/local/firefox/firefox
    wmctrl -r firefox -t 1

still doesn't work.

The wmctrl line works fine if you run it manually well after firefox
has started up but that rather defeats the object of the exercise!

Chris Green (chris at

    "Never ascribe to malice that which can be explained by incompetence."

More information about the Xfce mailing list