Sunday, March 24, 2013

Create Intellij IDEA launcher on Ubuntu

If you develop using Intellij IDEA on Ubuntu, then it is handy to have launcher on unity panel. There are three relatively easy steps to make it happen:

1. Get current Unity launcher configuration

gsettings get com.canonical.Unity.Launcher favorites

Output:

['application://nautilus-home.desktop', 'application://firefox.desktop', 'unity://running-apps', 'unity://expo-icon', 'unity://devices']

2. Create IDEA desktop launcher

sudo vim /usr/share/applications/idea.desktop

Copy this content into the file and save it:

[Desktop Entry]
Name=Intellij IDEA 12
Comment=Development IDE
Exec=idea
Icon=/opt/idea12.0.4/bin/idea.png
Terminal=false
Type=Application
Categories=Development;IDE;
3. Update Unity launcher configuration

gsettings set com.canonical.Unity.Launcher favorites "['application://nautilus-home.desktop', 'application://idea.desktop', 'application://firefox.desktop', 'unity://running-apps', 'unity://expo-icon', 'unity://devices']"

Launcher is ready to be used