Re: [CentOS] xdgurl
On Wed, Oct 19, 2016 at 10:25:43PM -0400, Mark LaPierre wrote: > 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: > Just a guess... did you really mean to have "zdgurl" at the end of this string, as you show below? > 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/ > > ___ > CentOS mailing list > CentOS@centos.org > https://lists.centos.org/mailman/listinfo/centos -- Fred Smith -- fre...@fcshome.stoneham.ma.us - But God demonstrates his own love for us in this: While we were still sinners, Christ died for us. --- Romans 5:8 (niv) -- ___ CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] xdgurl
Mark LaPierre wrote: 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 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=false MimeType=x-scheme-handler/xdg; NoDisplay=true Then run: desktop-file-install $HOME/.local/share/applications/xdgdesktop \ --rebuild-mime-info-cache --dir=$HOME/.local/share/applications Start firefox and browse to a xdg:// URL - it still prompts for the application use the first time - but after that, it should work OK Note: I haven't actually done this for an 'xdg' protocol handler - but it works for launching other apps using other custom protocol handlers 2. Set up a protocol handler in a central autoconfig 'mozilla.cfg' file using Javascript - this is the method I use to automatically add a protocol handler for all users (and doesn't require any user intervention) - let me if you want more details about this method James Pearson ___ CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] xdgurl
On 10/20/16 07:06, James Pearson wrote: > Mark LaPierre wrote: >> 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 > > 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=false > MimeType=x-scheme-handler/xdg; > NoDisplay=true > > Then run: > > desktop-file-install $HOME/.local/share/applications/xdgdesktop \ > --rebuild-mime-info-cache --dir=$HOME/.local/share/applications > > Start firefox and browse to a xdg:// URL - it still prompts for the > application use the first time - but after that, it should work OK > > Note: I haven't actually done this for an 'xdg' protocol handler - but > it works for launching other apps using other custom protocol handlers > > 2. Set up a protocol handler in a central autoconfig 'mozilla.cfg' file > using Javascript - this is the method I use to automatically add a > protocol handler for all users (and doesn't require any user > intervention) - let me if you want more details about this method > > James Pearson 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/ ___ CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] xdgurl
Mark LaPierre wrote: Thanks for the detailed response. Just a minor error. The file name must have a .desktop extension like this: Sorry, a copy-n-paste error when creating the email 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, I don't know anything about xdg and xdgurl - only a little bit about adding protocol handlers to Firefox :-) James Pearson ___ CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos