When I launch gedit or firefox from a terminal, the terminal is occupied(by occupied I mean no other commands can be run from the same terminal window) untill I press ctrl+c but it kills gedit or firefox. Any way other than opening a new terminal window?
Asked
Active
Viewed 483 times
2 Answers
1
As per http://www.linuxandlife.com/2012/07/how-to-run-multiple-commands-in-terminal.html follow the command to launch the app with an ampersand, e.g.:
firefox &
gedit &
Following the command with the ampersand launches the app then returns cursor control to the terminal window immediately so you are free to run another command within that window.

K7AAY
- 17,202
-
That will not work, the commands will hang until you exit firefox – Panther Dec 30 '13 at 22:43
-
I don't want to run multiple commands...it is that when i use the command gedit the terminal is occupied and can't take any other command until is press ctrl+c and when i press ctrl+c the program gedit gets killed as well. So i wanted to know is there any other ways of doing that without opening another terminal window...?? – Muddassir Nazir Dec 30 '13 at 22:43
-
No, not && , just a single &. If you use && or || , that is something else. See http://stackoverflow.com/questions/4510640/command-line-what-is-the-purpose-of – Panther Dec 30 '13 at 22:46
0
You put the applications into the background with the & ...
firefox &
If you want to re-direct error messages and close the terminal leaving the applications running,
nohup firefox > /dev/null 2>&1 &

Panther
- 102,067