My question is pretty simple:
Is there a command I can use in bash that will open a specific URL in the default browser?
|
My question is pretty simple: Is there a command I can use in bash that will open a specific URL in the default browser? |
||||
|
|
|
There's a command that knows about your default browser:
This will also work for every other type of URI (Uniform Resource Identifier), like images - which will automatically open with eog, openoffice documents, and so on, and also on filesystem paths ( There is also
and
To find out what application is going to be used. You can set your preffered application by going to System → Preferences → Preferred Applications:
These utilities are part of the freedesktop.org specification, so you can use them in your applications - and it's going to work on all of the desktops that adhere to the spec. |
||||
|
|
|
You can use
From the XDG-OPEN man page:
|
||||
|
|
|
Make it easy: Just add Wine to your Ubuntu installation. After that, when you try to open a *.url file the first time with Firefox (which is the standard web browser of the current Ubuntu distro) chose "open with Wine program starter" and make that option the default. From then on Ubuntu Firefox will open any *.url quite like Firefox under MS Windows is doing it since the beginning of time. (Hello Firefox: when will Debian / Ubuntu Firefox open *.url files without Wine as Windows Firefox does ?). |
|||||
|