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 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.

share|improve this question
2  
Is your program /bin/groovenet or /Downloads/GrooveNet-master/project/bin/groovenet? –  mtdevans Jan 28 '13 at 23:11
    
in the Downloads directory. –  user126871 Jan 29 '13 at 14:05
add comment

1 Answer

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|improve this answer
add comment

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.