Monday, May 13, 2024
 Popular · Latest · Hot · Upcoming
7
rated 0 times [  7] [ 0]  / answers: 1 / hits: 8672  / 2 Years ago, sat, october 15, 2022, 3:43:01

I have created a bash script that starts an application. Since I wanted the terminal window to close when the application is started, I used this line:



firefox & 2> /dev/null; exit;


It works fine as long as I start the script from the command line. However, if I start it from a desktop laucher the application closes as well as the terminal. Can anyone explain why this is. Im using Ubuntu 10.10.



By only using:



    nohup firefox


it works. But I still would like an explanation to why the original version doesn't work when started from a desktop launcher, if possible.


More From » 10.10

 Answers
5

The solution is to simply use the right form in the pipe:



firefox > /dev/null 2>&1
exit


This works both from terminal and from a desktop launcher. No need to use nohup.


[#41055] Sunday, October 16, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
elopingapo

Total Points: 206
Total Questions: 110
Total Answers: 114

Location: Guam
Member since Tue, Nov 29, 2022
1 Year ago
;