Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 26th March 2008, 03:29 PM
kj5qw Offline
Registered User
 
Join Date: Feb 2008
Posts: 11
Strange problem with desktop launch of shell script

I have been playing around with the Kommander Editor and have managed to get my first one working. The Kommander script outputs to a text file which is then handled by an external perl script to process the info in a terminal window. I threw together a launcher shell script that first runs the Kommander script and then upon completion runs the perl script. If I run the launcher script from the command line it runs fine.

I then made a menu entry to launch it and a desktop link but neither work. If I try to start the app from one of these links it launches the Kommander script and then exits the launcher script on exit rather than running the external perl script. I can't seem to figure out why it works from the command line but not from a desktop link. Here is the basic of the launcher script. Maybe it isnt correct?

#!/bin/bash

kmdr-executor $HOME/bin/KsomeApp/KsomeApp.kmdr
exec "./somePerlScript"

Any help would be appreciated
Reply With Quote
  #2  
Old 26th March 2008, 05:09 PM
Hlingler's Avatar
Hlingler Offline
Administrator
 
Join Date: Sep 2006
Location: Connellsville, PA, USA
Posts: 11,289
Hello:

I'm not very good at shell scripts, and I don't know exactly why the script is failing when launched from the menu or link, but you could try:
kmdr-executor $HOME/bin/KsomeApp/KsomeApp.kmdr; exec "./somePerlScript"
OR:
kmdr-executor $HOME/bin/KsomeApp/KsomeApp.kmdr && exec "./somePerlScript"

V
Reply With Quote
  #3  
Old 26th March 2008, 06:08 PM
kj5qw Offline
Registered User
 
Join Date: Feb 2008
Posts: 11
OK, I tried your suggestion but to no avail. Both of your suggestions work fine from the commandline but still the same problem when executing from a link. Im wondering if maybe it might be a problem with the number of child processes. I don't know. Im stabbing in the dark here. Anyhoo........
Reply With Quote
  #4  
Old 26th March 2008, 10:22 PM
PabloTwo's Avatar
PabloTwo Offline
"Registered User" T-Shirt Winner
 
Join Date: Mar 2007
Location: Seville, FL
Posts: 5,118
You might try using "full/path/to/somePerlScript" instead of "./somePerlScript" in your bash script.

Paul
Reply With Quote
  #5  
Old 27th March 2008, 11:23 PM
kj5qw Offline
Registered User
 
Join Date: Feb 2008
Posts: 11
Thanks guys for the input. I finally fixed the problem by eliminating the launcher script and just adding this line to my perl script.

system ("kmdr-executor /home/~user/bin/ksomeApp/ksomeApp.kmdr");
Reply With Quote
  #6  
Old 2nd April 2008, 10:55 PM
kj5qw Offline
Registered User
 
Join Date: Feb 2008
Posts: 11
Well that turned out to work only temporarily. It started the same thing again.????

Any way I ended up removing the system() statement from the perl file and adding

Konsole -e "./somePerlscript"

to the execute button bash script in the KsomeApp.kmdr file and it took care of the problem once and for all. I chalk it up to a learning example.
Reply With Quote
Reply

Tags
desktop, launch, problem, script, shell, strange

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with shell script cola Programming & Packaging 13 21st February 2011 09:33 PM
Shell script problem tonysathre Programming & Packaging 1 12th July 2007 08:52 AM
Shell Script Problem thammerlund Programming & Packaging 1 21st July 2006 11:53 AM
Problem in shell script brunoadm Using Fedora 1 5th January 2006 04:24 AM


Current GMT-time: 10:53 (Sunday, 19-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat