[GUTSY] Cannot execute /usr/lib/firefox/x-www-browser-bin.

Bug #117575 reported by Laurent Bigonville
4
Affects Status Importance Assigned to Milestone
Mozilla Firefox
Fix Released
High
firefox (Ubuntu)
Fix Released
High
Mozilla Bugs

Bug Description

Binary package hint: firefox

Hi,

I don't know exactly where the problem comes from, but when I try to run firefox using sensible-browser i get an error.

$ /etc/alternatives/x-www-browser

run-mozilla.sh: Cannot execute /usr/lib/firefox/x-www-browser-bin.

ls -la /etc/alternatives/x-www-browser
lrwxrwxrwx 1 root root 16 2007-05-29 17:45 /etc/alternatives/x-www-browser -> /usr/bin/firefox

Related branches

Changed in firefox:
assignee: nobody → mozilla-bugs
Revision history for this message
John Vivirito (gnomefreak) wrote :

Thank you for your bug report,
  Can you please provide us with a step by step set of instructions on how to reproduce this, Im not real sure what you mean by sensible-browser or where you got the command from.

Changed in firefox:
status: Unconfirmed → Needs Info
Revision history for this message
Laurent Bigonville (bigon) wrote :

bigon@imladris:~$ sensible-browser

run-mozilla.sh: Cannot execute /usr/lib/firefox/gnome-www-browser-bin.

bigon@imladris:~$ x-www-browser

run-mozilla.sh: Cannot execute /usr/lib/firefox/x-www-browser-bin.

(uptodate gutsy)

Revision history for this message
Hilario J. Montoliu (hjmf) (hmontoliu) wrote :

I can confirm this in my gutsy chroot:

(gutsy_chroot)hjmf@paleo:/$ x-www-browser

run-mozilla.sh: Cannot execute /usr/lib/firefox/x-www-browser-bin.

The link in alternatives is OK:

(gutsy_chroot)hjmf@paleo:/$ ls -l /etc/alternatives/x-www-browser
lrwxrwxrwx 1 root root 16 Jun 11 14:06 /etc/alternatives/x-www-browser -> /usr/bin/firefox

Changed in firefox:
importance: Undecided → High
status: Needs Info → Confirmed
Revision history for this message
Hilario J. Montoliu (hjmf) (hmontoliu) wrote :

Possible solution, since the stuff to deal with the symlinks is OK in the scrip but somebody missed to pass the resulting "progbase" variable to the main process:

--- /usr/bin/firefox 2007-06-13 15:37:26.000000000 +0200
+++ /usr/bin/firefox 2007-06-13 15:39:37.000000000 +0200
@@ -111,6 +111,7 @@
     bn=`basename "$progname"`
     cd `dirname "$progname"`
     progname=`/bin/ls -l "$bn" | sed -e 's/^.* -> //' `
+ progbase="$bn"
     if [ ! -x "$progname" ]; then
       break
     fi

Changed in firefox:
status: Confirmed → In Progress
Revision history for this message
Hilario J. Montoliu (hjmf) (hmontoliu) wrote :

Here is the right patch, set progbase from last progname assignement:

--- /usr/bin/firefox 2007-06-13 15:37:26.000000000 +0200
+++ /usr/bin/firefox 2007-06-13 16:23:40.000000000 +0200
@@ -111,6 +111,7 @@
     bn=`basename "$progname"`
     cd `dirname "$progname"`
     progname=`/bin/ls -l "$bn" | sed -e 's/^.* -> //' `
+ progbase=`basename "$progname"`
     if [ ! -x "$progname" ]; then
       break
     fi

Revision history for this message
In , Hilario J. Montoliu (hjmf) (hmontoliu) wrote :

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.4) Gecko/20061201 Firefox/2.0.0.4 (Ubuntu-feisty)
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.4) Gecko/20070601 Ubuntu/7.10 (gutsy) Firefox/2.0.0.4

If you call firefox through a symlink, e.g. /etc/alternatives/x-www-browser you get the error:

(gutsy_chroot)hjmf@paleo:/$ x-www-browser

run-mozilla.sh: Cannot execute /usr/lib/firefox/x-www-browser-bin.

The link in alternatives is OK:

(gutsy_chroot)hjmf@paleo:/$ ls -l /etc/alternatives/x-www-browser
lrwxrwxrwx 1 root root 16 Jun 11 14:06 /etc/alternatives/x-www-browser -> /usr/bin/firefox

After looking at /usr/bin/firefox script the error seems to be: in the part that deals with symlinks, seems that somebody missed to pass back the resulting "$progbase" variable to the main process.

Possible patch can be:
--- /usr/bin/firefox 2007-06-13 15:37:26.000000000 +0200
+++ /usr/bin/firefox 2007-06-13 16:23:40.000000000 +0200
@@ -111,6 +111,7 @@
     bn=`basename "$progname"`
     cd `dirname "$progname"`
     progname=`/bin/ls -l "$bn" | sed -e 's/^.* -> //' `
+ progbase=`basename "$progname"`
     if [ ! -x "$progname" ]; then
       break
     fi

Reproducible: Always

Steps to Reproduce:
1. create a symlink to /usr/bin/firefox; e.g. ln -s ./foo /usr/bin/firefox
2. execute the symlink: ./foo
Actual Results:
the error that raises is:
run-mozilla.sh: Cannot execute /usr/lib/firefox/foo-bin.

Expected Results:
Should launch the browser as it was meant in the script

Revision history for this message
In , Hilario J. Montoliu (hjmf) (hmontoliu) wrote :

Created attachment 268232
patch to /usr/bin/firefox shell script

Revision history for this message
In , Hilario J. Montoliu (hjmf) (hmontoliu) wrote :

Created attachment 268233
The same patch but against ./browser/app/mozilla.in

This is for source MOZILLA_1_8_BRANCH -- last build I've made:

Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.5pre) Gecko/20070607 BonEcho/2.0.0.5pre

Revision history for this message
In , Hilario J. Montoliu (hjmf) (hmontoliu) wrote :

Forgot to mention that this issue is dealt too at ubuntu's bug tracker:

https://bugs.launchpad.net/firefox/+bug/117575

Revision history for this message
In , Alexander Sack (asac) wrote :

confirmed.

Revision history for this message
In , Benjamin Smedberg (Mozilla) [:bs] (benjamin-smedbergs) wrote :

Comment on attachment 268233
The same patch but against ./browser/app/mozilla.in

Chris, got time for this one? I'm a little lost in here

Changed in firefox:
status: Unknown → Confirmed
Revision history for this message
Alexander Sack (asac) wrote :

firefox (2.0.0.4+2-0ubuntu2) gutsy; urgency=low

  Cherry pick release for tribe-2:
  * debian/docs, debian/MPL: ship MPL (LP: #119814)
  * debian/patches/bz384304_lp117575_linkrecursion_fix_in_startscript.patch,
    debian/patches/series: patch to fix symlink handling of startup-script
    by Hilario Montoliu <email address hidden> - (LP: #117575).
  * debian/apport/firefox.py, debian/firefox.install: new apport hook for
    firefox by Hilario J. Montoliu <email address hidden>; install hook to
    /usr/share/apport/package-hooks/ (LP: #88506)

 -- Alexander Sack <email address hidden> Mon, 25 Jun 2007 10:38:55 +0200

Changed in firefox:
status: In Progress → Fix Released
Revision history for this message
In , Reed Loden (reed) wrote :

Note that Ubuntu has taken this patch downstream already (https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/117575).

Revision history for this message
In , Reed Loden (reed) wrote :

Thanks for the patch!

Checking in browser/app/mozilla.in;
/cvsroot/mozilla/browser/app/mozilla.in,v <-- mozilla.in
new revision: 1.16; previous revision: 1.15
done

Changed in firefox:
status: Confirmed → Fix Released
Revision history for this message
In , Dveditz (dveditz) wrote :

Comment on attachment 268233
The same patch but against ./browser/app/mozilla.in

approved for 1.8.1.10, a=dveditz for release-drivers

Revision history for this message
In , Reed Loden (reed) wrote :

MOZILLA_1_8_BRANCH:

Checking in browser/app/mozilla.in;
/cvsroot/mozilla/browser/app/mozilla.in,v <-- mozilla.in
new revision: 1.12.8.2; previous revision: 1.12.8.1
done

Revision history for this message
In , Abillings (abillings) wrote :

Verified for branch in Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.10) Gecko/2007111504 Firefox/2.0.0.10 (the RC1 for 2.0.0.10). I can reproduce this with 2.0.0.9 but not the 2.0.0.10 build.

Revision history for this message
In , Reed Loden (reed) wrote :

Created attachment 295488
patch mail, sunbird, and xulrunner, too!

asac noticed that this same change wasn't made to the three other mozilla.in files in the tree.

Revision history for this message
In , Reed Loden (reed) wrote :

This is a blocker for Linux distros.

Changed in firefox:
status: Fix Released → Confirmed
Revision history for this message
In , Beltzner (beltzner) wrote :

Comment on attachment 295488
patch mail, sunbird, and xulrunner, too!

a=beltzner for 1.9

Revision history for this message
In , Reed Loden (reed) wrote :

Checking in mail/app/mozilla.in;
/cvsroot/mozilla/mail/app/mozilla.in,v <-- mozilla.in
new revision: 1.8; previous revision: 1.7
done
Checking in calendar/sunbird/app/mozilla.in;
/cvsroot/mozilla/calendar/sunbird/app/mozilla.in,v <-- mozilla.in
new revision: 1.11; previous revision: 1.10
done
Checking in xulrunner/app/mozilla.in;
/cvsroot/mozilla/xulrunner/app/mozilla.in,v <-- mozilla.in
new revision: 1.4; previous revision: 1.3
done

Revision history for this message
In , Kairo-kairo (kairo-kairo) wrote :
Revision history for this message
In , Reed Loden (reed) wrote :

(In reply to comment #15)
> Shouldn't have http://mxr.mozilla.org/mozilla/source/suite/app/seamonkey.in
> been patched as well?

It wasn't named mozilla.in, so I didn't find it. I blame SeaMonkey. :)

Revision history for this message
In , Reed Loden (reed) wrote :

Created attachment 295904
SeaMonkey patch

Just going to carry over r=cls since it's really just the same file as the others but in a different place.

KaiRo, can I get branch approval for this, too?

Revision history for this message
In , Reed Loden (reed) wrote :

Checking in suite/app/seamonkey.in;
/cvsroot/mozilla/suite/app/seamonkey.in,v <-- seamonkey.in
new revision: 1.3; previous revision: 1.2
done

Changed in firefox:
status: Confirmed → Fix Released
Revision history for this message
In , Kairo-kairo (kairo-kairo) wrote :

Comment on attachment 295904
SeaMonkey patch

a-sm1.1.8=me for that SeaMonkey patch - but note that it's at mozilla/xpfe/bootstrap/mozilla.in on branch.

Revision history for this message
In , Dveditz (dveditz) wrote :

Not blocking, but we'll look at approvals.

Revision history for this message
In , Reed Loden (reed) wrote :

Comment on attachment 295488
patch mail, sunbird, and xulrunner, too!

Bug 411710 filed to track landing this on the 1.8 branch, as per request from drivers.

Revision history for this message
In , Reed Loden (reed) wrote :

Checking in xpfe/bootstrap/mozilla.in;
/cvsroot/mozilla/xpfe/bootstrap/Attic/mozilla.in,v <-- mozilla.in
new revision: 1.8.8.8; previous revision: 1.8.8.7
done

Changed in firefox:
importance: Unknown → High
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.