Programs launched from Terminator close when Terminator closes

Asked by Saqib Rasul

When i launch an X program from Terminator (like xmms for example), and then close the Terminator window, the program launched is also killed. I am launching the program with a '&' after the command so its a separate process. Is there any way to disable is feature?

Question information

Language:
English Edit question
Status:
Answered
For:
Terminator Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Launchpad Janitor (janitor) said :
#1

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
Chris Jones (cmsj) said :
#2

This is a perfectly normal behaviour for a terminal (you will see that GNOME Terminal does the same thing, for example).

To prevent the X application from closing, run it thus:

nohup xclock &

(replacing "xclock" with the application you actually want to run). The "nohup" program stops the application from receiving the "Hang Up" signal when the terminal closes, thus leaving it running.

Revision history for this message
Dr_Willis (dr-willis) said :
#3

Using the Close button to close the terminal is sort of a 'bad' habit to get into. Even more so if you launch a lot of programs from the terminals. The Nohup example given above is a good tip.

However a MUCH easier way to have the programs not be forced to close is to use the 'exit' command to exit the terminal. after using the job control features of the shell. ie: somthing like this...

gedit somefile.txt &
exit

This closes the shell/terminal but does not force the editor to close.. If you forget the & when you run a command the following also works..

gedit somefile.txt
<ctrl-z> # this backgrounds/pauses the editor
bg # this lets the editor continue running
exit # this closes the terminal.

Can you help with this problem?

Provide an answer of your own, or ask Saqib Rasul for more information if necessary.

To post a message you must log in.