Home > Mobile >  Linux package qt program generated icon double-click on startup
Linux package qt program generated icon double-click on startup

Time:10-03

The desktop file is as follows:

[the Desktop Entry]
Encoding=utf-8
Name=test
GenericName=test
Comment=test
The Exec=/root/Desktop/Dr/test1. Sh % f
Icon=/root/Desktop/Dr/default PNG
Terminal=true
Type=Application
Categories=Application;

The test1. Sh:
#!/bin/bash
Export LD_LIBRARY_PATH="/root/Desktop/Dr"
`./test `//test for qt release executable file

Exec item tested if directly on the desktop file write test files can perform
But the test1. Sh script calls on failure as `./test ` the command execution problems
But the terminal directly on the command line./test1. Sh can correctly call test. Sh perform

If the desktop script calls, the restrictions, or test1. ` in sh./test ` writing problems

Thank you ~ ~ ~

CodePudding user response:

Test1. Sh using the absolute path to the test files

CodePudding user response:

I also met you before the problem, then changed slightly under sh scripts:
 
#!/bin/bash
CD/root/Desktop/Dr/
./test

CodePudding user response:

Path problem , the script also has its own path
  •  Tags:  
  • Qt
  • Related