{"id":28,"date":"2013-04-06T13:17:00","date_gmt":"2013-04-06T11:17:00","guid":{"rendered":"http:\/\/www.hauweele.net\/~gawen\/blog\/?p=28"},"modified":"2014-07-29T23:54:10","modified_gmt":"2014-07-29T21:54:10","slug":"default-applications-with-gtk-3-chromium-and-beyond","status":"publish","type":"post","link":"https:\/\/hauweele.net\/~gawen\/blog\/?p=28","title":{"rendered":"Default applications with GTK-3, Chromium and beyond"},"content":{"rendered":"<p>Today I was surprised to see a GTK-3 application opening an HTTP URL with Opera. I don&#8217;t use \u00a0Opera and I just installed by curiosity long ago and forgot about it. \u00a0I configured the Debian alternatives however GTK-3 seems to use <i>xdg-mime <\/i>as confirmed with an strace of the concerned application and references to <i>\/usr\/share\/applications\/defaults.list<\/i>. Note that you may have to create a symlink for <i>defaults.list<\/i> to <i>\/usr\/share\/applications\/mimeapps.list<\/i>.<\/p>\n<p>You can use the <i>xdg-mime<\/i> command to configure the default application for each protocol:<\/p>\n<pre>$ xdg-mime default chromium.desktop x-scheme-handler\/http\r\n$ xdg-mime default chromium.desktop x-scheme-handler\/https<\/pre>\n<p>You can also configure this manually by editing\u00a0<i>\/usr\/share\/applications\/defaults.list<\/i>. \u00a0Just add these two lines:<\/p>\n<pre>x-scheme-handler\/http=chromium.desktop\r\nx-scheme-handler\/https=chromium.desktop<\/pre>\n<p>In the <i>[Default Application]<\/i> section. Thunar and Chromium also use this so you can configure them to open PDF and handle Skype calls properly. See:<\/p>\n<pre>[Default Applications]\r\nx-scheme-handler\/http=chromium.desktop\r\nx-scheme-handler\/https=chromium.desktop\r\nx-scheme-handler\/skype=skype.desktop\r\ntext\/html=chromium.desktop\r\napplication\/pdf=mupdf.desktop<\/pre>\n<p>This should do the trick. You can get the list of available MIME types with this command (note that the path depends on the location of the shared-mime-info database):<\/p>\n<pre>find \/usr\/local\/share\/mime -name \"*.xml\" -exec cat {} \\; |g -E -o \"type=\\\".*\\\"\" | sort | uniq<\/pre>\n<p>Otherwise you may also use the\u00a0<i>dconf-editor <\/i>from the dconf-tools package or <i>gconf-editor <\/i>to configure GNOME-2\/3 default applications. With gconf you should search the following keys:<\/p>\n<pre>\/desktop\/gnome\/applications\r\n\/desktop\/gnome\/url-handlers<\/pre>\n<p>With dconf instead you should search for:<\/p>\n<pre>\/desktop\/gnome\/url-handlers\r\n\/org\/gnome\/desktop\/applications<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Today I was surprised to see a GTK-3 application opening an HTTP URL with Opera. I don&#8217;t use \u00a0Opera and I just installed by curiosity long ago and forgot about it. \u00a0I configured the Debian alternatives however GTK-3 seems to &hellip; <a href=\"https:\/\/hauweele.net\/~gawen\/blog\/?p=28\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[123,128,127,7,124,129,131,6,126,130,125],"class_list":["post-28","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-application","tag-chromium","tag-dconf","tag-debian","tag-default","tag-gconf","tag-gnome","tag-linux","tag-mime","tag-mupdf","tag-skype"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/hauweele.net\/~gawen\/blog\/index.php?rest_route=\/wp\/v2\/posts\/28","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hauweele.net\/~gawen\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hauweele.net\/~gawen\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hauweele.net\/~gawen\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hauweele.net\/~gawen\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=28"}],"version-history":[{"count":0,"href":"https:\/\/hauweele.net\/~gawen\/blog\/index.php?rest_route=\/wp\/v2\/posts\/28\/revisions"}],"wp:attachment":[{"href":"https:\/\/hauweele.net\/~gawen\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=28"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hauweele.net\/~gawen\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=28"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hauweele.net\/~gawen\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=28"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}