Creating a working desktop icon


Forum: Apps
Topic: Creating a working desktop icon
started by: lesliek

Posted by lesliek on April 18 2006,06:49
I set up an old laptop for the son of friends. When doing so, I hadn't thought of including filesharing software (a function of my age).

After a discussion with him, I installed limewire4.8.0.dsl for him. Although I don't know how to use the application, I am able at least to open it successfully from the myDSL menu.

Installing the application didn't create a Limewire icon on the desktop, so I'm trying to create one of those myself.

I've managed to get the appropriate icon on the desktop, but I haven't been able to find the path to the executable file. I searched for all files on the system with "limewire" in them and found "/usr/bin/limewire". I assumed that was it, but using that as my command didn't work. I thought it might be a permissions problem, so I made the file executable by all. That didn't help.

Can someone tell me what command I should use to get the icon to open the application?

Posted by lovdsl on April 18 2006,08:33
What I did was go to home/dsl/fluxbox and open the fluxbox menu..this is an editable text file for the dsl menu..it will show the path used when you click the menu item..find your item copy it to the icon command line and try...I used this to create a shortcut to pppdial, and for the wmdrawer shortcuts..may work for you. oh.. just in case to view hidden files click "H"
Posted by lesliek on April 18 2006,08:45
Thanks for taking the trouble to reply, lovdsl.

Just to make things difficult, I'm using the other installed window manager, jwm.

I had thought of trying the same thing as you suggest, but didn't know which was the equivalent file for jwm. I tried to right click on the Limewire item in the myDSL menu, hoping that would identify the relevant file, but all it did was open the application in the same way that it does if I left click on it.

Thanks again,

Leslie

Posted by lovdsl on April 18 2006,08:56
Sorry, I am less familiar with jwm but think you can look on the menu and find emelfm as a super user and open the file manager...in the corner is a "H" which shows the hidden files in home/dsl..look for fluxbox and rightclick open...then open menu..it will open in the bever text editor..this is an editable menu, you should find the name which is the name that lists in the desktop menu where you click to open the program....next to it is the path to the program which is used when you click the menu item...I think you can use it for your icon...will switch and have a look..the jwmrc file is I think the jwm menu..not sure the path would be different..forgot to look.hope this helps

adding...ya I switched to jwm and near the top of the menu see file managers..if you just want to look you can use emelfm but to edit or copy the command line you need to use emelfm as a super user..do not cut the path as this is the editable jwm menu...in midnight commander I think you just double click to open the files..if that is the file manager you choose to  use with jwm

once you find the path you can go to the icon properties and add the path after command: or in full path box in the icon tool when creating

Posted by lovdsl on April 18 2006,20:18
Perhaps this is clearer
In jwm rightclick for the menu or click the dsl button
choose file managers
click either emelfm as a superuser or midnight commander as super
scroll to find jwmrc and right click and open
in midnight commander doubleclick to open and choose view from the menu at the botttom
scroll down the menu and find the name of the program whose path you seek  
or open fluxbox and open menu and do the same
ie: from fluxbox menu
[exec] (imagemagick) {/opt/imagemagick/bin/display}

ie: from jwmrc
<Program label="imagemagick"> /opt/imagemagick/bin/display </Program>

leftclick and drag to copy the path
/opt/imagemagick/bin/display

as you can see the path is the same

now go to the desktop menu click setup/desktop/icontool/new
click the left and right mouse buttons to paste the path into the fullpath box
give the icon a name and choose an icon and click ok

you should now have an icon for your program
this may be more helpfull.

Posted by lesliek on April 18 2006,20:20
Thanks for your further help, lovdsl.

I found and opened the file /home/dsl/.fluxbox/menu.

In it was a line that must contain the relevant information. I set it out in full:

[exec] (Limewire) {PATH=$PATH:/opt/jre1_0_5_0/bin limewire}

Just to be clear, the last word, "limewire", was separated from the word (or abbreviation) "bin" by a space.

I copied everything between the braces onto the line for the command in the icon tool editor and then saved, but that still didn't lead to LimeWire opening when I left clicked on the icon.

I'm wondering whether I should have copied more or less of the line in the menu file into the line for the command.

If you have thoughts on that, I'd welcome them.

Thanks again,

Leslie

Posted by mikshaw on April 18 2006,20:34
PATH=$PATH:/opt/jre1_0_5_0/bin sets up the PATH variable to include /opt/jre1_0_5_0/bin so limewire can use java.
Then limewire is started.

The above tells me that you need to have java installed in order for this command to work.  The limewire info file (!!!) should have told you this.  The thing i'm most curious about is the version listed in the fluxbox menu (jre1_0_5_0)...this doesn't look right to me if you are expected to use jre 1.5.0.  I'd look in /opt/jre* to see what the actual path to its bin directory is.

Posted by lovdsl on April 18 2006,20:42
PATH=$PATH:/opt/jre1_0_5_0/bin limewire
In my experience this line should have been the path
you could try this
:/opt/jre1_0_5_0/bin limewire
.look and see if /opt/jre1-0-5-0/bin/limewire exists and exec limewire
then this
:/opt/jre1_0_5_0/bin/limewire.
very sorry thats all I have, without installing the program..

thanks mikshaw you must have posted while I was typeing
I thought the program was opening from the menu already

Posted by lesliek on April 18 2006,23:14
Thanks to mikshaw and again to lovdsl for their replies.

As to the java runtime environment, I do have that installed. The info page for limewire told me I had to have it and said I could use one of two versions of it (JRE, I mean). I chose the uci version, thinking I'd conserve RAM that way. The  reference to "1_0_5-0" is a reference to the uci version of JRE.

As I mentioned earlier, I have no difficulty opening LimeWire if I do so by going from DSL to myDSL to LimeWire. (That persuades me, incidentally, that my version of JRE is sufficient to run Limewire.) However, I assumed the young man who's using the computer would prefer opening LimeWire via a desktop icon, which is what started me on this project.

Unfortunately, I don't have access to the computer as I type this, so can't follow any of your suggestions now. I'll do so as soon as I can.

However, I can say now that there's no file called /opt/jre1_0_5_0/bin/limewire.

Thanks again,

Leslie

Posted by lovdsl on April 18 2006,23:30
my initial suggestion was made as clear as possible the last was a stab in the dark as you said nothing was working..sorry I could not be of any help...worked for me.
Posted by mikshaw on April 19 2006,01:52
/opt/jre1_0_5_0/bin/limewire is non-existent...as it should be, since limewire is not a part of java.

Since you have java runtime installed, my only guess at this point is that the icon is apparently not reading the command correctly.  Try changing it to this:
Code Sample
export PATH="$PATH:/opt/jre1_0_5_0/bin" && limewire
This is assuming that limewire is a *.dsl so it would already be in your path.

Otherwise you may have to set up /opt/jre1_0_5_0/bin as a part of your PATH before trying to load limewire, and use only the command "limewire" in the icon.

Posted by lesliek on April 19 2006,02:37
I've just got home after a few hours away and hope to make further progress with this soon.

However, I had to say something right now to lovdsl.

I've taken it from your last post that I offended you in mine.

If that's so, I beg your pardon very much. I didn't mean to be offensive in any way--far from it. I really do appreciate very much your trying to help me. I'm pretty new to Linux and have asked a lot of questions, both in this forum and others. I am constantly impressed by the willingness of other people to try to help me solve the problems I raise.

Although I don't yet have a solution to my present problem, you certainly started me on the right track to solving it by directing me to the menu file and I suspect that I haven't yet been able to get to the end of the track because of the path business in the relevant menu entry. I haven't found any other menu entry that has a path command in it. Once I get that worked out, I'm confident the icon will work.

Again, my apologies if I offended you,

Leslie

Posted by lesliek on April 19 2006,06:33
If, when I used still to have a real job, anyone who worked for me had done to me what I've done to lovdsl and mikshaw over this problem, they would have had cause seriously to regret it afterwards.

I knew that the relevant java file included in its name the numbers 1_0_5_0 right up until the second when I knew that it didn't, something that mikshaw had warned me about in his first intervention. The numbers were, as he had thought, 1_5_0.

The icon works perfectly with the (correct) PATH command included.

I'm sorry that I put you both to such unnecessary trouble.

Posted by mikshaw on April 19 2006,14:32
yay! :D
Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.