Re: Gnome 1.4 Panel Launcher -- Netscape

On Thu, Feb 07, 2002 at 09:31:49PM -0600 or thereabouts, Bob Giesen wrote:
>    I'm pretty new to Gnome, so please forgive me if I missed 
> something basic, here.  I read the Panel Manual and followed the 

Nope. I think I know the answers, but I wouldn't say they're
particularly obvious at first. And on behalf of the docs team,
thank you for reading the docs. It's nice to think people read
them after all the writing! :) 

> instructions for adding a launcher to my panel, but I'm getting an 
> error (in ~/.xwm.msgs) whenever I click on the launcher.
>    In the launcher (from which I'm trying to start Netscape 4.51 
> (which I prefer to the Mozilla that I found in the panel by default),
> properties window, I've entered several different values for "Name" 
> and "Comment" (just in case it had to be unique) and I've tried 
> commands of "netscape," "/usr/local/bin/netscape," 
> "/usr/local/bin/communicator-4" (to which netscape is a symlink), 
> "/usr/local/bin/communicator-4.51" (to which communicator-4 is 
> linked).  The last of these is a wrapper script that calls 
> /usr/local/netscape-4.51/communicator-4.51.bin -- so I even tried 
> that, just in case it would make a dference (I know... grasping at 
> straws), to no avail.
>    All of the above commands work just fine from the command line, 
> but every attempt to run netscape in one of these ways via a launcher 
> fails and the following two lines get printed to my ~/.xwm.msgs log:
> failed: bad magic number in "/usr/X11R6/lib/"
> xalf: timeout launching /bin/sh

The first suggestion I have is that you should try this as the line:
"cd /usr/local/bin/netscape ; ./netscape" (or whatever the directory
and command are in reality). The key thing is to have "cd" to the
directory in question before the semi-colon, and then the command
after it, with ./ probably necessary.

I am basing this on a guess that the wrapper script you mention has 
relative paths in it, with things like "../command" or 
"some-relative-dir/command" in it. Absolute paths (which start with an 
initial slash and spell out exactly where something should be found) are 
not a problem. But you can't assume where a user will put a package, so 
often you end up using relative ones. Mozilla does this. I believe 
Netscape does too. I think that launchers assume you're in your home 
directory (or, at least, they have a specific starting directory.). 
So the launcher is looking at a relative path and saying "I don't
see this here" because it's not starting in the right place. 

This is based on how I got Mozilla to start from a launcher in the
days just after I got a fast net connection and spent all my time
downloading and building massive packages just because I could :) 

For extra refinement, you could collect all the output of this command 
into a logfile to see what's going on. I collect both expected output 
and error output with this, which is all in one line in my old launcher: 

cd ~hobbit/Building/Moz-Nightlies/Foo/package ; ./mozilla 2>&1 >~hobbit/moz-log 

If you only want the errors, change the "2>&1 >" to "2 >"
This works in bash. I don't believe it will work in csh and csh-like

So that's the first suggestion.

The second is related to the xalf errors. xalf is the X Application
Launcher Feedback program and is responsible for putting some
feedback on your desktop to say "yes, you clicked it, it's on the
way, but the real application window hasn't shown up yet". 

I do not know why it's saying "bad magic number". I do remember
that xalf had to change behaviour after the glibc package altered
its behaviour as part of a security tweak. If this is a very 
modern system, then this won't be the problem. If it's an old-ish
one, perhaps you have an old xalf, and possibly an old glibc too.

If you don't need xalf, the quick fix is to remove the package :)
If you do, then I would check your distro for xalf updates: Mandrake
certainly had one months ago. *However*, if upgrading xalf requires
you to upgrade glibc, be very very careful. glibc is such a 
central package to Linux that getting an upgrade wrong can leave
you with a horrible, horrible mess. 

I'm not at all confident that it's anything to do with glibc, but
since I do remember it coming up once before, I'm just mentioning 
it. "ld" is something to do with linking and hence libraries, I
think. I mostly meet "Bad magic number" when I typo "ls" as "ld" :) 

I'm pretty confident about the first part of this message though.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]