GNOME Shell Auto Move Windows extension can be used to get some applications to always start on a specific workspace. The extension is not new, but it is a bit difficult to use so I though I'd write a post explaining exactly how to get it working (tested on Ubuntu 11.10 Oneiric Ocelot and Fedora 15).
Install GNOME Shell Auto Move Windows
GNOME Shell Auto Move Windows is an official extension so it's available in the Fedora, Arch Linux (AUR), etc. repositories.
To install it in Fedora, use the command below:
sudo yum install gnome-shell-extension-auto-move-windows
In Ubuntu, install it using the following commands:
sudo add-apt-repository ppa:webupd8team/gnome3 sudo apt-get update
- For Ubuntu 11.10:
sudo apt-get install gnome-shell-extensions-auto-move-windows
- For Ubuntu 12.04:
sudo apt-get install gnome-shell-extensions
The WebUpd8 GNOME 3 PPA provides all the official GNOME Shell extensions. For more info, see: Official GNOME Shell Extensions Available In The WebUpd8 GNOME 3 PPA For Ubuntu 11.10
2. Once installed, you need to tweak the extension version so open a terminal and paste the following command:
gksu gedit /firstname.lastname@example.org/metadata.json
And in this file, change the "shell-version" to your GNOME Shell version (Oneiric currently uses 22.214.171.124 at the time I'm writing this). You can find out the exact GNOME Shell version by running the following command in a terminal:
Then save the file and restart GNOME Shell or log out and log back in.
3. Now make sure the extension is enabled in GNOME Tweak Tool (for some reason, in my tests all extensions are disabled by default in GNOME Tweak Tool under Ubuntu 11.10 Oneiric Ocelot). If you haven't installed GNOME Tweak Tool yet, do it using the command below:
sudo apt-get install gnome-tweak-tool
Using GNOME Shell Auto Move Windows extension to make applications start on a certain workspace
To get some applications to start on specific workspaces in GNOME Shell, use the command below in a terminal:
gsettings set org.gnome.shell.extensions.auto-move-windows application-list "['APPLICATION.desktop:WORKSPACE-NUMBER','ANOTHER-APPLICATION.desktop:WORKSPACE-NUMBER']"
- "APPLICATION.desktop" is the .desktop filename for an application which can be found in /usr/share/applications/. For example, the Firefox .desktop file under Fedora 15 is called "mozilla-firefox.desktop" while in Ubuntu it's called "firefox.desktop", etc. You can find out the exact names by going to /usr/share/applications or by running the following command in a terminal: "ls /usr/share/applications | grep APPLICATION"
- "WORKSPACE-NUMBER" is the number of the workspace where you want that application to open
Here's a working example (.desktop filenames for Ubuntu 11.10; they may be different in Fedora 15, etc.):
gsettings set org.gnome.shell.extensions.auto-move-windows application-list "['firefox.desktop:2','banshee.desktop:3','thunderbird.desktop:4']"
The above command will set Firefox to open on workspace 2, Banshee on workspace 3 and Thunderbird on workspace 4.
You can also edit this list by using "dconf-editor" (to use it under Fedora, install "dconf-editor" and under Ubuntu, "dconf-tools") - you'll find it under org > gnome > shell > extensions > auto-move-windows.
Many thanks to bdeferme for the info!