Contents

Ubuntu 18.04 launcher

Create your own application launcher

Contents

Assume we want to create a launcher for Android Studio, what we need to do is:

  • Create a file androidStudio.desktop and put it into ~/.local/share/applications
  • Fill and add the following content into the file
1
2
3
4
5
6
[Desktop Entry]
Name=Launcher Name
Exec=Command to Execute
Terminal=false
Type=Application
Icon=Path to Icon
  • Click on activities or show applications and search Android Studio. It should appear, then right click on the icon app and tick “Add to your favorite”

!!! When you launch Android Studio if you have a duplicated icon into the launcher, you must use StartupVMClass to group windows by class. Use the following step to known the classes of your application:

  • Launch the application, Android Studio in your case

  • Execute xprop WM_CLASS into a terminal and select your application.

  • It will output something likes WM_CLASS(STRING) = "sun-awt-X11-XFramePeer", "jetbrains-studio"

  • Select jetbrains-studio and put it as value of StartupWMClass into the file androidStudio.desktop

Close the application, relaunch it and icon should not longer be duplicated.