Skip to content

Instantly share code, notes, and snippets.

@ajitid
Last active May 23, 2022 20:05
Show Gist options
  • Save ajitid/1f6a1d1e39263a50bab088f6d47dae38 to your computer and use it in GitHub Desktop.
Save ajitid/1f6a1d1e39263a50bab088f6d47dae38 to your computer and use it in GitHub Desktop.
Adding apps to search or launcher in Ubuntu (and in GNOME)

WM_CLASS(STRING) key is needed for all Java based applications because if not given, GNOME may not group them in launcher. Use xprop WM_CLASS command and click on a window to get its class.

# nano ~/.local/share/applications/androidstudio.desktop
[Desktop Entry]
Version=1.0
Type=Application
Name=Android Studio
Exec="/opt/android-studio/bin/studio.sh" %f
Icon=/opt/android-studio/bin/studio.png
Categories=Development;IDE;
Terminal=false
StartupNotify=true
(WM_CLASS(STRING)="android-studio", "jetbrains-studio")
# nano ~/.local/share/applications/datagrip.desktop
[Desktop Entry]
Version=1.0
Type=Application
Name="Jetbrains Datagrip"
Exec="/home/ajitid/DataGrip-2017.2.1/bin/datagrip.sh" %f
Icon=/home/ajitid/DataGrip-2017.2.1/bin/datagrip.png
Categories=Development;IDE;
Terminal=false
StartupNotify=true
WM_CLASS(STRING)="jetbrains-datagrip"
# nano ~/.local/share/applications/eclipse.desktop
[Desktop Entry]
Version=1.0
Type=Application
Name=Eclipse
Exec="/home/ajitid/eclipse/eclipse" %f
Icon=/home/ajitid/eclipse/icon.xpm
Categories=Development;IDE;
Terminal=false
StartupNotify=true
WM_CLASS(STRING)="Eclipse"
@ajitid
Copy link
Author

ajitid commented May 23, 2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment