LibreOffice: why does "help" start gedit instead of the browser

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. In libreoffice the Help/Libreoffice Help menu item, and its F1 hot key, used to pass an html link to the default browser, but now it is passed to gedit. The second instance comes from the gnome terminal emulator, where it underlines any text under the mouse pointer that looked like a URL, and a Ctrl-LMB would pass said text to the browser. Once again it is now passed to gedit. Clearly one of the updates has changed a configuration, but grepping my home directory for the occurrence of "gedit" throws up a blank, so it must be deeper than the mere user. Looking in /etc/ didn't give any joy either. I find that the search terms I tried in google had too many false matches to be of help. Does anyone have some hints on where to look?

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). 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. 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. since you run Fedora and he works for Redhat as Chief OS Butcher to turn Linux into a poor imitation of a Mac, you're particularly vulnerable to having his creations foisted upon you. OTOH, xdg doesn't seem actually bad or broken like most of his other stuff....just a pointless reinvention.
Clearly one of the updates has changed a configuration, but grepping my home directory for the occurrence of "gedit" throws up a blank, so it must be deeper than the mere user. Looking in /etc/ didn't give any joy either.
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...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). try 'xdg-mime query default text/html' or set the default with 'xdg-mime default application mimetype(s)' see also the man pages and other documentation.
Does anyone have some hints on where to look?
apart from xdg, look under /usr/share/applnk/ (KDE-specific, i think) or /usr/local/share/applications/ (gnome and others, i think) also in ~/.local/share/applications and probably in numerous other crufty locations if you've been continuously upgrading your system for years. craig -- craig sanders <cas@taz.net.au> BOFH excuse #312: incompatible bit-registration operators

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.

On Tue, Feb 28, 2012 at 11:34:32AM +1100, Trent W. Buck wrote:
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:
i'm not using the debian calibre packages. they've probably got this crap sorted out. instead, i'm foolishly using the upstream calibre binary. when i started using it, the debian calibre package was grotesquely ancient and out of date. now it seems to be within a version or two of upstream, so i should probably switch back (the author, Kovid Goyal, knows his stuff WRT ebook formats but is as clueless about packaging and system integration as he is about GUIs[1], smtp, security and pretty much everything else he thinks he's an expert on). instead i use the following update-calibre.sh script to install/upgrade calibre in /opt/calibre: ---cut here--- #! /bin/bash cd /opt DATE=$(stat -c '%y' calibre/bin/calibre | awk '{print $1}') mv calibre "calibre.$DATE" python -c "import sys; py3 = sys.version_info[0] > 2; u = __import__('urllib.request' if py3 else 'urllib', fromlist=1); exec(u.urlopen('http://status.calibre-ebook.com/linux_installer').read()); main(install_dir='/opt')" touch -r calibre/bin/calibre calibre rm -fv /usr/share/applnk/calibre*.desktop /usr/local/share/applications/calibre*.desktop ---cut here--- [1] have you seen the calibre GUI? NIH-syndrome on seriously bad drugs (datura or some other deleriant, i reckon). craig -- craig sanders <cas@taz.net.au> BOFH excuse #105: UPS interrupted the server's power

Craig Sanders <cas@taz.net.au> wrote:
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...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).
There may have been a post-install script in the package that changed the default. Based on the xdg-mime manual page, it seems there can only be one default application and that Craig's statements above are correct. Nor is it clear to me where the defaults are stored - it probably invokes whatever configuration system your desktop environment uses. Under Gnome, this component is now Gsettings, with Dconf as the storage mechanism. The latter could be better documented: I wanted to change configuration parameters for Gdm under Debian. I tried executing gsettings under the Debian-gdm user, but that failed (unable to connect to D-Bus etc.), whereas the same operation executed as the user running the desktop session works, but obviously changes that user's settings, not Gdm's. It turns out that there's a configuration file for desktop Gdm settings, which at some point when I get back to this task I'm going to try editing. Dconf has its own binary format. There's a command, though (documented in the changelog only for now) to dump part or all of the database to a text file, and a corresponding command for the reverse operation.
participants (4)
-
Allan Duncan
-
Craig Sanders
-
Jason White
-
Trent W. Buck