You are not logged in.

#1 2024-06-03 02:58

dlrider
Member
Registered: 2024-02-26
Posts: 19

script file execution and Konqueror?

Using (trying as a newly installed system) 32-bit Trinity Aquarius.  I have script file Test.sh as

#!/bin/sh

echo "testing..."

sleep 10

From the terminal line (Konsole) it can successfully run using

dlrider@q4os-desktop:~/apps$ ./Test.sh

But from file manager Konqueror, it only opens in the configured text file editors, currently default now is Geany.  I have set the file as executable (chmod +x).  I have added to the .sh file association, Konsole to use as top preference, for the application type x-shellscript.

If I ditch Konqueror as the file manager, and add trinity-dolphin (I believe), will everything smooth out?  I won't break anything?

Offline

#2 2024-06-03 08:19

seb3773
Member
Registered: 2023-11-01
Posts: 131

Re: script file execution and Konqueror?

dlrider wrote:

Using (trying as a newly installed system) 32-bit Trinity Aquarius.  I have script file Test.sh as

#!/bin/sh

echo "testing..."

sleep 10

From the terminal line (Konsole) it can successfully run using

dlrider@q4os-desktop:~/apps$ ./Test.sh

But from file manager Konqueror, it only opens in the configured text file editors, currently default now is Geany.  I have set the file as executable (chmod +x).  I have added to the .sh file association, Konsole to use as top preference, for the application type x-shellscript.

If I ditch Konqueror as the file manager, and add trinity-dolphin (I believe), will everything smooth out?  I won't break anything?

Installing doplhin trinity won't change this. I believe it is much better to not have scripts executed when you double click on it (safer in a way). Although this can be achieved, may I suggest you instead using some services menus ?

I joined a zip file with two .desktop files (you have to put them in "~/.trinity/share/apps/konqueror/servicemenus/" (and in "~/.trinity/share/apps/d3lphin/servicemenus/ if you use dolphin trinity), and two .sh files, just put them in  "/usr/local/bin/", and set them executable.
Once this done, you'll have two new entries when you right click on a .sh file on the desktop or in konqueror/dolphin file manager: execute script / execute script as root. These scripts will open konsole and execute your script accordingly.

Tell me if it works for you smile

Last edited by seb3773 (2024-06-03 08:19)


Attachments:
zip execscript.zip, Size: 1.25 KiB, Downloads: 41

My Q4OS scripts: win10/osx theming, perfs optimisation, laptop configuration, ...  for trinity users -->  https://github.com/seb3773/q4osXpack

Offline

Board footer

Powered by FluxBB