You are not logged in.

sulla

Beginner

  • "sulla" started this thread

Posts: 3

Location: Austria

Occupation: Physicist

  • Send private message

1

Saturday, February 24th 2007, 1:43pm

run bash script from kmenu

Hi all!

Sorry for a stupid question:
I made a small bash script ~/GPS/download that just runs GPSbabel to download data from a GPS device and stores it to ~/GPS/track.gpx.

I created it as a text file with the right mouse button in Konqueror and marked it as executable for the owner.
The script runs nicely if I execute it from a terminal.

Next I wanted to run it from Kmenu, so I created an entry. The command is ~/GPS/download and I also ticked "run in terminal".

If I don't tick run in terminal, then nothing happens, except for the curser-symbol jumping for some 10 seconds.
If I tick it, then a terminal opens and closes immediately about 1/10 s later. The script is not executed.

How can I make it run form the Kmenu??

OS is Kubuntu 6.10 64 bit, KDE 3.5.5

I could not find answers for this on the net.
Thanx for help,
sulla

sulla

Beginner

  • "sulla" started this thread

Posts: 3

Location: Austria

Occupation: Physicist

  • Send private message

2

Saturday, February 24th 2007, 2:54pm

RE: run bash script from kmenu

Hm, I found how I can make it work:

I can run the script "download" only under the following conditions
~/download
will run (without quotes), but not:
~/sub dir/download
(with a space in the path without quotes) and also not
'~/sub dir/download'
(with space and quotes and ~) but I can run
'/home/UID/sub dir/download'
i.e. kmenu accepts the space in the path if it does not contain a ~

why is that
* a ~ is not accepted together with a space in the path??
* ~/download is accepted but NOT if it is placed in quotes?
* I need the quotes if the path contains a space?

This seems a bit erratic to me. Is there a way to tell what will function before trying every option out?

Thanx, sulla

3

Saturday, February 24th 2007, 11:18pm

Did you try to use double quotes?
Help mee om KDE 3.5.5 in het Nederlands te vertalen