You are not logged in.
Dear all,
I want to start an application by clicking on a desktop icon, which should start an executable script through a very simple desktop file named IVA.desktop. It just contains the following lines:
[Desktop Entry]
Name=IVA
GenericName=IVA
Exec=iva.Rsh
Terminal=true
Type=Application
Icon=plan
Categories=Application
The script iva.Rsh is located in /usr/local/bin, and has mode 755. However, when I click on the icon I get a message saying that the text file appears to be a sequence of executable commands. What do you want to do with it? So I must click on the button "Execute" to start the application. Other icons on the desktop start as soon as I click on them. What I am missing? Many thanks for your attention!
Offline
No hints? For those that could be interested, I finally managed to solve the problem by mimicking the behavior of other one-click-starting icons:
1. They are a link to another *.desktop file located in /usr/share/applications
2. The above *.desktop file has a line Exec=... which has no path, just the name of the executable file
3. The executable file may be a bash script with mode 755, placed at /usr/bin (I have not tested /usr/local/bin or other suitable directories)
Files described in points 2 and 3 must be owned by root:root
I thought there should be an easiest way, but I am happy with this one by now...
Offline
(...) I get a message saying that the text file appears to be a sequence of executable commands. What do you want to do with it? So I must click on the button "Execute" to start the application.
Is it a message like this one? In this case did you notice the checkbox?
Q4OS machine: Samsung R519 - Pentium T4200 2.0 GHz - 4 GB RAM - 500 GB SSD
Offline
I'd love having that checkbox! May be I don't have it because I am using LXDE instead of TDE...
Offline
Then create a symbolic link on your desktop to your app, not a .desktop file:
~/Desktop$ ln -s /usr/local/bin/iva.Rsh IVA
Last edited by hchiper (2024-09-20 07:22)
Q4OS machine: Samsung R519 - Pentium T4200 2.0 GHz - 4 GB RAM - 500 GB SSD
Offline
Thank you, but the same window appears asking what to do with the file!
Offline
Just a correction to my point 1 above: It is not just a symbolic link, it must be a desktop file of type link, like this one:
[Desktop Entry]
Type=Link
Name=IVA
Icon=plan
URL=/usr/share/applications/IVA.desktop
And with respec to to point 3, it works also if located at /usr/local/bin. (It should work when placed at any directory in the user's PATH)
Last edited by jagp (2024-09-20 12:04)
Offline
Thank you, but the same window appears asking what to do with the file!
Please can you run the following commands and post the outputs:
$ ls -l ~/Desktop/IVA
$ ls -l /usr/local/bin/iva.Rsh
Can you describe what happens when you type this command:
$ /usr/local/bin/iva.Rsh
And does your iva.Rsh begin with an appropriate shebang (#!)?
Last edited by hchiper (2024-09-20 14:09)
Q4OS machine: Samsung R519 - Pentium T4200 2.0 GHz - 4 GB RAM - 500 GB SSD
Offline