Am 01.03.2016 um 22:15 schrieb Peter Mattern:
> According to the MIME Applications Specification mentioned earlier file 
> mimeapps.list gets sourced at $XDG_CONFIG_HOME and 
> $XDG_DATA_HOME/applications with the former taking precedence over the 
> latter, environment variables according to the Base Directory 
> Specification [0].
> Looking into your issue made me realize that 'xdg-mime default' adds to 
> $XDG_DATA_HOME/applications/mimeapps.list but both 'xdg-mime query' and 
> xdg-open respect the precedence mentioned above. This in turn means that 
> settings made by 'xdg-mime default' are out of the door as soon as some 
> other applications writes to $XDG_CONFIG_HOME/mimeapps.list. This is 
> what e. g. all Mozilla applications do to set themselves as default 
> applications.
> Brilliant.
>
> Chrom{ium,e} on the other hand indeed seems to have some issue right now 
> due to which it doesn't write to mimeapps.list at any of the two 
> locations and doesn't source them either as it doesn't register when it 
> is indeed set as default browser.
>
> So all in all what you could do is edit $XDG_CONFIG_HOME/mimeapps.list 
> manually, MIME types x-scheme-handler/http[s], or use gvfs-mime which is 
> writing in that file as well and stop Chromium from whining about not 
> being the default browser which can apparently be done easily from its UI.
Setting only x-scheme-handler/http[s] may not be sufficient.
To check what is returned as default browser, I suggest:


 xdg-settings get default-web-browser
 xdg-settings get default-url-scheme-handler http
 xdg-settings get default-url-scheme-handler https
 xdg-mime query default x-scheme-handler/http
 xdg-mime query default x-scheme-handler/https
 for i in application/x-extension-html application/x-extension-shtml
application/x-extension-xhtml application/xhtml+xml text/html; do
   xdg-mime query default $i
 done

To set e.g. chrome as default browser, this is what I use:
(assuming that the .desktop file normally in /usr/share/applications
is called google-chrome.desktop, you may need to adapt if it's called 
differently)

 browser="google-chrome.desktop"
 xdg-settings set default-web-browser $browser
 xdg-settings set default-url-scheme-handler http $browser
 xdg-settings set default-url-scheme-handler https $browser
 xdg-mime default $browser x-scheme-handler/http
 xdg-mime default $browser x-scheme-handler/https
 xdg-mime default $browser x-scheme-handler/about
 for i in application/x-extension-html application/x-extension-shtml
application/x-extension-xhtml application/xhtml+xml text/html; do
   xdg-mime default $browser $i
 done

(the for loop at the end is really only necessary if you also want
your browser to be the default viewer for .html files and such)
Then repeat all the checks from above again and verify
that everything returns google-chrome ...

>
> [0] https://www.freedesktop.org/wiki/Specifications/basedir-spec
>
> ------------------------------------------------------------------------------
> Site24x7 APM Insight: Get Deep Visibility into Application Performance
> APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
> Monitor end-to-end web transactions and take corrective actions now
> Troubleshoot faster and improve end-user experience. Signup Now!
> http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
> _______________________________________________
> Lxde-list mailing list
> Lxde-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/lxde-list
>


------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Lxde-list mailing list
Lxde-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxde-list

Reply via email to