Terminal command script launcher

7,291

Desktop Launcher

To create a desktop launcher, open up a text editor (e.g. ALT+F2 gedit) and paste in:

[Desktop Entry]
Version=1.0
Name=GrooveNet
Comment=Launch GrooveNet
Exec=/Downloads/GrooveNet-master/project/bin/groovenet
Icon=/path/to/icon.png
Terminal=true
Type=Application
Categories=Utility;Application;

If you don't have an icon, you can leave that line out. Save the file as "Groovenet.desktop" in your Desktop folder (~/Desktop).

Now you need to make it executable, so open up a terminal and enter

sudo chmod +x Groovenet.desktop

That should be it.

If you don't like using the terminal, a graphical way of doing the same thing using gnome-panel is possible too, it's in the Ubuntu documentation (https://help.ubuntu.com/community/UnityLaunchersAndDesktopFiles).

Keyboard Shortcut

Another way of solving the same problem would be to assign a keyboard shortcut to open the program, which you might find more useful/quicker.

In System Settings > Keyboard > Shortcuts > Custom Shortcuts create a new shorcut. In the "Command:" box, enter gnome-terminal --tab -e "/Downloads/GrooveNet-master/project/bin/groovenet". Give it a name and click Apply, then assign it a keyboard shortcut of your choice.

Share:
7,291

Related videos on Youtube

user126871
Author by

user126871

Updated on September 18, 2022

Comments

  • user126871
    user126871 over 1 year

    I am trying to create a desktop shortcut or script that will automate terminal command input for me to open a program.

    cd /Downloads
    cd /GrooveNet-master
    cd /project
    cd /bin
    ./groovenet
    

    Once opened, the terminal should also remain open for the program to work.

    Thanks.

    • Marcus
      Marcus over 11 years
      Is your program /bin/groovenet or /Downloads/GrooveNet-master/project/bin/groovenet?
  • Sergiy Kolodyazhnyy
    Sergiy Kolodyazhnyy almost 8 years
    Suggestion , you're giving it path starting from /Downloads ., but .desktop files want /home/username/Downloads/. . . .