Valhalla Legends Forums Archive | General Discussion | Linux SSH screen cmds

AuthorMessageTime
Mephisto
Does anyone have experience using screen on an SSH client? I started running some programs via SSH with screen so I didn't have to keep it open. I used screen since -b (background) wouldn't work. Anyways, can someone give me some useful commands for it, and especially the command to end a screen process? Thanks!
March 13, 2004, 10:03 PM
Adron
You can kill a screen process like any other (kill pid). If you're running a shell or other application inside a screen process, the screen process will terminate when the other process does.

The commands I use most are screen, screen -ls, screen -r and ctrl-a d.
March 13, 2004, 10:10 PM
Mephisto
I'm very unfamiliar with SSH other than the basic commands. I tried to figure out how to get a pid by using ps "application" and it returned bad syntax.
March 13, 2004, 10:18 PM
iago
[quote author=Mephisto link=board=2;threadid=5759;start=0#msg49245 date=1079216319]
I'm very unfamiliar with SSH other than the basic commands. I tried to figure out how to get a pid by using ps "application" and it returned bad syntax.
[/quote]

If you mean in a linux shell, try "ps -a | grep [ap name]"
March 13, 2004, 10:21 PM
Mephisto
[code]bash-2.05a$ ps -a | grep [ap run_bot.sh]
grep: Unmatched [ or [^[/code]
March 13, 2004, 10:24 PM
Mephisto
Nevermind, figured it all out, thx.
March 13, 2004, 10:30 PM
cipher
[quote author=Mephisto link=board=2;threadid=5759;start=0#msg49250 date=1079217002]
Nevermind, figured it all out, thx.
[/quote]
I doubt you figured it _all_ out, perhaps the simple stuff you were trying to do. Screen is a very powerful tool, and I suggest you really learn how to use it if you like the console. Screen can basically be your whole window manager if you like console apps, and it can be really pretty if you want it to be. It can have virtual tabs (multiple sessions in one window), a locking feature (for when you leave the terminal physically), split screens, and much more. The best way to learn would probably be to just look at the man page (just type man screen) and learn the key bindings and stuff. I can provide a nice screenrc for you so you can have the virtual tabs shown. for ex: http://cipherd.homelinux.net/~share/images/screenshots/tn/screen-rules.png.html (mine) or http://newds.zefga.net/ss/screen.png (eurijk's)--we happened to be talking about screen recently ;)
Screen can also be useful to people with inconsistent connections (stable ones too, but dialup users love screen) that want to keep the same ssh session going with the commands they last did, and the last text that appeared, etc.
So, to just say you figured it all out that quickly just seemed like you didn't pay attention to a few of the great other uses screen has, other than just for placing a bnet bot in the background.
March 14, 2004, 2:50 AM

Search