It's possible for two users to share a screen session. This is particularly useful if multiple people want to monitor a long running task, and it's easy to do.
user #1:
screen -R longbuild
user #2:
screen -x -R longbuild
The -x flag tells screen to allow you to attach to an already attached session. This is also good for crazy stuff like a collaborative Vim session (if you're into that sort of thing).
Showing posts with label sessions. Show all posts
Showing posts with label sessions. Show all posts
Thursday, November 20, 2008
Monday, August 25, 2008
Sharing a Session
You can use script and mkfifo to allow a second session to supervise the first using this very simple hack.
# on 1st terminal
mkfifo /tmp/session
script -f /tmp/session
# on 2nd terminal
cat /tmp/session
Now the 2nd terminal can interactively watch whatever is going on with the 1st terminal. Occasionally some control characters will get a little garbled when a lot of curses activity is going on, but in general, it works pretty well.
# on 1st terminal
mkfifo /tmp/session
script -f /tmp/session
# on 2nd terminal
cat /tmp/session
Now the 2nd terminal can interactively watch whatever is going on with the 1st terminal. Occasionally some control characters will get a little garbled when a lot of curses activity is going on, but in general, it works pretty well.
Wednesday, February 27, 2008
Sessions
Say you're editing in Vim and wrapping it up for the day. You have everything configured to your liking and don't want to go through the hassle of setting everything up tomorrow. Vim allows you to very easily store your current editing session like so:
:mksession work.vim
After that you can quit Vim and come back whenever you want. Once you're back inside Vim, you can type:
:source work.vim
and your last editing session is reloaded. You can also load a session from the command-line like so:
vim -S work.vim
:mksession work.vim
After that you can quit Vim and come back whenever you want. Once you're back inside Vim, you can type:
:source work.vim
and your last editing session is reloaded. You can also load a session from the command-line like so:
vim -S work.vim
Subscribe to:
Posts (Atom)