dslreports logo
site
 
    All Forums Hot Topics Gallery
spc

spacer




how-to block ads


Search Topic:
uniqs
768
share rss forum feed

Rob_
Premium
join:2008-07-16
Mary Esther, FL
kudos:1

Screens

For some reason, I have three screens that need to go away, how do you do it?

12313.pts-68.Dr (Attached)
12261.pts-68.D (Attached)
26847.pts-16.D (Attached)

I'm fairly new to this and use it mainly for IRC

-Rob


ds5v50

join:2003-01-22
Fremont, OH
Not sure if you are talking about the command screen or something else but...

if it is screen then here ya go. from the command line

screen -R
exit
 

Edit: Or 'killall screen' from the command line will work also.

--
Fremont, Ohio Weather
»www.Fremont-OH-weather.com

Rob_
Premium
join:2008-07-16
Mary Esther, FL
kudos:1
That worked, thanks! How do I prevent getting more then one screen? only need one.

-Rob


rexbinary
Mod King
Premium
join:2005-01-26
Plano, TX
reply to Rob_
Don't run screen more then once? I'm not sure how you are getting more screens then you want. Can you tell us what your typing when using screen?


ds5v50

join:2003-01-22
Fremont, OH
reply to Rob_
How you invoke screen is a great start, But to go to an already active screen you could do..

 
screen -R -D 
 
 

that will re-attach if there is already an open screen session. Also keep in mind if your running screen and just kill the window or the connection, screen will continue running. At the end of your screen session typing exit until the you get the " [screen is terminating]
" notice, will help keep screen from living past its needed time.

I would highly recommend reading the screen man page.

--
Fremont, Ohio Weather
»www.Fremont-OH-weather.com


timcuth
Braves Fan
Premium
join:2000-09-18
Pelham, AL
reply to Rob_
Sorry, posted on wrong topic.


dennismurphy
Put me on hold? I'll put YOU on hold
Premium
join:2002-11-19
Parsippany, NJ
kudos:3
Reviews:
·Verizon FiOS

1 recommendation

reply to Rob_
said by Rob_:

That worked, thanks! How do I prevent getting more then one screen? only need one.

-Rob

If you only need one, then why are you using screen at all?


Selenia
Gentoo Convert
Premium
join:2006-09-22
Fort Smith, AR
kudos:2
He is right. The whole purpose of screen is to be able to detach open terminals and reattach later. One example of me using it was controlling rtorrent via ssh from my Android. No need to stay connected or fear a lost connection. Just detach from previous ssh session and reattach to periodically check on it while rtorrent kept running peacefully.


dennismurphy
Put me on hold? I'll put YOU on hold
Premium
join:2002-11-19
Parsippany, NJ
kudos:3

1 recommendation

Nohup is your friend ...


koitsu
Premium,MVM
join:2002-07-16
Mountain View, CA
kudos:23

2 edits
reply to Rob_
While I agree generally with the recommendation to use screen -r 12313.pts-68 and so on, to attach and then cleanly close down every screen session (typing exit in every shell), you can also be more aggressive (especially if you are 100% sure you don't care what any of those screen sessions or underlying shells are actively doing) by simply doing screen -wipe

You can use screen -R to resume an existing session -- and if one does not exist, it will create a new one. Given that you "only want one screen session", I would suggest you get in the habit of using -R instead of -r. I would also suggest making this an alias for yourself in your dot files, i.e. alias sr="screen -R" so that you can just type sr.

Like any UNIX bastard, I'll use this opportunity to recommend throwing GNU screen in the trash. It's a complete clusterf*** when it comes to terminal emulation. GNU screen uses its own termcap/terminfo entry and tries to "translate" between what the underlying UNIX application wants (i.e. vt100) to what your actual terminal application (i.e. PuTTY, xterm, etc.) uses. This is rarely useful these days*.

GNU screen zealots often try to blame utter nonsense in screen on the underlying applications as well; a great and semi-recent example was this post of mine where a user insisted "mutt is broken" when in fact it isn't mutt that's making the mess at all (and I prove that with all the technical details provided). That post also reiterates what I just said in my previous paragraph.

A wonderful replacement for GNU screen that pragmatically and effectively accomplishes the same goal is tmux. It does none of this nonsense and retains/passed through all escape sequences without "emulation" or "translation" of terminal types.

* -- The only situation where GNU screen is useful is where you're commonly moving between different terminal types (i.e. one minute you're on a Linux console (TERM=linux), 5 minutes later you're in PuTTY (TERM=xterm) or native xterm, then later in the day you're on a FreeBSD console (TERM=cons25) or a real vt100 terminal (TERM=vt100). I used to work in this kind of environment back in 1999 (we had Wyse and DEC terminals, plus our own workstations), so GNU screen made sense. I give an example situation in that post of mine. But for what most people want these das ("a way to detach a shell session, IRC client, etc. and resume it"), tmux is the way to go. Again I cannot stress the utter mess that GNU screen makes of a person's terminal and how often it destroys escape sequences, not to mention wastes bandwidth (which can matter if you're on, say, a 9600bps terminal).

--
Making life hard for others since 1977.
I speak for myself and not my employer/affiliates of my employer.


Maxo
Your tax dollars at work.
Premium,VIP
join:2002-11-04
Tallahassee, FL
said by koitsu:

Like any UNIX bastard, I'll use this opportunity to recommend throwing GNU screen in the trash. It's a complete clusterf*** when it comes to terminal emulation. GNU screen uses its own termcap/terminfo entry and tries to "translate" between what the underlying UNIX application wants (i.e. vt100) to what your actual terminal application (i.e. PuTTY, xterm, etc.) uses. This is rarely useful these days*.

I'd second that. Screen is outdated and mostly abandoned. Tmux is the new screen. I'd also recommend byobu, which is a screen/tmux wrapper. Both tmux and byobu are actively worked on, stable, and boat new features.
--
"Padre, nobody said war was fun now bowl!" - Sherman T Potter

»maxolasersquad.com/

»maxolasersquad.blogspot.com

»www.facebook.com/maxolasersquad

Rob_
Premium
join:2008-07-16
Mary Esther, FL
kudos:1
Mostly for IRC, the screen keeps me logged in, but just now had two screens running which was not needed

-Rob