You are not logged in.
Pages: 1
I am trying to get a python script running from an application launcher on the desktop, I can get it working by prefixing "python " before the application name, but cannot get it to run the script by using the script name on it's own. I have the file executable and it will run using cli "./scriptname.py"
what I am trying to achieve really is to get the name of my script showing in top to measure resource usage, I could track python, but, if there are any other python usages it will merge the information (I think).
Any idea's on how to get this to work?
Offline
We don't exactly understand the problem. If we create simple executable bash script 'test.sh' and related shortcut on the Desktop -> Create new -> Link to application -> Application tab , it works fine.
Shortcut has been created as follows:
[Desktop Entry]
Exec='/home/adminq/test.sh'
Icon=application-x-executable
Name=Verknüpfung zu Programm
StartupNotify=true
Terminal=false
Type=Application
X-TDE-SubstituteUID=false
Offline
I can use bash scripts fine, it is python scripts that don't seem to wok giving me a "TDEInit could not launch ..." Erorr message. My .desktop file looks the same as you have posted (with different names obviously).
I have the proper shebang and have tried both "#!/usr/bin/env python" and "#!/usr/bin/python" and neither seem to work. Could you try with a python script and let me know if I need to maybe change the "Type" or some other variable.
Offline
Create file test.py:
#!/usr/bin/env python
from subprocess import call
call(["kdialog", "--msgbox", "TEST"])
Make it executable and create shortcut as we have described above. It works fine here.
Offline
Thanks, I tried it and it works without issue. Does the TDEInit log output somewhere that I could check for the reason it is failing on my script?
Offline
I found the problem, I had chmod'd the wrong file!!
Offline
you and me both
Offline
Pages: 1