Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

This question already has an answer here:

I opened Cairo-dock in my terminal with: open cairo-dock and that worked but if I close the terminal it goes with it. How can I keep it open regardless of the terminal?

share|improve this question

marked as duplicate by Mik, Thomas W., qbi, hhlp, Stephen Myall Mar 9 '13 at 0:00

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

3 Answers 3

up vote 14 down vote accepted

nohup is a POSIX command to ignore the HUP (hangup) signal. The HUP (hangup) signal is by convention the way a terminal warns depending processes of logout. Output that would normally go to the terminal goes to a file called nohup.out if it has not already been redirected. nohup is a low-level utility simply configuring a command to ignore a signal. As seen below, nohup is very far from being a full-featured batch system solving all the problems of running programs asynchronously.

See manual:

man nohup

Example:

nohup cairo-dock &
share|improve this answer

Yet another way: disown

In the bash shell, the disown builtin command is used to remove jobs from the job table, or to mark jobs so that a SIGHUP signal is not sent to them if the parent shell receives it (e.g. if the user logs out).

For example:

cairo-dock & disown
share|improve this answer
    
disown is a bash specific, so I would not recommend using it, if you want it to work in other POSIX shells. –  oerdnj Mar 5 '13 at 15:02

I personally use screen for this kind of stuff.

screen -d -m -S cairo_session open cairo-dock

What's good about this is that if you want to terminate cairo-dock, you can reconnect to the screen session and terminate it.

screen -S cairo_session -X quit

Screen has other uses. It's a terminal multiplexer.

share|improve this answer
1  
I would however recommend using tmux instead of screen. It has the same functionality (different binding though Ctrl-b instead of Ctrl-a), but works better than screen (at least for me). –  oerdnj Mar 5 '13 at 13:51

Not the answer you're looking for? Browse other questions tagged or ask your own question.