Skip to content

Adding icon for specific setup to Dash, Launcher or Desktop

Anna Petrasova edited this page Mar 30, 2017 · 4 revisions

Dash using command line

Execute this in terminal (you will be prompted for administrator password):

sudo nano /usr/share/applications/grass.desktop

Copy and paste the following text (use context menu - right click - to do that):

[Desktop Entry]
Version=1.0
Name=GRASS GIS
Comment=Start GRASS GIS
Exec=/home/.../grass/bin.x86_64-pc-linux-gnu/grass73
Icon=/home/.../grass/dist.x86_64-pc-linux-gnu/share/icons/hicolor/scalable/apps/grass.svg
Terminal=true
Type=Application
Categories=GIS;Application;

Note: adjust this based on your path to GRASS GIS and version of GRASS GIS! Check whether the svg file is present and what is its name (can differ in different versions). Once you save this, launch Ubuntu Dash, type GRASS GIS, and then drag the GRASS GIS icon on your task bar (Launcher).

GRASS GIS application with workspace

You can also prepare a GRASS workspace file (which saves window position and layers) and load it with that. Then you specify the location, mapset and workspace:

[Desktop Entry]
Version=1.0
Name=Coastal Game
Comment=Start GRASS GIS with the Coastal Game for large model
Exec=/home/.../grass/bin.x86_64-pc-linux-gnu/grass71 /home/.../grassdata/nc_spm/landsat/ --exec g.gui -f workspace=/home/.../project.gxw
Icon=/home/.../grass/dist.x86_64-pc-linux-gnu/share/icons/hicolor/scalable/apps/grass71.svg
Terminal=true
Type=Application
Categories=GIS;Application;

Desktop

To add the icon to the Desktop, copy the .desktop file to the ~/Desktop directory. You can also create the file right at the Desktop using right click and New document > Empty document. To be able to use the file as a icon, right click on the file, select Properties, go to Permissions tab and check Allow executing file as program.