|Tech Tip: Resetting the GLib/Gtk+ Default Apps on Linux (e.g: the Default Browser)
||[Mar. 8th, 2014|01:31 pm]
Shlomif's Technical Posts Community
In this tip, I would like to describe how to reset the default apps, and
especially the default browser, for
are used by desktops like GNOME and XFCE, and by GTK+ applications
such as HexChat or claws-mail. My problem originally was that I accidentally
pressed the "Yes" button when Firefox Nightly (installed under a prefix
/opt) asked me whether I should set it as the default
browser, which caused HexChat and Claws-Mail to open links using it by
Anyway, to resolve this problem do this:
Backup this directory somewhere safe.
mimeapps.list file contains the reference to use the offending
apps under the
*.desktop files there which you can search
for the reference to the apps.
Remove these line or their portions from
Now you may need to restart the desktop apps or the desktop environment (not
Hope it helps.
Here’s how I found it: after some false leads of either
trying to recursively search my home directory for occurrences of
/opt/firefox and reading the source code of HexChat, GLib
and gtk+ to see where this happens (there were too many levels of indirection
there), I ended up doing “strace -f -o hexchat.strace hexchat” and inspecting
the strace file for hints.
You can reuse this entry under
the Creative Commons
Attribution 3.0 Unported licence, or at your option any later version.
of how to comply with it.