2

When I type google-chrome in the terminal it works. xdg-open google-chrome doesn't.
Why is this so? I need to do this so that I can run Chrome without keeping the terminal open, which xdg-open google-chrome allows me to do.

2
  • 1
    xdg-open is for opening a file. Not for applications.
    – jokerdino
    May 22, 2013 at 15:02
  • wrong! you can open applications as well. Try xdg-open firefox. And btw, "Everything in linux is a file"
    – John Red
    May 22, 2013 at 15:06

1 Answer 1

2

XDG-open is for opening the "right" application for the file type. In your case you like to run the application google-chrome in the background - XDG-open is not used for this purpose.

Instead, use your shell (assuming Bash here) to have the program run in the background:

nohup google-chrome &

Explanation: appending & makes it run in the background (you'll get your shell back) while nohup will keep the application open (disowns). See my answer in How can I close a terminal without killing the command running in it? for more details.

1
  • prog & disown seems to work well. But not nohup prog &. It does not display the prompt. prog &; disown does not work.
    – John Red
    May 22, 2013 at 15:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .