Desktop Link to Ruby Program
Glenn R Williams
gloonie at earthlink.net
Thu Mar 12 18:49:47 UTC 2009
On Thursday 12 March 2009 13:43:15 Michael Satterwhite wrote:
> A little foundation - which is probably irrelevant. I have a ruby program
> that I'd like to create a desktop link to (I'm running Hardy). I have a
> batch scrip to execute it with the following commands:
>
> cd /home/michael/magic/mp3_maker
> ruby MP3Form.rb
>
> The script is named mp3_maker.sh and is stored in my /scripts directory. If
> I open a console and enter
>
> /scripts/mp3_maker.sh
>
> the program opens and runs cleanly. I have a desktop link created that has
> this same command in it with the workpath of the directory containing the
> ruby program. If I click on this desktop link, it looks like it's trying to
> launch the program, then nothing happens. I don't know if there is a way to
> see what errors it's encountering (I don't see an updated entry in
> /var/log).
>
> Can anyone offer any help on how to get this working?
>
> Thanks much
> ---Michael
Michael,
how did you create the desktop link? If you just drag and drop it from the file
manager (Dolphin?), then it will not execute.
Try this:
1. Create a file in your home directory called "MP3Form.desktop".
2. Edit it and add these lines:
[Desktop Entry]
Version=1.0
Encoding=UTF-8
Type=Application
Name=MP3 Form
Comment=
Categories=Application;
Exec=/scripts/mp3_maker.sh
Icon=
Terminal=true
StartupNotify=false
TerminalOptions=\s--noclose
3. Now you should be able to click on this file and it will run. Note that
Terminal=true and TerminalOptions is set to noclose. That tells the system to
open the program in a terminal and not to close the terminal after executing
the program. That way you can see everything that's going on. Once it is all
working, you can change right click on the icon, select Properties -->
Advanced Options and tell it not to run in a terminal if you want.
HTH,
Glenn
More information about the kubuntu-users
mailing list