Allow terminal that spawned rdesktop to close without closing rdesktop window in Ubuntu 9.10

2

Running Ubuntu 9.10, when I execute:

rdesktop 147.145.168.224 &

The remote desktop window appears, and the command appears to end in the shell it was executed from because I can execute further commands; however, when I close the shell the remote desktop window closes with it. How can I spawn the rdesktop process such that it remains open when the terminal that spawned it closes? I don't seem to have the same problem with running:

firefox &

Jonesinator

Posted 2009-11-10T15:29:45.063

Reputation: 138

Answers

6

Just use:

nohup rdesktop 147.145.168.224 &

mrucci

Posted 2009-11-10T15:29:45.063

Reputation: 8 398

nice, wasn't aware of this nohup command... Thanks! – codeLes – 2009-11-10T16:23:45.890

2

If you have a background process running already and want to close it's parent process (the terminal window) without killing the child process, you can disown it:

$ rdesktop 147.145.168.224 &
$ disown

After the process is disowned, it will not be killed when it's parent process terminates.

As a side note, you don't have this problem with firefox, because firefox is a shell script that launches firefox-bin, such that firefox-bin is not a child process of your terminal.

John Ledbetter

Posted 2009-11-10T15:29:45.063

Reputation: 526

1

Why not just launch your rdesktop from your launcher. For default Ubuntu just hit:

Alt+F2

and then enter your command in the the entry box:

rdesktop 147.145.168.224 &

Although I don't use the ampersand (&) for mine. Typically my command is:

rdesktop -u myUname -fP 10.130.3.13

This opens rdesktop in fullscreen mode and enables bitmap caching. To get back to my desktop I just have to hit:

Ctrl+Alt+Enter

And then the same combo to get back into fullscreen.

codeLes

Posted 2009-11-10T15:29:45.063

Reputation: 1 772