FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Kubuntu User

 
 
LinkBack Thread Tools
 
Old 03-12-2009, 04:43 PM
Michael Satterwhite
 
Default Desktop Link to Ruby Program

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

--
kubuntu-users mailing list
kubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/kubuntu-users
 
Old 03-12-2009, 04:50 PM
Geoffrey Bays
 
Default Desktop Link to Ruby Program

Michael:
Make sure that the desktop launcher is executable. Right click on it
and set the permission to 'execute'.
That should do it.

cheers,

Geoffrey Bays

On Thu, Mar 12, 2009 at 1:43 PM, Michael Satterwhite
<michael@weblore.com> 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
>
> --
> kubuntu-users mailing list
> kubuntu-users@lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/kubuntu-users
>

--
kubuntu-users mailing list
kubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/kubuntu-users
 
Old 03-12-2009, 05:23 PM
Michael Satterwhite
 
Default Desktop Link to Ruby Program

On Thursday 12 March 2009 12:50:07 pm Geoffrey Bays wrote:
> Michael:
> Make sure that the desktop launcher is executable. Right click on it
> and set the permission to 'execute'.
> That should do it.
>
> cheers,
>
> Geoffrey Bays

I just tried that. Unfortunately, it didn't work. I'm assuming by this, you're
referring to the icon I've put on the desktop screen. Obviously I'd set
execute permissions for the script in the /scripts file.

---Michael

--
kubuntu-users mailing list
kubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/kubuntu-users
 
Old 03-12-2009, 05:49 PM
Glenn R Williams
 
Default Desktop Link to Ruby Program

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

--
kubuntu-users mailing list
kubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/kubuntu-users
 
Old 03-12-2009, 06:39 PM
Michael Satterwhite
 
Default Desktop Link to Ruby Program

On Thursday 12 March 2009 01:49:47 pm Glenn R Williams wrote:

> how did you create the desktop link? If you just drag and drop it from the
> file manager (Dolphin?), then it will not execute.

i had created the link by right-clicking the desktop and selecting New -> Link
to Application.

The info you gave me did help me solve the problem, though. I hadn't thought
about running it in a terminal (it's a gui application using QT). When I did
that, I saw that (running from the desktop), it was missing a crucial library
directory. I supplied it and everything ran perfectly. Not being able to see
the error without the console kept me from fixing it.

Thanks much.
---Michael

>
> 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



--
kubuntu-users mailing list
kubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/kubuntu-users
 

Thread Tools




All times are GMT. The time now is 09:59 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org