0

I compiled the latest QGIS sources into ~/bin/qgis. I can start the application from the command line running ~/bin/qgis/bin/qgis. Now I want to have application launcher entry. So I copied the .desktop file of the QGIS distribution installation:

cp /usr/share/applications/qgis.desktop ~/.local/share/applications

Next I renamed it:

cd ~/.local/share/applications
mv qgis.desktop qgis-custom.desktop

Next I edited the paths for TryExec and Exec in the file:

[Desktop Entry]
Type=Application
Name=QGIS Desktop Latest
Version=1.0
GenericName=Geographic Information System
GenericName[ar]=نظام المعلومات الجغرافي
# other translations omitted for brevity
GenericName[uz]=Geografik axborot tizimi
Icon=qgis
TryExec=/home/jjd/bin/qgis/bin/qgis
Exec=/home/jjd/bin/qgis/bin/qgis %F
Terminal=false
StartupNotify=false
Categories=Qt;Education;Science;Geography;
MimeType=application/x-qgis-project;image/tiff;image/jpeg;image/jp2;application/x-raster-aig;application/x-raster-ecw;application/x-raster-mrsid;application/x-mapinfo-mif;application/x-esri-shape;
Keywords=map;globe;postgis;wms;wfs;ogc;osgeo;

(Old .desktop file)

Finally I try to start it from the Unity launcher. Nothing happens ....
One thing that I remember which is different is that I have to export the library path in the shell:

export LD_LIBRARY_PATH=$HOME/bin/qgis/lib

I guess this is missing for the application launcher entry.

ignis
  • 4,257
JJD
  • 882
  • 1
    Try chmod +x ~/.local/share/applications/qgis-custom.desktop. The desktop file must be executable. – s3lph Aug 07 '14 at 10:36
  • @the_Seppi I tried this. No difference. Other .desktop files miss the x too but still work. – JJD Aug 07 '14 at 14:46
  • Did you try a Unity restart? Open HUD, then unity --replace – s3lph Aug 07 '14 at 14:51
  • Then change Exec and TryExec to (Try)Exec=env LD_LIBRARY_PATH=$HOME/bin/qgis/lib /home/jjd/bin/qgis/bin/qgis (%F). – s3lph Aug 07 '14 at 14:58
  • @the_Seppi Bingo! Please convert your comment into an answer. I will be happy to grant you the answer flag. Thank you! chmod is not needed. – JJD Aug 07 '14 at 15:03
  • FYI "user space" has nothing to do with this question. An application is by definition "user space"; it is not defined as /bin as you wrongly appear to believe. – ignis Sep 19 '14 at 14:11

1 Answers1

3

Since you told us that QGis needs the path ~/bin/qgis/lib in the library path, change the Desktop file as follows:

 TryExec=$HOME/bin/qgis/bin/qgis
 Exec=env LD_LIBRARY_PATH=$HOME/bin/qgis/lib $HOME/bin/qgis/bin/qgis %F
JJD
  • 882
s3lph
  • 14,694
  • 12
  • 61
  • 84