2

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?

1
  • One alternative to alacarte (see the reply of To Do) is MenuLibre. pch
    – user388197
    Mar 15, 2015 at 9:40

3 Answers 3

5

First you have 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.

You may save the file in ~/.local/share/applications/

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

1

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

0

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .