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.
1 Answer
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.
-
prog & disown
seems to work well. But notnohup prog &
. It does not display the prompt.prog &; disown
does not work.– John RedMay 22, 2013 at 15:27
xdg-open
is for opening a file. Not for applications.xdg-open firefox
. And btw, "Everything in linux is a file"