How do I make a link work and insert it into menu?

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read this

How do I make a link work and insert it into menu?

Postby RobHK on Thu Apr 24, 2008 6:43 am

I installed a program (called TMXValidator) from a BIN file. It installed into a folder TMXValidator in my personal home directory, but no menu item was created. I found the folder and was able to run the program by clicking on the file TMXValidator.sh.

I then created a link to this file. The link was created in the same folder. I tested it and it ran the program. I then moved the link to the desktop, and it would no longer run the program. It opens the Run dialog but does not respond when I click Run.

I opened the link in a text editor and saw:

#!/bin/sh
#/*******************************************************************************
# * Copyright (c) 2005, 2006 Maxprograms
# * All rights reserved. This program and the accompanying materials
# * are made available under the terms of the Eclipse Public License v1.0
# * which accompanies this distribution, and is available at
# * http://www.eclipse.org/legal/epl-v10.html
# *
# * Contributors:
# * Rodolfo M. Raya - initial API and implementation
# * Geraldine Lin - Chinese translations
# *******************************************************************************/

CP="/home/robin/TMXValidator/lib/tmx.jar:/home/robin/TMXValidator/lib/jdom.jar:/home/robin/TMXValidator/lib/xercesImpl.jar:/home/robin/TMXValidator/lib/xml-apis.jar:/home/robin/TMXValidator/lib/resolver.jar:/home/robin/TMXValidator/lib/GTK/swt.jar"
java -Xmx999M -cp $CP com.maxprograms.gui.TMXValidatorGUI $1 $2 $3 $4 $5 $6


I'd be grateful if someone couldhelp me to:
- get the link to run from the desktop
- insert the item in the main menu

TIA

Rob
RobHK
Level 2
Level 2
 
Posts: 86
Joined: Thu Apr 24, 2008 6:19 am

Linux Mint is funded by ads and donations.
 

Re: How do I make a link work and insert it into menu?

Postby Husse on Thu Apr 24, 2008 3:36 pm

That looks a bit hard to decifer
Make a new link from the desktop
This should also work in the menu
(I don't really know what kind of link you made....)
Image
Don't fix it if it ain't broken, don't break it if you can't fix it
Husse
Level 21
Level 21
 
Posts: 19714
Joined: Sun Feb 11, 2007 7:22 am
Location: Near Borås Sweden

Re: How do I make a link work and insert it into menu?

Postby RobHK on Thu Apr 24, 2008 4:15 pm

Husse wrote:That looks a bit hard to decifer
Make a new link from the desktop
This should also work in the menu
(I don't really know what kind of link you made....)

How do I make a link from the desktop? I made the original link by right-clicking on the program icon in its folder and it was automatically created in the same folder. I copied it to the desktop and it no longer ran, though I could open the Run dialog.
I can't understand the detail of the link script, but I can see that the full path is in the link, not a relative path.
RobHK
Level 2
Level 2
 
Posts: 86
Joined: Thu Apr 24, 2008 6:19 am

Re: How do I make a link work and insert it into menu?

Postby MagnusB on Thu Apr 24, 2008 4:19 pm

Make a launcher on the desktop, and move the file back to the original folder, as it is probably symlinked to something.
Then make the desktop launcher run the file: sh /path/to/file/here
Image
You're not drunk if you can lie on the floor without holding on.
--Dean Martin
MagnusB
Level 6
Level 6
 
Posts: 1255
Joined: Sun Nov 18, 2007 12:39 pm
Location: Norway

Re: How do I make a link work and insert it into menu?

Postby Husse on Thu Apr 24, 2008 5:09 pm

the full path is in the link

Both yes and no if I read it right, but MagnusB's suggestion should work
Image
Don't fix it if it ain't broken, don't break it if you can't fix it
Husse
Level 21
Level 21
 
Posts: 19714
Joined: Sun Feb 11, 2007 7:22 am
Location: Near Borås Sweden

Re: How do I make a link work and insert it into menu?

Postby RobHK on Sat Apr 26, 2008 7:00 am

I right-clicked the desktop and opened the dialog box. I entered a name and then browsed to the file which runs the program (/home/robin/TMXValidator/tmxvalidator.sh). The desktop icon was created, but when I click on it nothing happens. No Run dialog box appears, unlike my problem with the link created in the program folder, which -- when moved to the Desktop -- would still open the Run dialog, but would not run the program.


This is what the link looks like if opened in a text editor:
[Desktop Entry]
Version=1.0
Encoding=UTF-8
Name=TMXValidator
Type=Application
Terminal=false
Icon[en_GB]=gnome-panel-launcher
Exec=/home/robin/TMXValidator/tmxvalidator.sh
Name[en_GB]=TMXValidator

Icon=gnome-panel-launcher
GenericName[en_GB]=
RobHK
Level 2
Level 2
 
Posts: 86
Joined: Thu Apr 24, 2008 6:19 am

Re: How do I make a link work and insert it into menu?

Postby Husse on Sat Apr 26, 2008 3:52 pm

Terminal=false

What if Terminal=true ?
Image
Don't fix it if it ain't broken, don't break it if you can't fix it
Husse
Level 21
Level 21
 
Posts: 19714
Joined: Sun Feb 11, 2007 7:22 am
Location: Near Borås Sweden

Re: How do I make a link work and insert it into menu?

Postby RobHK on Sun Apr 27, 2008 7:14 am

Husse wrote:
Terminal=false

What if Terminal=true ?


It opens a terminal which immediately closes. Just time to get the beginning of a multi-line error message beginning "Error in...". Seems logical.
RobHK
Level 2
Level 2
 
Posts: 86
Joined: Thu Apr 24, 2008 6:19 am

Re: How do I make a link work and insert it into menu?

Postby Husse on Sun Apr 27, 2008 7:57 am

Look a this
CP="/home/robin/TMXValidator/lib/tmx.jar:/home/robin/TMXValidator/lib/jdom.jar:/home/robin/TMXValidator/lib/xercesImpl.jar:/home/robin/TMXValidator/lib/xml-apis.jar:/home/robin/TMXValidator/lib/resolver.jar:/home/robin/TMXValidator/lib/GTK/swt.jar"
java -Xmx999M -cp $CP com.maxprograms.gui.TMXValidatorGUI $1 $2 $3 $4 $5 $6

There is no path here
CP com.maxprograms.gui.TMXValidatorGUI

If you added the path it might work. The path would be /home/robin/ I guess
Image
Don't fix it if it ain't broken, don't break it if you can't fix it
Husse
Level 21
Level 21
 
Posts: 19714
Joined: Sun Feb 11, 2007 7:22 am
Location: Near Borås Sweden

Re: How do I make a link work and insert it into menu?

Postby RobHK on Sun Apr 27, 2008 10:53 am

Husse wrote:Look a this
CP="/home/robin/TMXValidator/lib/tmx.jar:/home/robin/TMXValidator/lib/jdom.jar:/home/robin/TMXValidator/lib/xercesImpl.jar:/home/robin/TMXValidator/lib/xml-apis.jar:/home/robin/TMXValidator/lib/resolver.jar:/home/robin/TMXValidator/lib/GTK/swt.jar"
java -Xmx999M -cp $CP com.maxprograms.gui.TMXValidatorGUI $1 $2 $3 $4 $5 $6

There is no path here
CP com.maxprograms.gui.TMXValidatorGUI

If you added the path it might work. The path would be /home/robin/ I guess

No, it doesn't change anything.

But it's not really what we are looking to do, is it? We are looking at how to create a link that works through the GUI.
RobHK
Level 2
Level 2
 
Posts: 86
Joined: Thu Apr 24, 2008 6:19 am

Linux Mint is funded by ads and donations.
 

Return to Newbie Questions

Who is online

Users browsing this forum: austin.texas, mintoreo, wilbobob and 42 guests