Comment 6 for bug 117575

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