jdp407's idea of using compizconfig will associate a particular application with a particular workspace so that EVERY TIME that application is opened, it is placed in the corresponding workspace. If this isn't desired you can do the following:
1) Install wmctrl
sudo apt-get install wmctrl
2) Create a file with the following content and make it executable
#!/bin/bash
wmctrl -s 0 #Switches to workspace 0 [workspaces are numbered from 0]
gnome-terminal & #Say you want a terminal in the 0th workspace
nautilus & #Maybe a file browser too
sleep 2 #Windows take some time to open. If you switch immediately, they'll open up in wrong workspaces. May have to change the value 2.
wmctrl -s 1 #Switches to workspace 1
firefox & #You get the idea. Continue for all workspaces
sleep 2
wmctrl -s 0 #You will be left at this workspace when the script finishes executing
3) Call this script from .xsessionrc
in your home directory [if you may have to create this file] to automate the process at each login. Or you can just call it from a terminal when needed. EDIT: Put it in "Startup Applications", not .xsessionrc. .xsessionrc will execute even before the desktop environment has finished loading.
You may want to create a custom xsession as suggested by jdp407, so that you have two sessions to choose from, one which opens these applications automatically and one which doesn't. But that seems unnecessary to me.
If you feel that switching to a workspace, opening appropriate applications and then switching to the next is time consuming you can open all applications in one shot, and then move the windows using wmctrl
. For example
wmctrl -r 'Firefox' -t 1
will shift a window with Firefox in it's title to workspace 1. If more than one window exists, the first in the list of windows managed by wmctrl
will be moved. You'll need to know the title of the windows that will be created by the applications to use this. That's why I didn't suggest this as the primary option. If titles will be unambiguous as is the case with most commonly used apps then this is the way to go.
Opening applications in fullscreen:
Some applications like gnome-terminal have command-line arguments to open a window in maximised state or in fullscreen mode. If such options exist use them. Otherwise use wmctrl
as follows
wmctrl -r 'prasanth@nb37' -b add,maximized_vert,maximized_horz
This maximises my (already existing) terminal window.
wmctrl -r 'prasanth@nb37' -b add,fullscreen
This sends the window to fullscreen mode.
Go through wmctrl
's man page. You may find use for more of its functionality.