Run GUI apps from Terminal

You can actually launch many GUI apps from the command line, as long as they live somewhere in your path (for example, in /boot/beos/apps/) . For instance, just type NetPositive or StyledEdit at the command line to launch them normally. The nice thing is, you don’t have to hunt around for the icon. Even better, you can pass filenames or URLs to these apps as arguments. For instance, to get to this site from the Terminal, type:

NetPositive http://www.betips.net/

Or open a pre-existing text document called „foobar“ by typing:

StyledEdit foobar

You can even open a second Terminal window by simply typing Terminal.
There are times when doing something like this could take over control of the command line for a while. For instance, opening a URL might require first invoking the dialer and then finding the site, during which time you wouldn’t be able to use Terminal. To avoid this, designate the task as a background process by following it with a &. For instance,

NetPositive http://www.betips.net/ & 

will assign a process ID and return control of Terminal to you.
Many apps will also print debug info back to the shell if you start them from the command line rather than from their icons. This can be useful for troubleshooting misbehaved applications.

 

Comments

No comments so far.

(comments are closed)

Kategorien

 
 
Blogroll
Resources