A Cygwin/X Tip
Learned something new about running X:
Any time you enter commands in Unix, you can place an ampersand ( "&" ) at the end of the command to run that command in the background. This "disconnects" the command from your keyboard (in that window). You get a prompt immediately and can enter your next command even if the one you just launched has not yet completed.
Now this capability is not all that useful if you're not running X. After all, if the program you are running needs input from you, it has been disconnected and can't see your subsequent keystrokes. Also, if that program produces output, it will still appear, but will be intermingled with the outputs of any new commands you have entered in the meantime. So, if you're not in X, the & is useful only for commands and programs that need no additional inputs and produce no additional outputs.
Under X, however, many useful programs open their own windows and direct their inputs and outputs through those new windows. For example, you would enter "emacs &" rather than "emacs" , and "netscape &" rather than "netscape" . Without the &, the window where you entered the command to launch a program would be useless to you until that program has finished. With the &, that program runs in its own window and the old window gets a new prompt and can still be used to issue more commands.
0 Comments:
Post a Comment
<< Home