{"id":77,"date":"2010-01-05T17:32:00","date_gmt":"2010-01-05T22:32:00","guid":{"rendered":"http:\/\/clusterbleep.net\/blog\/2010\/01\/linux-file-type-to-opening-program-mappings\/"},"modified":"2010-01-05T17:32:00","modified_gmt":"2010-01-05T22:32:00","slug":"linux-file-type-to-opening-program-mappings","status":"publish","type":"post","link":"http:\/\/clusterbleep.net\/blog\/2010\/01\/05\/linux-file-type-to-opening-program-mappings\/","title":{"rendered":"Linux File Type to Opening Program Mappings"},"content":{"rendered":"<p>I learned a few useful things while helping a chap troubleshoot a problem in #ubuntu-us-mi today. It seems that <a href=\"http:\/\/www.videolan.org\/vlc\/\">VLC<\/a> had taken over as the default program for opening folders and directories on his Ubuntu computer, and he couldn&#8217;t figure out how to fix it. He found that if he uninstalled VLC, then the folders opened correctly again, but this was not really a solution as he needed VLC.<\/p>\n<p>After some Googling, I found out where the default programs for each file type are specified, and also where the user-specific programs are set:<\/p>\n<p>System Defaults: <span style=\"font-family: 'Courier New', Courier, monospace;\">\/usr\/share\/applications<\/span><br \/>User Specific: <span style=\"font-family: 'Courier New', Courier, monospace;\">~\/.local\/share\/applications<\/span><\/p>\n<p>Most GUI programs that can open a file have a .desktop entry in those folders. The actual file type to program mappings are in the following text files:<\/p>\n<p>System Default:<span style=\"font-family: 'Courier New', Courier, monospace;\"> \/usr\/share\/applications\/defaults.list<\/span><br \/>User-Specific Overrides: <span style=\"font-family: 'Courier New', Courier, monospace;\">~\/.local\/share\/applications\/mimeapps.list<\/span><\/p>\n<p>My mimeapps.list looks like this (note that I have both Ubuntu and Kubuntu installed):<br \/><span style=\"font-family: 'Courier New', Courier, monospace;\">[Added Associations]<\/span> <br \/><span style=\"font-family: 'Courier New', Courier, monospace;\">application\/x-shellscript=gedit.desktop;<\/span><br \/><span style=\"font-family: 'Courier New', Courier, monospace;\">application\/x-extension-grab=gedit.desktop;<\/span><br \/><span style=\"font-family: 'Courier New', Courier, monospace;\">image\/x-pcx=firefox.desktop;<\/span><br \/><span style=\"font-family: 'Courier New', Courier, monospace;\">application\/x-php=gedit.desktop;<\/span><br \/><span style=\"font-family: 'Courier New', Courier, monospace;\">application\/x-aspx=gedit.desktop;<\/span><br \/><span style=\"font-family: 'Courier New', Courier, monospace;\">application\/x-executable=userapp-mono-63I5PU.desktop;<\/span><br \/><span style=\"font-family: 'Courier New', Courier, monospace;\">application\/x-config=gedit.desktop;<\/span><br \/><span style=\"font-family: 'Courier New', Courier, monospace;\">text\/x-python=gedit.desktop;userapp-mono-63I5PU.desktop;wine.desktop;openoffice.org-writer.desktop;kde4-kate.desktop;gvim.desktop;<\/span><\/p>\n<p>In his mimeapps.list, the user had a line like: <\/p>\n<div style=\"font-family: &quot;Courier New&quot;,Courier,monospace;\">inode\/directory=vlc.desktop;nautilus-folder-handler.desktop;<\/div>\n<p>After deleting that entry in his mimeapps.list normal behavior was restored.<\/p>\n<p>One other observation is that the line was unchanged when VLC was uninstalled. So Gnome simply skipped over the vlc.desktop when it couldn&#8217;t find the program and used the next one in line to open folders.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I learned a few useful things while helping a chap troubleshoot a problem in #ubuntu-us-mi today. It seems that VLC had taken over as the default program for opening folders and directories on his Ubuntu computer, and he couldn&#8217;t figure &hellip; <a href=\"http:\/\/clusterbleep.net\/blog\/2010\/01\/05\/linux-file-type-to-opening-program-mappings\/\">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":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[13,6,5,7,12],"tags":[],"class_list":["post-77","post","type-post","status-publish","format-standard","hentry","category-grlug","category-linux","category-planet-ubuntu-users","category-tech","category-wmlug"],"_links":{"self":[{"href":"http:\/\/clusterbleep.net\/blog\/wp-json\/wp\/v2\/posts\/77","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/clusterbleep.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/clusterbleep.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/clusterbleep.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/clusterbleep.net\/blog\/wp-json\/wp\/v2\/comments?post=77"}],"version-history":[{"count":0,"href":"http:\/\/clusterbleep.net\/blog\/wp-json\/wp\/v2\/posts\/77\/revisions"}],"wp:attachment":[{"href":"http:\/\/clusterbleep.net\/blog\/wp-json\/wp\/v2\/media?parent=77"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/clusterbleep.net\/blog\/wp-json\/wp\/v2\/categories?post=77"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/clusterbleep.net\/blog\/wp-json\/wp\/v2\/tags?post=77"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}