Velvet Star Monitor

Standout celebrity highlights with iconic style.

updates

Where to change how xdg-open opens urls? sync with kde-open?

Writer Sebastian Wright
  • kde-open "" is nice, and opens the URL in my webbrowser
  • but xdg-open "" opens the link in my texteditor :-(

I know where I find the file-association in KUbuntu, but as kde-open works, I guess thats not where the problem is.

Can I sync xdg-open to use the same program as the kde-open?
Or at least change its behavior for http(s)-URLs?

(The main problem is that some programs, like the slack-client, uses xdg-open to open files and URLs.)

Update 1

x-www-browser and gnome-www-browser in update-alternatives:

update-alternatives --display x-www-browser
x-www-browser - auto mode link best version is /usr/bin/firefox link currently points to /usr/bin/firefox link x-www-browser is /usr/bin/x-www-browser slave x-www-browser.1.gz is /usr/share/man/man1/x-www-browser.1.gz
/usr/bin/chromium-browser - priority 40
/usr/bin/firefox - priority 40
/usr/bin/konqueror - priority 30 slave x-www-browser.1.gz: /usr/share/man/man1/konqueror.1.gz

and gnome-www-browser

update-alternatives --display gnome-www-browser
gnome-www-browser - auto mode link best version is /usr/bin/firefox link currently points to /usr/bin/firefox link gnome-www-browser is /usr/bin/gnome-www-browser
/usr/bin/chromium-browser - priority 40
/usr/bin/firefox - priority 40

Both point to firefox, no trace of kwrite.

2

1 Answer

It looks like xdg-open has internal settings at least I could make it open different browser than the one set within update-alternatives.

$ xdg-settings --list
Known properties: default-url-scheme-handler Default handler for URL scheme default-web-browser Default web browser
$ xdg-settings get default-web-browser
chromium.desktop
$ update-alternatives --display x-www-browser
x-www-browser - auto mode link best version is /usr/bin/firefox link currently points to /usr/bin/firefox link x-www-browser is /usr/bin/x-www-browser
/usr/bin/chromium-browser - priority 40
/usr/bin/firefox - priority 40

To fix that:

xdg-settings set default-web-browser firefox.desktop

Verify:

$ xdg-settings get default-web-browser
firefox.desktop
$ xdg-open ""
[opens firefox now]
4

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy