LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-16-2010, 02:48 AM   #1
tkmsr
Member
 
Registered: Oct 2006
Distribution: Ubuntu,Open Suse,Debian,Mac OS X
Posts: 798

Rep: Reputation: 39
unable to exit screen


Code:
screen -ls
shows me
Code:
There are screens on:
        5072.pts-3.server    (Monday 15 November 2010 09:46:52  IST) (Attached)
        22276.pts-3.server   (Monday 15 November 2010 09:13:09  IST) (Detached)
2 Sockets in /var/run/screen/S-root.
but when I do
Code:
screen -r 5072.pts-3.server
then I get
Code:
screen -r 5072.pts-3.server
There is a screen on:
        5072.pts-3.server    (Monday 15 November 2010 09:46:51  IST) (Attached)
There is no screen to be resumed matching 5072.pts-3.server.
and when I do an exit and do
Code:
screen -ls
again I see
Code:
There are screens on:
        5072.pts-3.server    (Monday 15 November 2010 09:46:52  IST) (Attached)
        22276.pts-3.server   (Monday 15 November 2010 09:13:09  IST) (Detached)
2 Sockets in /var/run/screen/S-root.
is there is a cleaner way to exit rather than doing a ps and kill.
 
Old 11-16-2010, 03:08 AM   #2
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984
The session you're trying to resume is already attached (maybe to another terminal or on a remote machine), hence it cannot be resumed. You can either terminate the session from the attached terminal or eventually terminate it using screen itself:
Code:
screen -X -S 5072.pts-3.server quit
The command you send to the screen session (quit in my example) can be any command as listed in the section "DEFAULT KEY BINDINGS" of the screen man page. Hope this helps.
 
1 members found this post helpful.
Old 11-16-2010, 03:51 AM   #3
tkmsr
Member
 
Registered: Oct 2006
Distribution: Ubuntu,Open Suse,Debian,Mac OS X
Posts: 798

Original Poster
Rep: Reputation: 39
Yes this makes sense.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Why does vim clear the screen on exit? tsu3000 Linux - Newbie 2 10-06-2011 01:52 PM
unable to save and exit from vi editor ramya victor Linux - Newbie 5 11-20-2010 12:10 PM
How do I exit a full screen Tsclinet session? fabre Linux - Software 2 03-15-2006 06:09 AM
Blank Screen After Install (How To Exit X) JyushinX Mandriva 1 03-14-2005 05:04 AM
help!!!! how to exit full screen mode in xine littlecap Linux - Software 7 03-10-2003 07:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 09:03 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration