adding a prgram to unity

Asked by John Wilson

Having added a program from source I now want to launch it from Unity.
How do i do that?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
actionparsnip
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

What command do you run to make it load in a terminal or ALT+F2 ?

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#3

then run:

sudo wget -O /usr/share/icons/glabels-icon.png http://stuff.mit.edu/afs/sipb/project/glabels/arch/i386_linux24/share/pixmaps/glabels/glabels-icon.png

gksudo gedit /usr/share/applications/glabels.desktop

add the below code:

[Desktop Entry]
Name=GLabels
GenericName=GLabels
Comment=Create labels
Exec=/home/foo/glabels/glabels-3
Terminal=false
Type=Application
Icon=/usr/share/icons/glabels-icon.png
Categories=GTK;Utility;
StartupNotify=false

Save the new file, close gedit and it should now show. You will need to change the word 'foo' to your actual Ubuntu username.

Revision history for this message
John Wilson (jwilsondmartin) said :
#4

Thank you for your reply.
Did it both in the glabels directory and in my john directory but cannot start the program from dash

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#5

How do you mean:

"Did it both in the glabels directory and in my john directory "

The location you run both comands doesnt make any difference. The first command puts the icon in the folder and the next gives you access to the file (blank) so you can add the text.

Revision history for this message
John Wilson (jwilsondmartin) said :
#6

I went into the glabels directory and ran your commands from sudo wget to editing the file with gedit.
I could not get the program to run with dash or show up in the search so i repeated the process in my john directory.
Still could not find the prgaram with the search button
When it runs there is an icon on the dash panel

Revision history for this message
Best actionparsnip (andrew-woodhead666) said :
#7

You don't need to change folders, you can be in ANY folder, the commands manipulate the right files in the right way.

You basically need a .desktop file, like the ones already in /usr/share/applications to run your program.

try:

gksudo gedit /usr/bin/glabels-3; sudo chmod +x /usr/bin/glabels-3

add these 3 lines:

#!/bin/bash
cd /home/foo/glabels
./glabels-3

Save the new file and close gedit, then run:

gksudo gedit /usr/share/applications/glabels.desktop

and change:
Exec=/home/foo/glabels/glabels-3

To:
Exec=/usr/bin/glabels-3

Save the new file and close gedit, you should be able to run the command from ALT+F2 easily now, as well as not having to change directory to run the command.

If you log off and on and it still does not appear, copy one of the existing .desktop files from /usr/share/applications and edit it so that it runs the /usr/bin/glabels-3 script from earlier.

Revision history for this message
John Wilson (jwilsondmartin) said :
#8

Thanks actionparsnip, that solved my question.