Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have a program (name.jar file) http://sourceforge.net/projects/yading/?source=recommended that is started by running a double-click name.sh file How can I create a application launcher for a .sh file for jar file?

But it doesn't work launcher: gnome-terminal -x sh -c /path/to/script/name.sh

right click on panel to create .. no work ! What should I do?

share|improve this question

3 Answers 3

First you have to do is to make sure that the script file (.sh) is executable.

Make the script executable

In Nautilus, right-click it, select properties, permissions. Make sure that "executable" is ticked.

Now if you double-click the file you should be able to run the program.

Step 2: Create launcher

There two ways to do that.

The easy way

Install alacarte from Ubuntu software center or type sudo apt-get install alacarte in a terminal. Then open the "Main Menu" application and create a new launcher for your script.

A more complex way

You may create a .desktop file for your script by copying and modifying one of the files in /usr/share/applications.

A nice guide for creating .desktop files can be found here

share|improve this answer

You need to create a .desktop file

Open a terminal and in it type:

sudo gedit /usr/share/applications/yading

In it put some information, following this format:

[Desktop Entry]
Name=yaDing
Exec='<path of where your .sh file is saved>'
Terminal=false
Type=Application
Icon='<path to an image if you want an icon>'
Categories=<relevant categories, see below, separated with ;>

Then save it and it should work.

Relevant Categories

share|improve this answer

Op posted:

I solved this problem. STEP1 You just have to write a script

!/bin/bash

cd /home/user/translators/yaDing/

sh yaDing.sh

STEP2

chmod +x yourscript.sh

Launcher:

сommand: /path/to/yourscript

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.