Executable in redhat6/fedora does not launch on doubleclick via desktop shortcut.



  • I have an application output created on Ubuntu . I have created installer for it using Qt installer framework.
    After installing the installer in Ubuntu it creates desktop shortcut and it launches via double click . even the application directly launches from the installed path via double click.
    When i install the same installer in red hat 6/ fedora it installs perfectly and desktop shortcut is created . But on double click the application doesn't open. while double clicking the application from the installed path opens the application.
    The contents of .desktop file is shown below

    Version=1.0
    Type=Application
    Terminal=false
    Exec=Apppath
    Name=untiteld
    

    Even the shortcut created using Gnome application launcher does not launch the application via double click.
    Its content are

    #!/usr/bin/env xdg-open
    
    [Desktop Entry]
    Version=1.0
    Type=Application
    Terminal=false
    Icon[en_US]=gnome-panel-launcher
    Exec=AppPath
    Name[en_US]=untiteld
    Name=untiteld
    Icon=gnome-panel-launcher
    

    But the maintenance tool shortcut which is in the same folder launches with double clik

    Version=1.0
    Type=Application
    Terminal=false
    Exec=Apppath_maintenanceTool
    Name=untiteld
    

    why the shortcut doesnot launch on double click??



  • Did you created launch shell file on the application installation folder?
    If answer is NO:
    Create a file with the name of executable file plus ".sh" with flowing content:

    #!/bin/sh
    appname=`basename $0 | sed s,\.sh$,,`
    
    dirname=`dirname $0`
    tmp="${dirname#?}"
    
    if [ "${dirname%$tmp}" != "/" ]; then
    dirname=$PWD/$dirname
    fi
    LD_LIBRARY_PATH=$dirname
    export LD_LIBRARY_PATH
    $dirname/$appname "$@"
    

    Change your desktop shortcut to point to this file.
    More information:
    http://doc.qt.io/qt-5/linux-deployment.html


  • Qt Champions 2016

    UPDATE: @Hamed-Masafi version seems better but make sure to export
    the platforms folder too. (didn't see before i posted)

    --
    try to make it look for .SO files in the folder
    Put in a loader.sh file (stupid forum) and let shortcut point to this.

    FOLDER=`dirname $0`
    LD_LIBRARY_PATH=$FOLDER
    LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$FOLDER/platforms
    export LD_LIBRARY_PATH
    exec $FOLDER/appname
    


  • @Hamed.Masafi
    Thanks for the reply .
    Your idea is good .



  • @mrjj
    exporting the path and running the exec works fine now :)


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.