
Craig Sanders wrote:
On Mon, Feb 27, 2012 at 11:13:30PM +1100, Allan Duncan wrote:
My desktop runs a bastardised Fedora 14 with gnome 2.32
There have been a few software updates on my box of recent time and somewhere along the way the linking of keys to actions have broken. I have two specific cases to report.
there's been a squillion different ways to associate mimetypes with applications over the years, the latest fad seems to be xdg (as i discovered when fighting calibre's annoying habit of becoming the default pdf viewer whenever you upgrade it - i got so sick of that, my update-calibre.sh script just runs "rm -fv /usr/share/applnk/calibre*.desktop /usr/local/share/applications/calibre*.desktop" after every upgrade).
If you're on Debian (as I recall), you can and should use dpkg-divert instead, so dpkg will simply remember that you hate that non-conffile. Like this: dpkg-divert --rename /usr/share/applications/alacarte.desktop ; System>Preferences>Main Menu dpkg-divert --rename /usr/share/applications/gnome-network-properties.desktop ; System>Preferences>Network Proxy dpkg-divert --rename /usr/share/applications/baobab.desktop dpkg-divert --rename /usr/share/applications/blackjack.desktop dpkg-divert --rename /usr/share/applications/gcompris-edit.desktop dpkg-divert --rename /usr/share/applications/glines.desktop dpkg-divert --rename /usr/share/applications/gnibbles.desktop dpkg-divert --rename /usr/share/applications/gnobots2.desktop dpkg-divert --rename /usr/share/applications/gnome-nettool.desktop dpkg-divert --rename /usr/share/applications/gnome-sound-recorder.desktop dpkg-divert --rename /usr/share/applications/gnome-system-log.desktop dpkg-divert --rename /usr/share/applications/gnome-system-monitor.desktop dpkg-divert --rename /usr/share/applications/gnotski.desktop dpkg-divert --rename /usr/share/applications/gtali.desktop dpkg-divert --rename /usr/share/applications/hwtest-gtk.desktop dpkg-divert --rename /usr/share/applications/polkit-gnome-authorization.desktop dpkg-divert --rename /usr/share/applications/rasmol-classic.desktop dpkg-divert --rename /usr/share/applications/redhat-system-config-printer.desktop
personally, i can't see what was so wrong with ~/.mailcap or /etc/mailcap that it needed to be changed. i gave up paying much attention to desktop configuration shit years ago - there hardly seems any point, it'll have changed to something completely different within a few months.
+1, BTDTBTTS re XDG, and heartily second the "what's so bad about mailcap?"
hmmm. http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html has Lennart Poettering as one of the three authors. that probably explains it - if it's anything like his other work, it's pointless change for the sake of pointless change and to avoid the tedious chore of LP bothering to understand how already-existing systems work rather than inventing his own half-arsed incomplete alternative. he's kind of like a slightly less obnoxious and significantly less talented djb.
+1. What I *really* don't understand is why anybody listens to him.
OTOH, xdg doesn't seem actually bad or broken like most of his other stuff....just a pointless reinvention.
You can't express stuff like "if I'm in X and not in a tty" in XDG, though, you'd have to write some wrapper sh script and call it like exec=/usr/lib/FooApp/xdg-wrapper.sh.
the gedit update probably declared that it could handle text/html and somehow got highest priority. actually, AFAICT, there isn't any way to actually set priorities...
I think I worked that one out... hmm, nope, I only worked out how to hide things from the GNOME menu: find /usr/share/applications -type f -name "*.desktop" -exec sed -ri "/^Categories=/ s/(Kids)?Game;//g" "{}" +
it seems you can either set an application to be the default or the most recent definition wins (but don't take my word for it - i'm far from an expert on xdg).
I expect it depends on collation order, so LC_COLLATE=C xdg-open wank.png and LC_COLLATE=EBCDIC xdg-open wank.png can yield different results.