Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Executable in redhat6/fedora does not launch on doubleclick via desktop shortcut.
Forum Updated to NodeBB v4.3 + New Features

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

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 3 Posters 1.5k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • RatzzR Offline
    RatzzR Offline
    Ratzz
    wrote on last edited by Ratzz
    #1

    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??

    --Alles ist gut.

    1 Reply Last reply
    0
    • Hamed.MasafiH Offline
      Hamed.MasafiH Offline
      Hamed.Masafi
      wrote on last edited by
      #2

      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

      Remote object sharing (OO RPC)
      http://forum.qt.io/topic/60680/remote-object-sharing-oo-rpc-solved

      Advanced, Powerful and easy to use ORM for Qt5
      https://forum.qt.io/topic/67417/advanced-powerful-and-easy-to-use-orm-for-qt5

      RatzzR 1 Reply Last reply
      2
      • mrjjM Offline
        mrjjM Offline
        mrjj
        Lifetime Qt Champion
        wrote on last edited by mrjj
        #3

        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
        
        RatzzR 1 Reply Last reply
        2
        • Hamed.MasafiH Hamed.Masafi

          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

          RatzzR Offline
          RatzzR Offline
          Ratzz
          wrote on last edited by
          #4

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

          --Alles ist gut.

          1 Reply Last reply
          1
          • mrjjM mrjj

            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
            
            RatzzR Offline
            RatzzR Offline
            Ratzz
            wrote on last edited by Ratzz
            #5

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

            --Alles ist gut.

            1 Reply Last reply
            1

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved