Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

share|improve this question
1  
xdg-open is for opening a file. Not for applications. –  jokerdino May 22 '13 at 15:02
    
wrong! you can open applications as well. Try xdg-open firefox. And btw, "Everything in linux is a file" –  hades33 May 22 '13 at 15:06
add comment

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.

share|improve this answer
    
prog & disown seems to work well. But not nohup prog &. It does not display the prompt. prog &; disown does not work. –  hades33 May 22 '13 at 15:27
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.