pne: A picture of a plush toy, halfway between a duck and a platypus, with a green body and a yellow bill and feet. (Default)
[personal profile] pne
pne@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.

Date: Thursday, 28 August 2003 02:36 (UTC)
From: [identity profile] nik-w.livejournal.com
what does screen do? I don't appear to have it installed on my machine...

screen

Date: Thursday, 28 August 2003 02:56 (UTC)
ext_78: A picture of a plush animal. It looks a bit like a cross between a duck and a platypus. (Default)
From: [identity profile] pne.livejournal.com
Hm... not so sure how to explain it. Something like a virtual terminal multiplexer?

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)
From: [identity profile] nik-w.livejournal.com
Ahh - I see, I can see how that could be useful - a bit like nohup:)

screen and nohup

Date: Thursday, 28 August 2003 05:40 (UTC)
ext_78: A picture of a plush animal. It looks a bit like a cross between a duck and a platypus. (Default)
From: [identity profile] pne.livejournal.com
Kind of like nohup on steroids, yes.

(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)
From: [identity profile] nik-w.livejournal.com
I confused myself by trying to run a daemon through nohup the other week, but then [livejournal.com profile] draxil came round, installed it into init.d/ and showed me how to start and stop daemons properly:) It's weird how sometime in Linux I use Windows key commands (usually it's ctrl-z for undo - which used to cause me untold frustration when it would suspend my programs - but then some more advice from [livejournal.com profile] draxil was to just type "fg %1") and then in windows I use emacs key commands:P

Date: Thursday, 28 August 2003 12:30 (UTC)
pthalo: a photo of Jelena Tomašević in autumn colours (Default)
From: [personal profile] pthalo
Heeeeeeeeeee. /me thinks of Adom and Nethack and smiles.

Rogue and similar games

Date: Friday, 29 August 2003 01:14 (UTC)
ext_78: A picture of a plush animal. It looks a bit like a cross between a duck and a platypus. (Default)
From: [identity profile] pne.livejournal.com
Yes: I imagine the developers probably had been playing a lot of those games when they came up with that error message :)

Date: Thursday, 27 January 2005 17:47 (UTC)
From: [identity profile] crschmidt.livejournal.com
There's also "nethack mode":

^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.

Profile

pne: A picture of a plush toy, halfway between a duck and a platypus, with a green body and a yellow bill and feet. (Default)
Philip Newton

June 2015

S M T W T F S
 12 3456
78910111213
14151617181920
2122232425 2627
282930    

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Thursday, 1 January 2026 10:55
Powered by Dreamwidth Studios