You'll need to create a .desktop
file. To do this, create a new file named something like ExampleLauncher.desktop
(the name isn't too important, since window managers will likely read the name from inside the file and display that inside). Then, open that file in your favorite editor (double-clicking may not work in this case, so you'll need to drag the file in), and add the following:
[Desktop Entry]
Version=1.0
Name=JOSM Imports
GenericName=Java OpenStreetMap Editor
Comment=Editor for OpenStreetMap.org
Exec=JAVA_OPTS="-Djosm.home=/home/saikrishna/.josm-imports/" josm
Icon=josm.png
Terminal=false
Type=Application
Categories=Education;Geography;
This is what I have to run a custom instance of JOSM. Obviously, the content you'll have will be different.
Here is an explanation of each line:
Version=1.0
: Specifies the specification version of the .desktop
file. Keep this unchanged.
Name=
: Name that will be displayed in the menu (if you put this in ~/.local/share/applications
or /usr/share/applications
)
GenericName=
: Generic name of the program. This is like the category that a program falls under.
Comment=
: This may be used in displaying the tooltip.
Exec=
: This is what will be run when this file is activated. Unless what you are running is in your $PATH
, I recommend you use an absolute path.
Icon=
: This is an icon file name that will be displayed. If there's no specific icon, you can skip this.
Terminal=
: Specify if a terminal window should open when this is activated. For GUI programs, this will typically be false.
Type=Application
: This is the type of .desktop
file. There are other types, but leave this as-is.
Categories=
: This is the category that the program will fall under. This is mainly used in window managers that have hierarchical menus.
For a full list of valid keys and their descriptions, see here.