Suddenly the Dungeon collapses!! - You die...
Thursday, 28 August 2003 09:51pne@penderel:~/lj/livejournal$ screen -r
Suddenly the Dungeon collapses!! - You die...
pne@penderel:~/lj/livejournal$
pne@penderel:~/lj/livejournal$ screen -ls
There is a screen on:
26827.pts-8.penderel (Dead ???)
Remove dead screens with 'screen -wipe'.
1 Socket in /var/run/screen/S-pne.
pne@penderel:~/lj/livejournal$
Bummer. Amusing message, though.
no subject
Date: Thursday, 28 August 2003 02:36 (UTC)screen
Date: Thursday, 28 August 2003 02:56 (UTC)The most basic use is to set up a virtual session that can outlive a real connection: for example, telnet or ssh to another machine, then type screen vi filename.txt. Edit around in the file, detach the session with Ctrl-A d, and logout.
A day later, log back into the remote machine and reattach to the session with screen -r. Presto: your vi session is back up as if you had never logged out, with the cursor on the same line and everything. screen kept up the connection for you.
Once you've done that, you can also take advantage of multiple windows, which is what I had done. From inside one screen session, create another with Ctrl-A c, which gives you a blank shell. Then you can start another editor, or look at a man page, or do whatever. Later, you can switch between windows with Ctrl-A 0 to Ctrl-A 9, or with Ctrl-A ", which gives you a list of windows to choose from (Ctrl-A Ctrl-A is also useful: it switches back and forth between the two most recently used screen windows).
This way, I could have a bunch of different files open, each with its own cursor position, a man page, a shell, etc. and switch back and forth between them while only needing one ssh session. And before I switch off my computer, I can detach the screen session with Ctrl-A d and logout, then log back in and reattach the next day without having to remember which files I had open on the remove machine.
Unfortunately, something went wrong yesterday (I think I messed up when cleaning up before going home) and screen died when I tried to reattach this morning, taking down with it the editor processes I had open (ps showed no processes of mine running, and the swap files were gone, too, though they were there before). But in general, it works fine.
Re: screen
Date: Thursday, 28 August 2003 03:57 (UTC)screen and nohup
Date: Thursday, 28 August 2003 05:40 (UTC)(The most striking difference is that it works with interactive and even full-screen programs. Then, of course, there's the multiple windows bit which can come in handy.)
Re: screen and nohup
Date: Thursday, 28 August 2003 06:22 (UTC)no subject
Date: Thursday, 28 August 2003 12:30 (UTC)Rogue and similar games
Date: Friday, 29 August 2003 01:14 (UTC)no subject
Date: Thursday, 27 January 2005 17:47 (UTC)^A : nethack on
Which turns most messages into nethack-based messages.
However, that doesn't change the fact that I get these "dungeon collapses" messages every couple days or so... I'm apparently the only person in the world this happens to, never been able to figure it out.