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.
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.
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:
Explanation: appending
&
makes it run in the background (you'll get your shell back) whilenohup
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.