Sublime Forum

Linux Open in browser... always opens Firefox

#1

I’m on Fedora 18 Linux.
I’ve set Chrome as default browser for my system,
but when I right-click on an html file and choose ‘Open in browser’, the file is opened in Firefox instead.

The default command for opening a file in linux is ‘xdg-open’.
If I run ‘xdg-open myfile.html’ from the terminal it correctly open the file with Chrome.

Is there any Sublime setting for the browser to use???

0 Likes

#2

found the bug:
bugs.python.org/issue14493

python webbrowser module should use xdg-open or gvfs-open instead of the deprecated gnome-open

A workaround for this is to install libgnome (2.32)
or :
ln -sf /usr/bin/gvfs-open /usr/bin/gnome-open

0 Likes

On macOS, right click on a link and choose open, opens it in Firefox, not the default browser
#3

I’m using Ubuntu 12.04 and Sublime Text 2.0.1 and I’m having the same problem.
Google Chrome is my default browser in Ubuntu. When I double-click on an html file, the file is opened in Chrome, but in Sublime, when I click on “Open in Browser” from contextual menu in an html file, it is opened in Firefox.
The path /usr/bin/gnome-open doesn’t exist in Ubuntu 12.04.
Any solution?.

0 Likes

#4

I have the same setup as eduardobape and I too cannot get code to open in Chrome even though it is set as the default browser.

I tried ln -sf /usr/bin/gvfs-open /usr/bin/gnome-open and received the message: ln: failed to create symbolic link `/usr/bin/gnome-open’: Permission denied

I then tried sudo ln -sf /usr/bin/gvfs-open /usr/bin/gnome-open. No error returned, but it still opens in Firefox.

I have a Windows 7 x64 laptop with Sublime Text 2 installed and code opens in Chrome fine.

Any resolution to this issue? I’m honestly ready to plunk down the money for this editor, but I’d like it to work the same across all my computers.

Greg

0 Likes