Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm now using .xsession to run my terminal/browser while xmonad is starting. What i'd want to be able to do is to start different programs on different virtual desktops in xmonad (eg browser on desktop 1, nautilus desktop 2). How can i do this in xmonad?

share|improve this question
See this answer on SO – jasonwryan Jun 10 '12 at 21:07
up vote 1 down vote accepted

A tool solving your problem

Devil's Pie can do that, and it is not specific to xmonad, should work with all window managers.

From http://burtonini.com/blog/computers/devilspie/ :

Devil's Pie can be configured to detect windows as they are created, and match the window to a set of rules. If the window matches the rules, it can perform a series of actions on that window. For example, I can make all windows created by X-Chat appear on all workspaces, and the main Gkrellm1 window does not appear in the pager or task list.

You can set it up to redirect browser to desktop 1, nautilus to desktop 2, etc.

How to use it

You can do that editing text files, read e.g. http://www.foosel.org/linux/devilspie , or with a graphical tool http://code.google.com/p/gdevilspie/ .

Additional information

If you just meant to move window to desktop only at session start time, and not later, you can have your .xsession script launch devil's pie, then your applications, then kill devil's pie, and voilà.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.