LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 08-24-2007, 09:49 AM   #1
azgs
LQ Newbie
 
Registered: Aug 2007
Posts: 22

Rep: Reputation: 15
Question Sessions or process management


I was wondering if there is a method such that some user can legitimately take over the session of another user or at least can take over a process from another terminal or user???!?!

Say, like I was connected to a Linux box from a terminal and I was in a session downloading or performing some action which would be killed if I logged out or disconnected, but, say, for some reason I have to leave that very terminal and move on to another... so can I transfer/move/shift the process(es)/session I was running over to the other terminal I am moving to, say, I have super user privilege too, then??

Hope it was clear!!

 
Old 08-24-2007, 10:29 AM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Yeppers

The "screen" utility is designed to do exactly this.

Essentially you open the terminal session, invoke screen, then start your job. If that session closes (depending on HOW you close it) you can later open it in another session (actually you can do it without closing the other one if you wanted to see it on two different sessions at the same time).

Notes I wrote myself about screen a long time ago:

screen -list - Shows screen session names
screen -S <name> - Starts screen session and gives it <name> as name.
screen -x <pid> - Attaches to existing screen session with PID of <pid>.(12-Sep)
screen -x <name> - Attaches to existing screen session named <name>.(NO! 12-Sep)
Ctrl-A - Main command to use within screen. Selected options:
Ctrl-A ? - Gives a list of all options
Ctrl-A 0 - Goes to first window within a screen session.
Ctrl-A 1 - Goes to second window within a screen session.
Ctrl-A <n> - Goes to nth window within a screen session.
Doing exit from within a screen session will fall back to previous window.
Doing exit from all windows in screen session will terminate screen.
Closing window that has a screen session will leave it running and detached.
 
Old 08-24-2007, 10:34 AM   #3
azgs
LQ Newbie
 
Registered: Aug 2007
Posts: 22

Original Poster
Rep: Reputation: 15
It was too quick a reply

Thanks pal, I had seen that screen command elsewhere but ignored it then. Didnt know actually such a transfer of processes could be done. I was just preparing to invent some way to do that hahaha
 
  


Reply



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
Question regarding process management misbahuddin Linux - Software 2 12-05-2005 10:06 AM
KDE Session Management - not saving sessions KimVette Linux - Software 5 02-26-2005 07:26 PM
Process Management Jose Muņiz General 4 10-12-2003 08:14 AM
Process management, bg, fg, CNTL-Z markf424 Linux - Software 3 07-24-2003 04:19 AM
process management nagna Linux - General 1 11-10-2001 10:00 AM

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

All times are GMT -5. The time now is 04:01 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