Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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 have a program that interprets the input from my mouse and provides multitouch gestures. I wrote it using a game engine, which always creates a window when it runs. I'd like to run this program without seeing the window, so this is the point of the questions:

Can invoke a graphical program but have the window hidden?

By hidden I mean anything that keeps me from encountering the window on my desktop. So I would accept something like, "open on a different, previously non-existant screen."

share|improve this question
Which Desktop Environment? What language did you use to write the code? – wojox Mar 31 '12 at 18:45
I am interested in both Gnome and Ubuntu Unity desktop environments. As for languages, I will accept nearly anything, as I don't mind writing a tool in one that I can invoke in another. If you must have one, assume BASH. – Willi Ballenthin Apr 1 '12 at 20:10
Are you still looking for help with this or have you solved the problem? – coversnail Apr 5 '12 at 15:27
I would still like to know if this is possible. – Willi Ballenthin Apr 5 '12 at 18:01

The tool devilspie (available in 12.04 from repository) can act on new or already present windows, in a way at least similar to what you want.

You will need to create a configuration file, by convention something like .devilspie/my-app.ds. The configuration language is funky lisp-style poorly-documented abomination, but should be able to do what you want.

You need a way to (i) identify your window and (ii) decide on the action. If, for example, your window's title happened to contain "my-app" and you wanted to always put that window on 2nd workspace, this file would contain:

(if (contains (application_name) "my-app") (set_workspace 2))

Next, start it: devilspie -a ~/.devilspie/my-app.ds, and it should act on current and future windows (without -a only on future windows).

This might not be exactly what you want, for example (minimize) instead of (set_workspace 2) perhaps suits you better. The man page has a listing of all the symbols and their meanings, I hope you find a solution there.

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.