[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Detaching and reattaching a process to different terminals?



Also-

nohup setsid <command name>

is a simple and quick way to acheive this for new processes.

Cheers

Awais Ahmad


----- Original Message ----- 
From: "Jon" <lorddissy@gmail.com>
To: "Stephen Touset" <stephen@touset.org>
Cc: <debian-user@lists.debian.org>
Sent: Thursday, July 22, 2004 3:37 PM
Subject: Re: Detaching and reattaching a process to different terminals?


> The program your looking for (for in the future) is called  screen.
> apt-get install screen
>
> >From the package description:
> "screen is a terminal multiplexor that runs several separate "screens"
> on a single physical character-based terminal. Each virtual terminal
> emulates a DEC VT100 plus several ANSI X3.64 and ISO 2022 functions.
> Screen sessions can be detached and resumed later on a different
> terminal."
>
> Run screen first.  Then it will give you a shell again.
> Run whatever app you want on that terminal.
>
> To detach, hit control-a then d
> To reattach, run   screen -r
> (-r for resume, control-a is the command char to screen, and d is detach)
> You can also hit control-a ?  in screen for more commands.
>
> As I said, as you have to run screen first, this won't help with your
> current problem, but in the future it may.
>
> Another handy feature is you can have up to 10 terminals in one screen
season.
> Tons of other useful features as well.
>
> GNU Screen: an introduction and beginner's tutorial
> http://www.kuro5hin.org/story/2004/3/9/16838/14935
>
>
> On Thu, 22 Jul 2004 09:00:46 -0400, Stephen Touset <stephen@touset.org>
wrote:
> > I'm running a program for a research study I'm involved in, but I've run
> > into a slight problem. I executed it on an xterm (and it's been running
> > for a few days now, so I don't want to stop it mid-calculation), but
> > today is a workday. At work, I use two screens on my laptop. The only
> > way to accomplish this is to restart X so Xinerama can take effect.
> > Unfortunately, this will also have the nasty side effect of killing
> > execution.
> >
> > Is there any way to detach the pid from that terminal and reattach it to
> > one of the consoles? Or background it in a way where it will survive X
> > restarting? It's not critical, but it's something I've wondered before,
> > and which will come in extremely handy today.
> >
> > --
> > Stephen Touset <stephen@touset.org>
> >
> >
> >
>
>
> -- 
> To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact
listmaster@lists.debian.org
>
>
>




Reply to: