This may be a really ridiculous question, but I don't seem to know the terminology for what I'm trying to find out, because a few minutes of searching and I'm no nearer truth. Oh, and it'll be quicker and more productive to ask here.![]()
My question is, after running a command in the terminal window, can I (and if so, how do I) exit said terminal if it is still running (has not returned to ~: prompt)?![]()
I have this happen if compiz crashes and then I run it in the terminal; it doesn't go straight back to the prompt, even though the windows manager restarts and I can work. But I can't close the terminal window without re-crashing it, and then it seems to restart automatically and then works. Do I make myself clear? Probably not. It's late, even on PDT, and I'm on EST now.![]()
TIA,
-pixelot
-
ALLurGroceries Vegan Vermin Super Moderator
You should run compiz & and then close the window. & will send it to the background instead of letting it hog the console.
-
The ampersand will send it to the background, but I'm pretty sure the process will still die if its parent (terminal) is killed. The best thing I can think of is using grun, which is essentially a command launcher that forks everything over to whichever terminal X spawned from. Your process should be pretty safe there.
-
Hi there,
as archer said, ampersand ("&") sends the command to background, so you're still able to use the same terminal (e.g. for commands or scripts, that take longer to execute).
But your friend is 'nohup' command.
e.g.
/usr/bin/nohup command &
I use this a lot when ssh to remote machines, run some shell script, but wanna logout of there (because script takes like whole night to finish and i need to shutdown my laptop) -
ALLurGroceries Vegan Vermin Super Moderator
compiz & and closing gnome-terminal works for me on Debian Sid.
One other alternative - Alt+F2 or whatever you have as your Run type dialog in your desktop environment. Just run compiz --replace there instead of in the terminal. As long as it's a non-interactive command it should be fine. -
Thanks so much, everyone. Great responses!
I should've remembered compiz &, but I didn't know the other stuff. -
-
Closing terminal without ending process?
Discussion in 'Linux Compatibility and Software' started by pixelot, Jul 8, 2009.