Problem executing via a KDE .desktop?
I recently installed the Netscape 4.79 tarball (on SuSE 7.3). I created a /opt2/netscape directory for it, having done something similar with Mozilla 0.9.6. The 4.78 RPM is still installed. Manually, I can run up the new browser by typing /opt2/netscape/netscape, and this works fine; the 4.78 version still works as usual. To make it easier to start, I created a menu entry. This creates a .desktop file under $HOME/.kde2/share/applnk. I've listed the contents at the bottom, though it looks very similar to other .desktops. The problem is... starting via the menu tries to start *both* the 4.78 and the 4.79 versions of Netscape. They end up falling over each other, complaining about the lock file and asking me to Accept the licence terms. The similar Mozilla menu entry (/opt2/mozilla/mozilla) works fine. I can start /opt2/netscape/netscape from the command line OK. If I ask the .desktop to run the application in a terminal, that works fine (which is a reasonable work-round). I thought it might be because of the name "netscape", and so re-named the 4.79 version and tried running that. But that just does nothing - no error, just fails to launch (thought pointing at a non-existent executable does produce an error). Any ideas what might be going on? Cheers, -nick [Desktop Entry] Comment=Netscape 4.79 Comment[C]=Netscape 4.79 Exec=/opt2/netscape/netscape Icon=netscape MimeType=text/html Name=Netscape 4.79 Name[C]=Netscape 4.79 Path= ServiceTypes= SwallowExec= SwallowTitle= Terminal=false TerminalOptions= Type=Application X-KDE-SubstituteUID=false X-KDE-Username=
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, Instead of just firing netscape... ...pint it to the specific location of the Netscape you want to run: i.e /opt/netscape4.79/bin/ or something like that. :) Q On Wed 28 Nov 01 11:27, Nick Battle wrote:
I recently installed the Netscape 4.79 tarball (on SuSE 7.3). I created a /opt2/netscape directory for it, having done something similar with Mozilla 0.9.6. The 4.78 RPM is still installed. Manually, I can run up the new browser by typing /opt2/netscape/netscape, and this works fine; the 4.78 version still works as usual.
To make it easier to start, I created a menu entry. This creates a .desktop file under $HOME/.kde2/share/applnk. I've listed the contents at the bottom, though it looks very similar to other .desktops.
The problem is... starting via the menu tries to start *both* the 4.78 and the 4.79 versions of Netscape. They end up falling over each other, complaining about the lock file and asking me to Accept the licence terms.
The similar Mozilla menu entry (/opt2/mozilla/mozilla) works fine. I can start /opt2/netscape/netscape from the command line OK. If I ask the .desktop to run the application in a terminal, that works fine (which is a reasonable work-round).
I thought it might be because of the name "netscape", and so re-named the 4.79 version and tried running that. But that just does nothing - no error, just fails to launch (thought pointing at a non-existent executable does produce an error).
Any ideas what might be going on?
Cheers, -nick
[Desktop Entry] Comment=Netscape 4.79 Comment[C]=Netscape 4.79 Exec=/opt2/netscape/netscape Icon=netscape MimeType=text/html Name=Netscape 4.79 Name[C]=Netscape 4.79 Path= ServiceTypes= SwallowExec= SwallowTitle= Terminal=false TerminalOptions= Type=Application X-KDE-SubstituteUID=false X-KDE-Username= -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org
iD8DBQE8BLDhdIhE/Jt+upoRAq42AJ91OKhj0T8LN3sdaqFOY0OPqMKICgCeN1Fa 1UjoE1HWSMjV3wV/OfbcGBU= =4BA6 -----END PGP SIGNATURE-----
Quinton Delpeche wrote:
Instead of just firing netscape... ...pint it to the specific location of the Netscape you want to run: i.e /opt/netscape4.79/bin/ or something like that.
But my Exec line is the full executable path name - is that what you meant?
[Desktop Entry] Exec=/opt2/netscape/netscape
Cheers, -nick
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Yep, Hmmmmmmmm... ...this doesn't make sense then. *tap* *tap* ... ... *ponder* I dunno then. Sorry! :( Q On Wed 28 Nov 01 11:49, Nick Battle wrote:
Quinton Delpeche wrote:
Instead of just firing netscape... ...pint it to the specific location of the Netscape you want to run: i.e /opt/netscape4.79/bin/ or something like that.
But my Exec line is the full executable path name - is that what you meant?
[Desktop Entry] Exec=/opt2/netscape/netscape
Cheers, -nick -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org
iD8DBQE8BLQOdIhE/Jt+upoRAqafAJ0XhzdDxqAvgREYfGYRiakj02Ri/gCguWya TuLt3gYc4cnRIoJYNOP4m8M= =anR+ -----END PGP SIGNATURE-----
Quinton Delpeche wrote:
Hmmmmmmmm... ...this doesn't make sense then.
It is peculiar. I think it must be something to do with the environment under which KDE launches things via .desktops that's different for just starting the executable at a shell prompt. The other clue, that I didn't mention, is that when it runs up two Netscapii one appears to be the process child of the other, though it's not clear what's going on. You get three processes, two netscapes and a "(dns helper)", in a parent-child list. That might mean that the first netscape is starting the 2nd, but whatever it's doing, it only does it via .desktops (unless they're run in a terminal). Strange! Cheers, -nick
Hi I believe It MUST be some kind of bug in KDE... If I do a shell-script that points to /opt/netscape/netscape, and place a icon (link to application) that executes that script, it works fine. But if I set that icon to point directly to /opt/netscape/netscape, it will start 2 copies of netscape, and I get the same "netscape/lock" error message. This has been unsolved for a long time, so it is not a new thingie... Jaska. Viestissä Keskiviikko 28. Marraskuuta 2001 12:32, Nick Battle kirjoitti:
Quinton Delpeche wrote:
Hmmmmmmmm... ...this doesn't make sense then.
It is peculiar. I think it must be something to do with the environment under which KDE launches things via .desktops that's different for just starting the executable at a shell prompt.
The other clue, that I didn't mention, is that when it runs up two Netscapii one appears to be the process child of the other, though it's not clear what's going on. You get three processes, two netscapes and a "(dns helper)", in a parent-child list. That might mean that the first netscape is starting the 2nd, but whatever it's doing, it only does it via .desktops (unless they're run in a terminal).
Strange!
Cheers, -nick
Hi Jaakko, Jaakko Tamminen wrote:
If I do a shell-script that points to /opt/netscape/netscape, and place a icon (link to application) that executes that script, it works fine.
You mean indirect through a script that in turn runs netscape? I didn't think of trying that. I'll give it a go.
But if I set that icon to point directly to /opt/netscape/netscape, it will start 2 copies of netscape, and I get the same "netscape/lock" error message.
Yes, this is what I'm seeing. Does it work for you if you set the icon to "run the application in a terminal"?
This has been unsolved for a long time, so it is not a new thingie...
I'm glad I'm not going barmy. But why does it work for Mozilla (or simple applications like xclock)? Presumably it must be something about Netscape too. Have you contacted the KDE team? Cheers, -nick
Hi Nick
will start 2 copies of netscape, and I get the same "netscape/lock" error message.
Yes, this is what I'm seeing. Does it work for you if you set the icon to "run the application in a terminal"?
I haven't tried that one.. I'm used to just press alt-f2 and write netscape now... :-) I'm not using it so often, and I want to keep the desktop quite clean for some reason...
This has been unsolved for a long time, so it is not a new thingie...
I'm glad I'm not going barmy. But why does it work for Mozilla (or simple applications like xclock)? Presumably it must be something about Netscape too. Have you contacted the KDE team?
Good question... Maybe it does have something to do how netscape and KDE interacts? Jaska.
Jaakko Tamminen wrote:
I haven't tried that one.. I'm used to just press alt-f2 and write netscape now... :-) I'm not using it so often, and I want to keep the desktop quite clean for some reason...
Yes, it produces an extra blank terminal window of course. There doesn't seem to be a way to open a terminal minimized - or perhaps it can be done with arguments to the terminal program(?).
Good question... Maybe it does have something to do how netscape and KDE interacts?
Especially if the two Netscapii are parent-child processes. Do you see this? For me it looks like one Netscape has spawned the other. I was thinking it might be something to do with the shared library loading path (or just PATH). If the netscape executable would naturally spawn a child (some programs do this a lot), and it does this by just running "netscape", then the PATH version would get called. Trouble is, this doesn't explain why it *doesn't* happen from a shell command line. If you look at the Mozilla scripts, they go to some lengths to set PATH and LD_LIBRARY_PATH etc to be "local" before starting the real executable. So that might explain why Mozilla doesn't have a problem. Similarly, simple applications like xclock don't do any spawning, so they're no problem. Why on Earth wouldn't it run /opt2/netcape/netscape-4.79 when I made a simlink of that name pointing to the executable though? Does that work for you? Where do KDE errors go when there's no "stderr"? Cheers, -nick
It's NO bug in KDE. I had the same thing happen. It is because when you fire Netscape directly it also causes the script in /usr/bin (IIRC) to fire as well, causing a second instance to appear. Edit the script that is used to fire the orgininal Netscape and point it to your new one. JLK On Wednesday 28 November 2001 08:31, Jaakko Tamminen wrote:
Hi
I believe It MUST be some kind of bug in KDE...
If I do a shell-script that points to /opt/netscape/netscape, and place a icon (link to application) that executes that script, it works fine.
But if I set that icon to point directly to /opt/netscape/netscape, it will start 2 copies of netscape, and I get the same "netscape/lock" error message.
This has been unsolved for a long time, so it is not a new thingie...
Jaska.
Viestissä Keskiviikko 28. Marraskuuta 2001 12:32, Nick Battle kirjoitti:
Quinton Delpeche wrote:
Hmmmmmmmm... ...this doesn't make sense then.
It is peculiar. I think it must be something to do with the environment under which KDE launches things via .desktops that's different for just starting the executable at a shell prompt.
The other clue, that I didn't mention, is that when it runs up two Netscapii one appears to be the process child of the other, though it's not clear what's going on. You get three processes, two netscapes and a "(dns helper)", in a parent-child list. That might mean that the first netscape is starting the 2nd, but whatever it's doing, it only does it via .desktops (unless they're run in a terminal).
Strange!
Cheers, -nick
Jerry Kreps wrote:
It's NO bug in KDE.
I had the same thing happen. It is because when you fire Netscape directly it also causes the script in /usr/bin (IIRC) to fire as well, causing a second instance to appear.
The "netscape" in 7.3 is in /usr/X11R6/bin iirc. There are simlinks for netscape and Netscape both pointing to "communicator". I haven't looked at what is in "communicator", but since I'm not trying to run it... why should I? How does running /opt2/netcape/netcape cause /use/X11R6/bin/netcsape to be run, and why does it only do it via .desktops, not from the command line?
Edit the script that is used to fire the orgininal Netscape and point it to your new one.
But I want to run both - or at least that was the idea, so that I can keep the orignal 7.3 in place but experiment with new releases of Netscape and Mozilla etc as they come out. Jaako's solution of introducing a new script to invoke the new Netscape works for me. I can't explain why. I'm not yet convinced KDE is innocent! Cheers, -nick
On Thursday 29 November 2001 02:17, Nick Battle wrote:
Jerry Kreps wrote:
It's NO bug in KDE.
I had the same thing happen. It is because when you fire Netscape directly it also causes the script in /usr/bin (IIRC) to fire as well, causing a second instance to appear.
The "netscape" in 7.3 is in /usr/X11R6/bin iirc. There are simlinks for netscape and Netscape both pointing to "communicator". I haven't looked at what is in "communicator", but since I'm not trying to run it... why should I?
/usr/X11R6/bin/communicator is the script I was refering to. When I pointed my desktop icon to it and not to the binary in /opt/netscape then Netscape started running right again. I don't know the answer to your questions, I only know that pointing the desktop to the 'communicator' script solved the problem. JLK
How does running /opt2/netcape/netcape cause /use/X11R6/bin/netcsape to be run, and why does it only do it via .desktops, not from the command line?
Edit the script that is used to fire the orgininal Netscape and point it to your new one.
But I want to run both - or at least that was the idea, so that I can keep the orignal 7.3 in place but experiment with new releases of Netscape and Mozilla etc as they come out.
Jaako's solution of introducing a new script to invoke the new Netscape works for me. I can't explain why. I'm not yet convinced KDE is innocent!
Cheers, -nick
participants (4)
-
Jaakko Tamminen
-
Jerry Kreps
-
Nick Battle
-
Quinton Delpeche