LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-17-2013, 05:49 PM   #1
lovesuicide
LQ Newbie
 
Registered: Dec 2012
Posts: 7

Rep: Reputation: Disabled
duplicate GNU Screen sessions - need to kill one off


Hi all,

I accidentally set up a duplicate of my GNU Screen session and now I can't get my sessions to connect properly. I used to be able to do this:

mymachine ~ $ screen -x 1SCREEN

And then I would be able to switch between my live screens. I was trying to set up this up on one of my VMs, but I accidentally added setup command to my server. Now I have two separate sessions named 1SCREEEN. I've looked through the man page for screen and its not really clear on how I can kill off one of my screen sessions and not the other.

So now when I type this: mymachine ~ $ screen -x 1SCREEN

This happens

There are several suitable screens on:
3421.1SCREEN (Detached)
8987.1SCREEN (Attached)
Type "screen [-d] -r [pid.]tty.host" to resume one of them.

The second session is the correct one, but I can't connect without doing a screen -d -r to get the screen working. This causes my other sessions in my other terminals to disconnect. If I could just get rid of 3421.1SCREEEN, then I should be ok.

Anybody know how to terminate that one session completely while maintaining the other?

Thanks in advance!
 
Old 01-17-2013, 06:12 PM   #2
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,397
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
You commandline syntax is incorrect. If you use
Code:
 
screen -S 3421.1SCREEN -x
you will be able to connect to that session. You could also send it the kill command.

--- rod.
 
Old 01-17-2013, 06:25 PM   #3
lovesuicide
LQ Newbie
 
Registered: Dec 2012
Posts: 7

Original Poster
Rep: Reputation: Disabled
thanks rod, that did the trick. I tried to use a kill command on those screen sessions, but couldn't work it out. How do you kill the duplicate session?
 
Old 01-17-2013, 07:44 PM   #4
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,397
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
I think it is an command of the '-X' option. Something like
Code:
screen -S 1234.1SCREEN -X kill
Sorry, using Windows right now so can't test it easily.

--- rod.
 
  


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
How to kill pids for all sessions for a specific user except their current one? jasonws Programming 3 10-22-2010 04:39 PM
Can you kill off other sessions (gui and terminal) Thaidog Linux - General 2 03-30-2008 04:51 PM
installing screen(http://www.gnu.org/software/screen/) dreamlemon Solaris / OpenSolaris 5 09-29-2007 04:36 PM
kill opened sessions aizkorri Linux - Newbie 3 09-25-2003 10:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:25 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration