2

I would like to create a shortcut which will cd to a particular directory and then execute a .sh file, thereby opening my application.

At the moment I enter the following into the terminal:

cd /opt/intel/vtune_amplifier_xe_2013

then

source amplxe-vars.sh

and

amplxe-gui

so I create an executable file on the desktop which has:

source /opt/intel/vtune_amplifier_xe_2013/amplxe-vars.sh
amplxe-gui

and set it's properties to be executable. However, when I double click and choose run or run in terminal, it doesnt open the application. However the exact same commands work in terminal?

1 Answer 1

4

To create a shortcut on your desktop follow these steps:

  1. Create a file with a name of your choice and with the extension .desktop

    e. g. minecraft.desktop

  2. Open the file with your text editor (File > Open... or Drag and Drop)

  3. Inside the file type the following:

    [Desktop Entry]
    
    Encoding=UTF-8
    
    Name={Name Of The Application Of Anything Else}
    
    Comment={Optional}
    
    Exec=/bin/sh "{directory of the script e. g. /home/zignd/script.sh}"
    
    Icon={directory of the icon (Optional) e. g. /home/zignd/Pictures/Icon.png}
    
    Categories={(Optional) e.g. Games,Media,Development}
    
    Type=Application
    
    Terminal=0
    

    Note that you need to delete the the brackets and what is inside it. You can also use this shortcut in the launcher just drag and drop it.

  4. Save it and enjoy your shortcut.

0

You must log in to answer this question.

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