The feature to save session has been removed in Ubuntu 12.04 because of a bug.
I have made a workaround that is a script that helps to configure your session. Just paste the command below at terminal and press Enter.
This if you are using Metacity (Unity-2d):
cd ~/ && wget -c http://dl.dropbox.com/u/4098082/session.meta.config && chmod +x ~/session.meta.config && ~/session.meta.config
Or this if you are using Compiz (Unity-3d):
cd ~/ && wget -c http://dl.dropbox.com/u/4098082/session.config && chmod +x ~/session.config && ~/session.config
You can view the code of script (1, 2). There are explanations in each part. It will create a startup script which will move to each viewport (or desktop) and open the specified application.
To remove any changes made by my script just delete this files (if they exists):
Or run this at terminal:
rm ~/session.config ; rm ~/session.meta.config ; rm ~/sessionconf ; rm ~/sessionconf.bak ; rm ~/.config/autostart/sessionconf.desktop
There are others workarounds like TuxOnIce:
"TuxOnIce is most easily described as the Linux equivalent of Windows' hibernate functionality, but better. It saves the contents of memory to disk and powers down. When the computer is started up again, it reloads the contents and the user can continue from where they left off. No documents need to be reloaded or applications reopened and the process is much faster than a normal shutdown and start up."
See it working here.
You can install it through "tuxonice/ppa":
1) Add the ppa:
sudo apt-add-repository ppa:tuxonice/ppa
sudo apt-get update
sudo apt-get install tuxonice-userui linux-generic-tuxonice linux-headers-generic-tuxonice
A third idea is to set Compiz to launch windows in selected viewports:
1) Install CompizConfig-Settings-Manager,
2) Open Alt + F2 and type
ccsm and hit Enter,
3) Go to "Place Windows"
4) Select "Fixed Window Placement" > "Window with fixed viewport" > "New"
5) Select the window by class, id, title, name, type or role and set the viewport it should be placed:
6) Now add your apps to "Startup Applications" (press Super and type