Sunday, January 8, 2012

"Installing" an application into the Dash Search of Ubuntu

So Ubuntu makes it seriously easy to install 90% of the programs you could need. Simply click on the Ubuntu Software Center, search for the application and click install. Done!

But what if the application you need is not in the software center? The best solution is to search for an official PPA url for the application and add it to your list of software sources. If there is not a PPA, most developers will build a .deb file for you, which is basically an executable installer. But then you have applications like Zend Studio 9. No PPA, No .deb, Simply a gziped directory structure with all of the files you need, ready to be placed anywhere you want and simply executed.

So how do you "install" Zend Studio... Simply pick a place where you want it to live. No one is really clear on where that should location should be, in fact there are loads of opinions. /opt, /usr/bin, ~/Desktop, etc... I chose /usr/local. If you don't like it there, pick another place.

That part is easy, and really doesn't really beg for a blog post, so let's get to the good part... how do I get Zend Studio to show up in my applications list & the Dash Search of Ubuntu. It is as simple as creating a single file (.desktop) and placing it where it belongs!

To see some examples of .desktop files, browse the /usr/share/applications directory. In my case, I decided to create my .desktop files in the ~/.local/share/applications directory. I just felt it made more sense. If you don't like it, feel free to drop yours in the /usr/share/applications directory.

So, press Ctrl+Alt+T to open a terminal window. and type in the following:

gedit ~/.local/share/applications/zend-studio.desktop

In that file, add the following:

[Desktop Entry]
Name=Zend Studio 9
Exec=/usr/local/ZendStudio/ZendStudio
Icon=/usr/local/ZendStudio/ZendStudio/icon.xpm
Terminal=false
Type=Application
StartupNotify=true
Categories=GNOME;Application;Development;

That's it! Open the search panel and type in "Zend", there you go!

1 comment:

Lucas said...

Thanks for this info Jacob!