You are not logged in.

#1 2016-03-26 13:16

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,989

TDEInit could not launch ...

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

#2 2016-03-26 15:45

q4osteam
Q4OS Team
Registered: 2015-12-06
Posts: 4,223
Website

Re: TDEInit could not launch ...

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

#3 2016-03-26 16:01

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,989

Re: TDEInit could not launch ...

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

#4 2016-03-26 16:21

q4osteam
Q4OS Team
Registered: 2015-12-06
Posts: 4,223
Website

Re: TDEInit could not launch ...

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

#5 2016-03-26 16:38

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,989

Re: TDEInit could not launch ...

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

#6 2016-03-26 20:53

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,989

Re: TDEInit could not launch ...

I found the problem, I had chmod'd the wrong file!! roll

Offline

#7 2016-03-27 22:24

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,989

Re: TDEInit could not launch ...

you and me both lol

Offline

Board footer

Powered by FluxBB