Xdgurl
Has anyone figured out how to make Firefox 45.4.0 on CentOS 6 use xdgurl to handle xdg:// URLs?
Google is full of suggestions that don’t work. When I select a an xdg:// link I don’t get a dialog asking me what to do like Google says I
will. Instead I get a message that says Firefox doesn’t have a clue how to handle this URL. Do you want to try again?
I tried about:config
I added:
network.protocol-handler.external.xdg user set string /usr/bin/zdgurl
Still no joy.
—
_
°v°
/(_)\
^ ^ Mark LaPierre Registered Linux user No #267004
https://linuxcounter.net/
****
4 thoughts on - Xdgurl
Just a guess… did you really mean to have “zdgurl” at the end of this string, as you show below?
^
Mark LaPierre wrote:
I don’t think those types of prefs are used any more ?
A lot of the information out there on adding protocol handlers to Firefox on Linux is out of date or wrong …
A couple of ways that work for me (on CentOS 6, using Gnome) with Firefox 45:
1. Create the file $HOME/.local/share/applications/xdg containing
[Desktop Entry]
Name=xdg Type=Application Exec=/usr/bin/xdgurl %U
Terminal
Hey James,
Thanks for the detailed response. Just a minor error. The file name must have a .desktop extension like this:
1. Create the file $HOME/.local/share/applications/xdg.desktop containing:
[Desktop Entry]
Name=xdg Type=Application Exec=/usr/bin/xdgurl %U
Terminal=false MimeType=x-scheme-handler/xdg;
NoDisplay=true
Then run:
desktop-file-install $HOME/.local/share/applications/xdg.desktop \
–rebuild-mime-info-cache –dir=$HOME/.local/share/applications
I restarted Firefox then I went to visit:
https://www.gnome-look.org/p/1157815/
I clicked on the [Install] button.
I got the dialog box where I chose the handler /usr/bin/xdgurl
I did not get the install dialog.
In a shell:
[mlapier@peach ~]$ which xdgurl
/usr/bin/xdgurl
[mlapier@peach ~]$ xdgurl
“xdg://install?url=https%3A%2F%2Fdl.opendesktop.org%2Fapi%2Ffiles%2Fdownload%2Fid%2F1476439340%2Frmfixed.bdf&type=fonts&filename=rmfixed.bdf”
Traceback (most recent call last):
File “/usr/bin/xdgurl”, line 21, in
if sys.version_info.major >= 3:
AttributeError: ‘tuple’ object has no attribute ‘major’
[mlapier@peach ~]$
No joy,
—
_
°v°
/(_)\
^ ^ Mark LaPierre Registered Linux user No #267004
https://linuxcounter.net/
****
Mark LaPierre wrote:
Sorry, a copy-n-paste error when creating the email
I don’t know anything about xdg and xdgurl – only a little bit about adding protocol handlers to Firefox :-)
James Pearson