This page looks best with JavaScript enabled

Adding Local Apps to an Applauncher (dmenu)

 ·  ☕ 2 min read

Background

So you use an app launcher (dmenu of course) and things are great but your local (e.g. ~/apps/appName) apps are not available, what do you do? Most app launchers index and/or find binaries (or links to binaries) in common places such as /usr/bin and /usr/lib along with the user’s binary location, typically ~/bin. If you do not have a ~/bin directory simply create one. You may also want to check out your ~/.profile file to ensure it includes ~/bin in your path similar to as follows:

1
2
3
4
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
    PATH="$HOME/bin:$PATH"
fi

note: if you change your .profile make sure to reload it (e.g. $ source ~/.profile) to have the changes take effect immediately

Details

For this example, we will use TOR as an example of an application that we have downloaded and extracted to ~/apps. After the application has been downloaded and extracted to the ~/apps directory we have the following file structure:

  • application directory: ~/apps/tor_2.2.34-1/
  • executable name: start-tor-browser

The application launcher does not index the ~/apps directory and all sub-directories within so what we do is create a symbolic link in our user’s bin directory that points to the binary we want to execute. This allows the app-launcher to index the symbolic link and execute the binary link when the symbolic link is used. This also keeps your bin directory clean (e.g. the full tor_2.2.34-1 code is not in your bin directory).

To do this we issue the following command:

1
2
$ cd ~/bin
$ ln -s ~/apps/tor_2.2.34-1/start-tor-browser tor

The above command creates a symbolic link named “tor” which points to the start-tor-browser binary in the ~/apps/tor_2.2.34-1 directory. The application is not important, for example if you wanted to launch firefox through the app-launcher you would use $ ln -s ~/apps/firefox/firefox firefox

Hope this small tip helps and if there are any questions or issues contact us!

Share on

drad
WRITTEN BY
drad
Sr. Consultant