Creating launcher with an .sh file

Asked by kewapo

Ii had installed ArgoUML in my Ubuntu.
I can't create the launcher in the menu.
I had read all documentation about bash, ubuntu and ArgoUML, but I can't understand were is the problem
I have the file, argouml.sh, and when I type ./argouml.sh the applications run without problems.
The file has permisions to execute.

This is not the only case. I have other programs installed with the same problem

Thank you very much.

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
williamts99 (williamts99) said :
#1

Right click on the script, go to properties, ensure that it is marked as executable.

Revision history for this message
Bhavani Shankar (bhavi) said :
#2

Hello

 Sometimes when you need to install a software on Ubuntu, the installation package only comes in. Sh files instead of standard. Deb package for Debian. Well the. Sh itself has to be executable, however when you got it from internet repository its attribute is set to non-executable. To change this file attribute you need to either Right Click the. sh file from your file explorer, select file property -> file permission and make it is executable.

Then in a terminal type the following:

sh nameofprogram*.sh

* = name of your program

In this case its

sh argouml.sh

Hope it Helps

Bhavani Shankar.

Revision history for this message
kewapo (kewapo) said :
#3

my file is:
javi@pepe:/opt/ArgoUML$ ls argouml.sh -l
-rwxrwxrwx 1 javi javi 823 2008-01-03 00:17 argouml.sh

I create the launcher in this way:

type: Aplication (the same result with terminal)
Name: ArgoUML
Command: sh /opt/ArgoUML/argouml.sh

When I double-clic on the launcher: nothing at all. No error message, no result, no windows open.
I had try to change the directory /ArgoUML to my home directory with the same results

thank you.

Revision history for this message
Markus Thielmann (thielmann) said :
#4

Thanks for your question.

I just downloaded ArgoUML, unzipped it, changed argouml.sh to executable and created an application launcher calling the argouml.sh script. ArgoUML is starting fine.

Please try to call the launcher without "sh", just /opt/ArgoUML/argouml.sh. If that still doesn't work, please start the script within the terminal and report any error messages you might notice.

Revision history for this message
Kiren Pillay (kirenpillay1) said :
#5

I've found the solution to this problem. The shell script needs to use the absolute path to the executable, if it uses relative path's, it won't work.

Below is an example of how I fixed it for my jbpm designer:

#!/bin/sh

./eclipse/eclipse -data workspace

to

#!/bin/bash

/home/kiren/app/jbpm-jpdl-3.2.2/designer/eclipse/eclipse -data workspace

After this change the launcher works fine.

Regards

Revision history for this message
jabbersga (sun-george-78) said :
#6

Both williamsts99 and Bhavani seem to be right.

Dunno how much this helps, but I ran into a .sh file when installing Zimbra desktop on Ubuntu 8.04LTS. I tried their suggestion (right click>executable check) and it worked.

Can you help with this problem?

Provide an answer of your own, or ask kewapo for more information if necessary.

To post a message you must log in.