0

I'm compiling software from source. This software project doesn't come with an installer, so I just put the binary in /usr/local/bin, then I can start it from the terminal with a command

software &

Where should I put the binary so that it would become searchable in Ubuntu's? (Finder? search? thingy which is in the upper left corner by default)

1
  • 1
    Anywhere inside $PATH env variable. Do echo $PATH to find out. Alternatively, add that path to $PATH like this: export PATH=$PATH:/usr/local/bin May 15, 2014 at 16:36

2 Answers 2

0

It's not where you put the compiled binary that matters. What you need to do is create a launcher for your application to show up and be searchable in the Unity dash. Also see the numerous answers to this question for various alternative ways to create launchers.

0

They have to be in any directory included in the PATH environment variable. This is either done by copying it to a directory included in the PATH variable. My PATH looks like this:

$ echo $PATH
/usr/lib/x86_64-linux-gnu/qt4/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/local/tigcc

Or you can add the directory with your binaries to the PATH location. For this, include the following line into ~/.profile or ~/.bashrc: (Put it at the end of the file; will work after logging out and in again)

export PATH=$PATH:/path/to/binaries

If you want to make it accessible in the application menu, you have to create a launcher for it either in /usr/share/applications/ (for all users) or ~/.local/share/applications.

This launcher has to be a textfile with the extension .desktopLook at this to find out how it works. You may also duplicate an existing launcher, which makes things easier to you.

After saving it, make it executable: chmod +x launcher.desktop (put sudo if in /usr/share/...)

1
  • The binary is in the directory included in PATH, that's why I can start it from the terminal with software &, but it isn't searchable with Ubuntu search. May 15, 2014 at 16:56

You must log in to answer this question.

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