I find this command
sudo update-alternatives –config x-www-browser
I choose Chrome. It works for xpdf, but Evince still starts Firefox after click.
I feel Linux is not standard. I use Linux Mint 8 (Helena) LXDE.
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.Sign up to join this community
As far as I understand LXDE uses xdg to do calls to applications. This command should fix your issue:
To find out which application opens a pdf file :
xdg-mime query default application/pdf
To set the application to evince
xdg-mime default evince.desktop application/pdf
This should work if your application is registered to the desktop (i.e. if there is a launcher)
Solving your issue is like voodoo, even when there are "protocols" regarding how and which applications are supposed to open a specific kind of file. You'll see that they're very inconsistent between systems and different desktop environments.
So there's no really a "right" answer. I had a similar problem with firefox, so I'm giving you my solution:
~/.local/share/applications/defaults.listif it doesn't exist
Add the following
[Default Applications] application/pdf=evince.desktop;
...or just the last line if there's something before.
I had a reverse problem - I want firefox to open the links, but evince started chromium no matter what.
strace -o /tmp/output evince to see what functions are called and found this in the log:
open("/home/koniu/.local/share/applications/firefox.desktop;", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) open("/usr/local/share/applications/firefox.desktop;", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) open("/usr/share/applications/firefox.desktop;", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) open("/home/koniu/.local/share/applications/chromium.desktop", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) open("/usr/local/share/applications/chromium.desktop", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory) open("/usr/share/applications/chromium.desktop", O_RDONLY|O_LARGEFILE) = 16
No idea why there's a semicolon included in the firefox.desktop but I created
/home/koniu/.local/share/applications/firefox.desktop with the following content:
[Desktop Entry] Name=Firefox Exec=/usr/bin/firefox %U Terminal=false X-MultipleArgs=false Type=Application Icon=firefox Categories=Network;WebBrowser; MimeType=text/html;text/xml;application/xhtml_xml;x-scheme-handler/http;x-scheme-handler/https; StartupNotify=true
firefox as desired.
To change Gnome applications you need to use gconftool:
$ gconftool -s /desktop/gnome/url-handlers/http/command -t string 'chromium-browser %s'
To check the changes:
$ gconftool -g /desktop/gnome/url-handlers/http/command
Other Gnome applications:
/desktop/gnome/url-handlers/chrome/command /desktop/gnome/url-handlers/https/command /desktop/gnome/url-handlers/http/command /desktop/gnome/url-handlers/ftp/command
I know this is a very old question... but none of the answers seem to give the correct answer.
First check that
xdg-mime query default x-scheme-handler/http and
xdg-mime query default x-scheme-handler/https both returns
Then to set Evince (any other Gnome apps that encounter a URL) to use chromium instead:
xdg-mime default chromium-browser.desktop x-scheme-handler/http and
xdg-mime default chromium-browser.desktop x-scheme-handler/https