Can not start Qt released software with double click shortcut or shell file in Ubuntu

Viewed 14

I have 2 machines which one is my develop computer and the other one is remote computer. And they are all Ubuntu20.04LTS with gnome. I deployed my application in my develop computer worked well. The application named TestApp. After packaged the application with share libraries in another folder and checked "Allow executing file as program", I can run it with double click TestApp. When I copied the folder to my remote computer I can't run it with double click it. But I can run it use shell command ./TestApp and it represents the program environment is well. I also checked "Allow executing file as program". I also created a shell file "run.sh":

#!/bin/bash
workdir=$(cd $(dirname $0); pwd)
export LD_LIBRARY_PATH=$workdir
cd $workdir
./TestApp

It is also can run with shell command but not run with double click it. What is the problem and how should I do?

0 Answers
Related