Create .desktop file

To create .desktop file in Ubuntu

[Desktop Entry]
Type=Application
Name=EclipseC++
GenericName=Eclipse
Comment=Eclipse for development
Exec=/path/to/eclipse
Icon=/path/to/icon.xpm
Terminal=false
MimeType=text/plain;
Categories=Development;IDE
StartupNotify=true
# If you won't specify following line you may end having duplicate icons
# in Ubuntu Dock bar where first is the one you have added to Dock and the
# other one is showing the running application. To avoid this issue you need
# to add following line in .desktop file
StartupWMClass=Eclipse
# How to determine value of StartWMClass for any application:
# – Run your application
# – Run xprop WM_CLASS from the commandline
# – Your mouse cursor will be in different shape
# – Click the window bar of the your application
# – Note down the value(s) printed on the console where you executed xprop
# – These printed values will be WM_CLASS(STRING) = "ABC", "RST", "XYZ"
# – Use any of the string shown in "xxx" for StartupWMClass in .desktop file. For example
# you can use ABC or RST or XYZ.

view raw
.desktop
hosted with ❤ by GitHub