I get the point about running in a terminal, but (a) I’ve never found the need to do this before on other platforms, (b) one of the shell scripts does work with double-click in Thunar (datechk.sh runs DateChk.py), but the other (clipsave.sh fails to run ClipSave.py). (see code below.) So obviously, running in a terminal isn’t essential.
datechk.sh simply has this content:
python /home/pinebook/bin/DateChk.py
DateChk.py contains this:
#!/usr/bin python3
import time
t = time.asctime()
time_now = t[0:3]+','+t[8:10]+' '+t[4:7]+' '+t[20:24]+' '+t[11:19]
f = open('/run/media/pinebook/0101-076C/time.txt', 'w')
f.write(time_now)
f.close()
clipsave.sh contains this:
python /home/pinebook/bin/ClipSave.py
(note how this is very similar to the other shell script)
ClipSave.py contains this:
#!/usr/bin python3
import datetime
import pyperclip
nas = '/home/pinebook/Documents/'
t = datetime.datetime.now()
name = t.strftime('%Y%m%d_%H%M%s')[0:15]+'.txt'
clip = pyperclip.paste()
print(nas+name)
f = open(nas+name, 'w')
f.write(clip)
f.close()
Attempting to run either python script in Thunar results in “Permission denied” but note they are executable and owned by “pinebook” (me).
I’m guessing that the filemanager has a setting that prevents it running certain scripts, but why is it OK to run a shell script that runs a python script, and not the python directly? And why do almost identical shell scripts behave differently?
Incidentally, I’m ot using XFCE, I’m using Plasma, so if I did want to run in a terminal I’m not sure what the command would be.
What is rather annoying is that other than “Permission denied” there are no error messages (at least not that get reported to the user). Is there a way to get debug info?
Forgive me if the post formatting isn’t quite right, I’m not familiar with it yet and haven’t found a preview option.