Thought I would pass this on from my Lockergnome Penguin Shell
subscription:

"Background Commands

As you probably know, running commands in the console is my preferred
method. I love the flexibility the console provides in executing these
commands, allowing exactly the options I need to get the job done -
nothing more, nothing less. I keep very few icons on the desktop for
that reason; most of the programs I run, I run from the terminal.

Which all raises an issue in my daily Linux use. When I'm running
several applications, all launched from the command line, I'm often left
with several open terminal windows. I can minimize them while the
program is running, but it's still more clutter than I like. I can jump
off to another desktop, but I know the windows are still open and still
there. It just disrupts my sense of order.

We've talked before about one quick way to solve this problem. Using the
& sign at the end of a command:

gkrellm &

will free up the window to use for another program. When you execute the
command with this operator, you'll see

[1] 3000

This designates the first [1] program, running in process ID 3000. With
this tweak, it's likely that you can run more programs from a single
window than you CPU or system can handle. I've never run that many but,
theoretically, it's possible.

Even this method has its drawbacks. When you log out of the console
window, the program goes with it. In other words, closing the terminal
also closes the program. That's probably not what you want when you've
pushed a command to the background.

There is, however, a way to truly push a program into the background
from the terminal. Using this method, you can close the window while
keeping the program running:

nohup gkrellm &

This simple addition of six keystrokes (space included) signals the
system that you'd like to run the program without a hangup option -
[no][h]ang[up]. In effect, it frees the command from the terminal,
allowing you to close the console without killing the program.

If you love the power of the console and happen to be a desktop
neat-freak like myself, you'll soon learn to love the nohup command."

enjoy!

-- 
 Joehill
 Registered Linux user #282046
 Homepage: http://nodex.sytes.net
 00:06:28 up 9 days, 22:10,  4 users,  load average: 0.00, 0.05, 0.03

Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com

Reply via email to