[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: session save to disk?
From: |
Artur Skonecki |
Subject: |
Re: session save to disk? |
Date: |
Sun, 29 Aug 2010 23:00:06 +0200 (CEST) |
User-agent: |
Alpine 2.00 (DEB 1167 2008-08-23) |
Recently I wrote a GNU Screen session saver.
Download: http://github.com/skoneka/screen-session/downloads
A little howto:
http://adb.cba.pl/gnu-screen-tips-page-my.html#howto-screen-session
It currently supports saving of:
directories, programs, layouts, scrollbacks, titles ( what else it could save? )
It recognizes groups and regular windows. Currently there is no support for
serial and telnet window types (because so far I didn't manage to use them) but
they would be probably easy to add.
screen-session saves directories and programs by directly reading /proc filesystem ( it
reads cwd, exe and cmdline ) and sorts them by parent pid. There is no
"stuffing" and there is totally no interaction with programs in windows. After
session loading, in every new window starts screen-session-primer (small C program) which
displays list of processes and asks user what to do(whether to start none, part of or all
window's processes).
There is also a blacklist for programs which may not be started.
Basic usage is dead simple.
To save run inside saved session:
$ screen-session --save
To load last saved run inside another session:
$ screen-session --load
You can save any running session:
$ screen-session --save --in PID --out mysavedsession
And load it in any session:
$ screen-session --load --out PID --in mysavedsession
All loadad session are wrapped in restore_[name] groups so they do not clutter
the workspace.
By default all sessions are saved in $HOME/.screen-sessions.
More examples in README.
This session saver requires a recent GNU Screen version (git) with a trivial
patch.
screen-session.diff changes:
- add "tty" command ( necessary for reading /proc filesystem using lsof )
- make "layout" "group" "maxwin" "sessionname" queryable
Question to maintainers: Could you consider making more commands queryable by
default? (especially those which only require adding CAN_QUERY in comm.c)
Regards
--
Artur Skonecki
http://adb.cba.pl
- Re: session save to disk?,
Artur Skonecki <=