Reply
Thread Tools
noobmonkey's Avatar
Posts: 3,203 | Thanked: 1,391 times | Joined on Nov 2009 @ Worthing, England
#131
Originally Posted by fatalsaint View Post
If the code you gave me earlier is what you are running..

Don't you need a:
#!/usr/bin/python

Or whatever the appropriate path is for python on the N900 at the beginning?

That could by why the desktop icon isn't working.

You want either:
Code:
Exec=python /opt/healthcheck/healthcheck.py
Or add the line above to the top of healthcheck.py.
Thanks Fatalsaint, again!

Got the (hashkey not working)! /usr/bin/env python
at the beginning

assuming the Exec=python /opt/healthcheck/healthcheck.py is for the .desktop file? (replace current line?)

(the icon loads, and it looks like the application loads, so not sure the error is there.)
__________________
----------- Follow me on Twitter here
----------- My Photography Website and Blog is here
----------- Author of the N900 Health Check Application ----------- New Version in Extras Devel (Dec 2010 - 2.9.10)
----------- Are you on the N900 World Map? - http://pininthemap.com/maemo - masterpin: shotgun
----------- What apps do you want to see on the n900 or in MeeGo in the future? -
 
Posts: 3,428 | Thanked: 2,856 times | Joined on Jul 2008
#132
Originally Posted by noobmonkey View Post
Thanks Fatalsaint, again!

Got the (hashkey not working)! /usr/bin/env python
at the beginning

assuming the Exec=python /opt/healthcheck/healthcheck.py is for the .desktop file? (replace current line?)

(the icon loads, and it looks like the application loads, so not sure the error is there.)
Yes you can do one, or the other, or both..

Adding #!/usr/bin/env python to the top of healthcheck.py will allow you to either:
Code:
/opt/healthcheck/healthcheck.py
*or*
cd /opt/healthcheck/
./healthcheck.py
In a terminal.. Or use the Exec code you have right now. Not having that line in the file, requires you to pass it to python first with either:
Code:
python /opt/healthcheck/healthcheck.py
*or*
cd /opt/healthcheck
python healthcheck.py
*or*
Exec=python /opt/healthcheck/healthcheck.py
Etc....
__________________
If I've helped you or you use any of my packages feel free to help me out.
-----------------------------------------------------------------------------------
Maintaining:
pyRadio - Pandora Radio on your N900, N810 or N800!
 
noobmonkey's Avatar
Posts: 3,203 | Thanked: 1,391 times | Joined on Nov 2009 @ Worthing, England
#133
Ok, tried again with the exec python part - doesnt make a difference

So to confirm, .desktop has
Exec=python /opt/healthcheck/healthcheck.py

and the healthcheck.py file has #!/usr/bin/env python as it's first line.

The icon installs, it starts to run, and then just crashes out and dissapears....
__________________
----------- Follow me on Twitter here
----------- My Photography Website and Blog is here
----------- Author of the N900 Health Check Application ----------- New Version in Extras Devel (Dec 2010 - 2.9.10)
----------- Are you on the N900 World Map? - http://pininthemap.com/maemo - masterpin: shotgun
----------- What apps do you want to see on the n900 or in MeeGo in the future? -
 
qwerty12's Avatar
Posts: 4,274 | Thanked: 5,358 times | Joined on Sep 2007 @ Looking at y'all and sighing
#134
Originally Posted by noobmonkey View Post
Ok, tried again with the exec python part - doesnt make a difference
With X-Osso-Service present in your desktop file, changing the Exec field there won't make a difference. Edit /usr/share/dbus-1/services/HealthCheck.service instead.

If the problem is that it crashes after some seconds when starting it from the menu (starting it from the terminal shouldn't cause it to crash) you need to initialize an osso.Context since you're using X-Osso-Service.

Try something like:
Code:
import osso
osso_c = osso.Context("healthcheck", "666", True)
If that fails, too, then you can try replacing the previous X-Osso-Type line with X-Osso-Type=application/x-python

If that also fails, comment out the X-Osso-Service line in your desktop file. Of course, only try all this if your program doesn't crash when started from the terminal.
 

The Following 3 Users Say Thank You to qwerty12 For This Useful Post:
noobmonkey's Avatar
Posts: 3,203 | Thanked: 1,391 times | Joined on Nov 2009 @ Worthing, England
#135
Originally Posted by qwerty12 View Post
With X-Osso-Service present in your desktop file, changing the Exec field there won't make a difference. Edit /usr/share/dbus-1/services/HealthCheck.service instead.

If the problem is that it crashes after some seconds when starting it from the menu (starting it from the terminal shouldn't cause it to crash) you need to initialize an osso.Context since you're using X-Osso-Service.

Try something like:
Code:
import osso
osso_c = osso.Context("healthcheck", "666", True)
If that fails, too, then you can try replacing the previous X-Osso-Type line with X-Osso-Type=application/x-python

If that also fails, comment out the X-Osso-Service line in your desktop file. Of course, only try all this if your program doesn't crash when started from the terminal.
I'm assuming the code is to go in my healthcheck.py file, and not the service file?
does run fine from terminal.
__________________
----------- Follow me on Twitter here
----------- My Photography Website and Blog is here
----------- Author of the N900 Health Check Application ----------- New Version in Extras Devel (Dec 2010 - 2.9.10)
----------- Are you on the N900 World Map? - http://pininthemap.com/maemo - masterpin: shotgun
----------- What apps do you want to see on the n900 or in MeeGo in the future? -
 
qwerty12's Avatar
Posts: 4,274 | Thanked: 5,358 times | Joined on Sep 2007 @ Looking at y'all and sighing
#136
Originally Posted by noobmonkey View Post
I'm assuming the code is to go in my healthcheck.py file, and not the service file?
does run fine from terminal.
Yessssssir.
 

The Following User Says Thank You to qwerty12 For This Useful Post:
noobmonkey's Avatar
Posts: 3,203 | Thanked: 1,391 times | Joined on Nov 2009 @ Worthing, England
#137
Okey dokey, trying the osso stuff and will see how it goes
__________________
----------- Follow me on Twitter here
----------- My Photography Website and Blog is here
----------- Author of the N900 Health Check Application ----------- New Version in Extras Devel (Dec 2010 - 2.9.10)
----------- Are you on the N900 World Map? - http://pininthemap.com/maemo - masterpin: shotgun
----------- What apps do you want to see on the n900 or in MeeGo in the future? -
 
noobmonkey's Avatar
Posts: 3,203 | Thanked: 1,391 times | Joined on Nov 2009 @ Worthing, England
#138
Well
import osso
osso_c = osso.Context("healthcheck", "666", True)
didn't work, will try the rest when i get home in 20 mins
__________________
----------- Follow me on Twitter here
----------- My Photography Website and Blog is here
----------- Author of the N900 Health Check Application ----------- New Version in Extras Devel (Dec 2010 - 2.9.10)
----------- Are you on the N900 World Map? - http://pininthemap.com/maemo - masterpin: shotgun
----------- What apps do you want to see on the n900 or in MeeGo in the future? -
 
noobmonkey's Avatar
Posts: 3,203 | Thanked: 1,391 times | Joined on Nov 2009 @ Worthing, England
#139
Just realised, not actually using python-osso.....

So removing traces of it from my code and the .desktop / build_app files....
Does that mean i can remove the lines
X-Osso-Service=com.nokia.healthcheck
X-Osso-Type=application/x-executable
from the .desktop file too?
__________________
----------- Follow me on Twitter here
----------- My Photography Website and Blog is here
----------- Author of the N900 Health Check Application ----------- New Version in Extras Devel (Dec 2010 - 2.9.10)
----------- Are you on the N900 World Map? - http://pininthemap.com/maemo - masterpin: shotgun
----------- What apps do you want to see on the n900 or in MeeGo in the future? -
 
casper27's Avatar
Posts: 844 | Thanked: 521 times | Joined on Jan 2009 @ UK southampton
#140
Just installed and same results as rest starts and then crashes just before launch. Getting there though Noob keep churning that code
 

The Following User Says Thank You to casper27 For This Useful Post:
Reply

Tags
code, health check, n900, python


 
Forum Jump


All times are GMT. The time now is 15:17.