I want to startup an always run but seldom actually used application to start on another workspace, so I don't have to manually do it each session start.
Can this be done, and if so, how?
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community
First, thanks to Scott Severance I found out how to do this. But I wanted to flesh out his answer to make it easier for new Ubuntu users.
Note: This works with Metacity window manager, the default window manager for Ubuntu desktop.
First download and install gDevilspie (I used Ubuntu Software Center)
When I tried to run it, it failed. But thanks to AskUbuntu I found the fix...
sudo apt-get install python-glade2
So start the application so its window is open, then fire up gDevilspie...
Click the ✔box so the daemon will startup at launch and then hit the add button...
Now give our rule a name.
Then identify the application's window for the new rule using its properties. Two ways to do this:
Hit the Get button and be presented with a list of window_names, or
Find the window_class using
The 2nd way is safer because window name can change. Open a terminal and type in xprop | grep WM_CLASS The mouse cursor will change to a plus. Move the new cursor so it's over the desired application window, and click it. The wm_class will appear in the terminal...
-@-:~$ xprop | grep WM_CLASS WM_CLASS(STRING) = "skype", "Skype"
Now click the Actions tab, and check the ✔box for set workspace then set the desired workspace...
If you like, check out the rule...
Now save the rule using the Save button...
And start the daemon if it's not running already.
Note: You can do lots with gDevilspie (
devilspie). Places for more information:
Knock yourself out!
sudo apt install wmctrl
And create a script (in this example thunderbird on the second workspace (
#!/bin/sh (thunderbird &) & sleep 5 && sh -c "wmctrl -i -r `wmctrl -l | grep Thunderbird` -t 1"
To know your application name on wmctrl you can view it by taping on your terminal :
And replace it with the correct name in the script.
Be carrefull with the capital letter ("Thunderbird" not "thunderbird") !!
Other example with firefox on the 3d workspace (
#!/bin/sh (firefox &) & sleep 5 && sh -c "wmctrl -i -r `wmctrl -l | grep Firefox` -t 2"
Here is the command to execute at start-up :
sh -c "thunderbird & sleep 5 && wmctrl -i -r `wmctrl -l | grep Thunderbird` -t 1"
Work on Debain 10 with Cinnamon. But should work for all