LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Launching applications in xterm (http://www.linuxquestions.org/questions/linux-newbie-8/launching-applications-in-xterm-892620/)

ADX 07-19-2011 09:14 PM

Launching applications in xterm
 
I've search around and looked at the man page but can't seem to figure this out.. using fluxbox one can click an application in the menu and it opens without a supporting terminal. However, if I open xpdf in the terminal, xpdf launches and the terminal waits for it to exit... my question is, what is the command to hide the terminal and just launch the application?

Thanks

bigrigdriver 07-19-2011 11:18 PM

The trick is to append the & sign to the end of the command to free up the terminal when the app starts.

xpdf &

flamelord 07-19-2011 11:31 PM

bigrigdriver is correct, however, some programs give a lot of output which might be inconvenient, one way to get rid of this is to use "&> /dev/null" at the end, or alternatively use a log file instead of /dev/null, if so desired.

MTK358 07-20-2011 07:13 AM

Quote:

Originally Posted by ADX (Post 4419676)
I've search around and looked at the man page but can't seem to figure this out.. using fluxbox one can click an application in the menu and it opens without a supporting terminal. However, if I open xpdf in the terminal, xpdf launches and the terminal waits for it to exit... my question is, what is the command to hide the terminal and just launch the application?

Thanks

There is no terminal in the first place when you launch with Fluxbox. What makes you think there is one?

Anyway, when you run a command like "cp" in a terminal and it takes a long time, the prompt doesn't return until cp finishes. Why would xpdf be any different? Anyway, there are two ways to do this:

Code:

nohup xpdf &
Code:

xpdf &
disown


ADX 07-20-2011 12:04 PM

Quote:

Originally Posted by bigrigdriver (Post 4419735)
The trick is to append the & sign to the end of the command to free up the terminal when the app starts.

xpdf &

That worked great, thanks.


Quote:

Originally Posted by MTK358 (Post 4420035)
There is no terminal in the first place when you launch with Fluxbox. What makes you think there is one?

I didn't say there was a terminal when fluxbox starts, I said there is no terminal that launches alongside a program from the flux menu.

MTK358 07-20-2011 12:18 PM

Quote:

Originally Posted by ADX (Post 4420323)
That worked great, thanks.

Note that that command just tells the program to run in the background so that you can keep using the terminal while the program runs.

The "nohup" and "disown" commands I suggested make it so that the program is not a child of the terminal anymore, so that the program will keep running even if you close the terminal.

Quote:

Originally Posted by ADX (Post 4420323)
I didn't say there was a terminal when fluxbox starts, I said there is no terminal that launches alongside a program from the flux menu.

Sorry, I thought that you thought that fluxbox does launch a terminal, but somehow hides it.


All times are GMT -5. The time now is 11:37 AM.