Solution 1:

You can't from a normal Ubuntu since there is no save session as it is deemed a flawed feature and that is was not fixable. So it got removed in 2011: see this and this. But you can by using an extension. You will need this dependency:

npm install -g linux-window-session-manager

and then install Window Session Manager Gnome Shell extension from the Gnome extensions website. From the link:

An indicator that let's you save and restore your open apps and the window positions and arrangements over multiple real and virtual displays. Requires lwsm and nodejs to be installed (npm install -g linux-window-session-manager).

Extension Homepage