Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 78890 - Open Office resolves mozilla symlinks before invoking causing mozilla-launcher to output unknown browser
Summary: Open Office resolves mozilla symlinks before invoking causing mozilla-launche...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Mozilla Gentoo Team
URL: http://forums.gentoo.org/viewtopic.ph...
Whiteboard:
Keywords:
: 81446 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-01-20 18:31 UTC by Martin OConnor
Modified: 2006-10-08 03:23 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Updates mozilla-launcher to pretend it was called as the contents of $MOZILLALAUNCHER (mozilla-launcher.diff,100 bytes, patch)
2005-01-20 18:32 UTC, Martin OConnor
Details | Diff
Updates /etc/profile to export $MOZILLALAUNCHER from /etc/rc.conf or default to "mozilla" (profile.diff,136 bytes, patch)
2005-01-20 18:34 UTC, Martin OConnor
Details | Diff
Updates /etc/profile to export $MOZILLALAUNCHER from /etc/rc.conf or default to "mozilla" (profile.diff,135 bytes, patch)
2005-01-20 18:50 UTC, Martin OConnor
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin OConnor 2005-01-20 18:31:14 UTC
Open Office resolves mozilla symlinks before invoking causing mozilla-launcher to output unknown browser. This also happens when OOo is first installed and sets the link for http documents to /usr/libexec/mozilla-launcher

There are a couple of solutions to this.
1)cp mozilla-launcher mozilla
2)change the /usr/bin/mozilla symlink to a hardlink

3) see attached patches
Note: introduces a new variable to /etc/rc.conf - $MOZILLALAUNCHER
this should be set equal to the mozilla progrem you want to run
eg firefox mozilla etc
it defaults to mozilla if not set

Reproducible: Always
Steps to Reproduce:
1.Install mozilla
2.Install OOo
3.Try to register from OOo help menu.
Actual Results:  
mozilla-launcher outputs unknown browser

Expected Results:  
mozilla-launcher starts configured mozilla application
Comment 1 Martin OConnor 2005-01-20 18:32:54 UTC
Created attachment 49079 [details, diff]
Updates mozilla-launcher to pretend it was called as the contents of $MOZILLALAUNCHER
Comment 2 Martin OConnor 2005-01-20 18:34:20 UTC
Created attachment 49081 [details, diff]
Updates /etc/profile to export $MOZILLALAUNCHER from /etc/rc.conf or default to "mozilla"
Comment 3 Martin OConnor 2005-01-20 18:50:40 UTC
Created attachment 49082 [details, diff]
Updates /etc/profile to export $MOZILLALAUNCHER from /etc/rc.conf or default to "mozilla"

Minor cosmetic change
Comment 4 Paul de Vrieze (RETIRED) gentoo-dev 2005-01-21 05:21:14 UTC
I think that it would be better to fix this broken behaviour from openoffice (possibly find out why it's done this way)
Comment 5 Martin OConnor 2005-01-21 07:39:00 UTC
true, but I think the symlink problem with mozilla-launcher affects more than just OOo, but OOo is a prime example. Maybe the bug should be assigned to mozilla team?
Comment 6 Paul de Vrieze (RETIRED) gentoo-dev 2005-02-11 02:26:40 UTC
*** Bug 81446 has been marked as a duplicate of this bug. ***
Comment 7 Aron Griffis (RETIRED) gentoo-dev 2005-03-16 09:12:50 UTC
There's no way I'd consider this a bug in mozilla-launcher.  It's unnecessary and ridiculous for OOo to be resolving the symlinks itself instead of relying on UNIX filesystem semantics.  I've never heard of any other respectable program that.

This needs to be fixed in OOo
Comment 8 Bel Zébute 2005-03-17 01:06:44 UTC
Well, this problem exist also in Poseidon for UML.  So this is probably more a mozilla-launcher bug than you might admit.

A fix would probably be using the hardlink, but it would not work from mounted filesystem (well, is /usr/bin and /usr/lib being different mount point exist in the world?).

Leaving this as is, is a bug.
Comment 9 Martin OConnor 2005-03-17 05:46:25 UTC
The patches included with this bug cause mozilla-launcher to launch a mozilla app as specified in /etc/profile if it is called as 'mozilla-launcher'. This default action is better than failing with an error, and is made flexable by the fact that the default is user configurable.
Comment 10 Aron Griffis (RETIRED) gentoo-dev 2005-03-17 12:45:19 UTC
Martin, I will not use the proposed patches in this bug.  No offense intended, but they're a bad hack to workaround brokenness in OOo (and apparently another broken application).  mozilla-launcher already has a transparent mechanism to determine what browser should be called.  Adding another mechanism that breaks the transparency and relies on users editing their environment to determine their browser choice is not a good idea.

I will look into fixing OOo first.  If that fails, then I'll consider copying instead of symlinking, though this requires quite a lot more work in the post-install scripts to determine whether the copy is allowed to be moved or updated.  The entire process needs to remain transparent.

As far as I'm concerned, whoever implemented this on OOo needs a whack with the clue-bat
Comment 11 Martin OConnor 2005-03-17 16:40:41 UTC
I probably should have emphisised that the patches were only intended as a temporary solution for people to use until OOo and others are fixed.
I submitted them in the hopes that people would find them useful for that task.
Comment 12 Martin OConnor 2005-03-17 16:41:30 UTC
Should this be an upstream bug for OOo?
Comment 13 Aron Griffis (RETIRED) gentoo-dev 2005-03-23 10:37:58 UTC
Martin, in that case thanks for putting the patches in this bug.  Hopefully they have been useful to somebody.

Regarding OOo, you may feel free to file a bug upstream.  Here are my thoughts which might be helpful: Some programs act differently depending on how they are named.  It is a common practice in UNIX to use a symbolic link to a program to call it by a different name.  Other than mozilla-launcher, here are some more examples:  bunzip2 -> bzip2, zcat -> gzip, rbash -> bash, ypdomainname -> hostname, vim -> gvim.  The list goes on.  OOo's practice of resolving symbolic links at the application level breaks programs relying on that behavior.

At this point I've committed new versions of mozilla-launcher, mozilla, mozilla-firefox, mozilla-thunderbird, mozilla-bin, mozilla-firefox-bin, and mozilla-thunderbird-bin.  These versions use a stub script in /usr/bin instead of a symlink.  The stub sets MOZILLA_LAUNCHER which is honored by mozilla-launcher-1.28.  Please give them a try and let me know how it goes.
Comment 14 Aron Griffis (RETIRED) gentoo-dev 2005-03-23 10:44:16 UTC
If the fix doesn't work, please re-open this bug
Comment 15 Kenyon Ralph 2005-03-23 11:51:01 UTC
Doesn't work, it adds ",new-" to the end of every URL.
Comment 16 Kenyon Ralph 2005-03-23 11:59:04 UTC
Ah actually only when a firefox window is already open, it adds ",new-".  Lines 100 and 102 of mozilla-launcher cause this.

When a firefox window is NOT already open, the launcher works fine.

Changing lines 100 and 102 to this:
try_running "openURL($u)" || retval=$?

makes it work.  But then it's not using $MOZILLA_NEWTYPE, I'm not sure how that is supposed to work.
Comment 17 Aron Griffis (RETIRED) gentoo-dev 2005-03-24 14:44:23 UTC
Kenyon, fixed in 1.29 and 1.30
Comment 18 Neil Darlow 2005-12-02 02:26:08 UTC
The wrapper scripts introduced for firefox and thunderbird introduce a breakage
that affects KDE users greatly i.e. we can no longer use *artsdsp* to obtain
sound in these applications - because artsdsp won't work for non-binaries.
Comment 19 Alexander Skwar 2006-10-08 03:23:56 UTC
Is this script still needed for OOo 2.x?