WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Nomadic Session Save&Restore  (Read 1369 times)

Offline Alligadi

  • WikiUser
  • *
  • Posts: 10
Nomadic Session Save&Restore
« on: September 21, 2012, 05:28:44 AM »
Some months ago a friend asked me: Wouldn't it be nice to run TinyCore from a USB stick on a Notebook, and then, saving the whole session so that he can plug it off, go to his other computer, boot TC on it, and go on working with his session on this other hardware. On the same hardware a "ram to disk" approach would do it (but slow). But on different hardware? Then I had an idea.
Most good linux software includes the path and filename of opened files in the window title.
So all I needed to do was:

Saving session:
Save the desktop number, geometry of all windows and the name of the processes they are related to and the related "loaded files" extracted from the window title into a save file.

Load session:
Load these informations, open the specific processes with the correct file parameters. Then rearrange and rescale the windows like specified in our save file and put them on the correct desktop.

Pro:
No ram dumb needed.
Works on all hardware.
Damn fast.

Contra:
Needs tricky configuration and application-specific scripting.

It works already, you may use it for own purposes or give me some feedback/ideas to improve it :)

You will need: python2.x, wmctrl
(only tested with Fluxbox)

Online curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 9849
Re: Nomadic Session Save&Restore
« Reply #1 on: September 21, 2012, 06:25:56 AM »
Maybe easier to use a WM that supports sessions?
The only barriers that can stop you are the ones you create yourself.

Offline Alligadi

  • WikiUser
  • *
  • Posts: 10
Re: Nomadic Session Save&Restore
« Reply #2 on: September 21, 2012, 06:31:39 AM »
I always use Fluxbox, and it doesn't support saving a session I think.