1

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?

Muddassir Nazir
  • 4,421
  • 6
  • 23
  • 39

2 Answers2

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
  • 16,864
  • 9
  • 45
  • 77
  • 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
  • 100,877
  • 19
  • 193
  • 283