maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Games (https://talk.maemo.org/forumdisplay.php?f=12)
-   -   [problem] python problem? -inner spin -msaber -papertoss (https://talk.maemo.org/showthread.php?t=72915)

amadeukaos 2011-05-09 23:21

[problem] python problem? -inner spin -msaber -papertoss
 
why papertoss, inner spin, msaber, all these python apps only work by open it via terminal, and not for his respectives icons??

anyone know if its an individual problem or something with cssu or missing libs with python apps??

thanks all

tpd 2011-05-10 15:44

Re: [problem] python problem? -inner spin -msaber -papertoss
 
Can't speak for the other apps but inner-spin should hopefully be functional now when run directly (let me know if not?)

amadeukaos 2011-05-10 16:19

Re: [problem] python problem? -inner spin -msaber -papertoss
 
fail to run directly... maybe is with my n900?
I run "apt-get install -f" and nothing is missing too...
How can I test this?
By the way, great game, u forgot to ANNOUNCE here in the forum :)

misiak 2011-05-10 16:20

Re: [problem] python problem? -inner spin -msaber -papertoss
 
Do you have any Linux knowledge? I would like to ask you the following:

1. Install Leafpad (if you don't have this program in your system yet)
2. Open terminal
3. Type
Code:

root
to become superuser
4. Type
Code:

leafpad /usr/bin/msaber
to edit it and replace the first line
Quote:

Originally Posted by original
#!/usr/bin/env python

with
Quote:

Originally Posted by replacement
#!/usr/bin/env python2.5

5. Save the file (tap the top bar and select "Save").
6. Close Leafpad
7. Close terminal
8. Try to run msaber from shortcut in the menu

What's the result?

towhatend 2011-05-10 16:41

Re: [problem] python problem? -inner spin -msaber -papertoss
 
apt-get install libsdl-mixer1.2=1:1.2.6-5+0m5

amadeukaos 2011-05-10 16:44

Re: [problem] python problem? -inner spin -msaber -papertoss
 
@misiak did all that, and nothing =/
In your device, it works?

misiak 2011-05-10 17:00

Re: [problem] python problem? -inner spin -msaber -papertoss
 
Quote:

Originally Posted by amadeukaos (Post 1003534)
@misiak did all that, and nothing =/
In your device, it works?

On my device I have problems with scripts, which have "#!/usr/bin/env python" in the beginning (when run from gui - nothing, when from command line - everything looks fine), while scripts with "#!/usr/bin/env python2.5" work in both situations... I have one more suggestion (I will stick to msaber):
Could you edit msaber.desktop:
Code:

root
leafpad /usr/share/applications/hildon/msaber.desktop

And change the line below in bold:
Quote:

[Desktop Entry]
Version=1.0
Encoding=UTF-8
Icon=msaber
Name=mSaber
Exec=/usr/bin/msaber > /home/user/MyDocs/msaberlog.txt
Type=Application
X-Osso-Type=application/x-executable
X-Osso-Service=net.khertan.msaber
Then after running it from gui (shortcut in the menu) you should see file "msaberlog.txt" in file manager in internal N900 memory. What are it's contents?

amadeukaos 2011-05-10 17:15

Re: [problem] python problem? -inner spin -msaber -papertoss
 
woa, did like you ask, but no .txt was created... weird... copy exactly like you said, I even double checked after run it... =/

misiak 2011-05-10 18:24

Re: [problem] python problem? -inner spin -msaber -papertoss
 
Quote:

Originally Posted by amadeukaos (Post 1003547)
woa, did like you ask, but no .txt was created... weird... copy exactly like you said, I even double checked after run it... =/

Yeah, my haven't created file either :P But on my device (PR1.3) msaber works out-of-the box from both gui shortcut and command line, so maybe my didn't create the file because there was no output... (everything seemed to work). What I would also try doing (just playing:P) is changing again the line "Exec=/usr/bin/msaber > /home/user/MyDocs/msaberlog.txt" to just "Exec=msaber" and checking if it works

amadeukaos 2011-05-10 19:19

Re: [problem] python problem? -inner spin -msaber -papertoss
 
Quote:

Originally Posted by misiak (Post 1003581)
....But on my device (PR1.3) msaber works out-of-the box from both gui shortcut....

Ops , mine is the last CSSU Update.... well, Iīm gonna try what you said an already tell u

amadeukaos 2011-05-10 19:24

Re: [problem] python problem? -inner spin -msaber -papertoss
 
Yeah, nothing, maybe is a CSSU thing?

tpd 2011-05-10 22:41

Re: [problem] python problem? -inner spin -msaber -papertoss
 
glad you are enjoying Inner-spin... am about to annouce, was holding off while I sorted a couple of issues and promoted into extras-testing.... there were issues with the config file (file permissions and also idiotic Tony code) - these should be fixed as of the latest version uploaded today (just before I responded so can you confirm you are definitely running with the latest), also you could quickly try

chmod 666 /opt/inner-spin/settings/issettings.cfg

thanks

misiak 2011-05-10 22:53

Re: [problem] python problem? -inner spin -msaber -papertoss
 
Quote:

Originally Posted by tpd (Post 1003767)
glad you are enjoying Inner-spin... am about to annouce, was holding off while I sorted a couple of issues and promoted into extras-testing.... there were issues with the config file (file permissions and also idiotic Tony code) - these should be fixed as of the latest version uploaded today (just before I responded so can you confirm you are definitely running with the latest), also you could quickly try

chmod 666 /opt/inner-spin/settings/issettings.cfg

thanks

Your package is correct and his problem is not related to file permissions. He said before that all apps work, but when started from command line in terminal, and all python apps fail when they are launched via shortcut in apps menu. So don't worry about your game, it has nothing to do with problems described in this thread, he has a general python problem ;)

to OP: try searching the nightmareously long CSSU thread for other reports of bugs with launching apps or python, it is probable that your problem is related to CSSU.

amadeukaos 2011-05-10 23:39

Re: [problem] python problem? -inner spin -msaber -papertoss
 
tpd, tryed what u said, and nothing, i will search latter for some solution on the cssu thread... also, i liked the new sounds, they are fun!

misiak, i think it is really some cssu problem, i hope someone can do these test? no one of you installed the cssu update? it is really awesome... btw, I didnt manage to run msaber from terminal, how is the procedure? didnt find the path, lol...

thank you all guys

misiak 2011-05-10 23:54

Re: [problem] python problem? -inner spin -msaber -papertoss
 
Quote:

Originally Posted by amadeukaos (Post 1003799)
tpd, tryed what u said, and nothing, i will search latter for some solution on the cssu thread... also, i liked the new sounds, they are fun!

misiak, i think it is really some cssu problem, i hope someone can do these test? no one of you installed the cssu update? it is really awesome... btw, I didnt manage to run msaber from terminal, how is the procedure? didnt find the path, lol...

thank you all guys

I cannot help with cssu unfortunately :( As of msaber, it should work when you type justt "msaber" if not, it is in /usr/bin as far as I remember (I installed it just for a moment to check if I have the same problems as you, I removed it shortly afterwards), so "/usr/bin/msaber" should do the trick ;)

amadeukaos 2011-05-11 00:26

Re: [problem] python problem? -inner spin -msaber -papertoss
 
OK! Finded something to analyse!!!

Tried to rum msaber from terminal and got this...

/home/user # /usr/bin/msaber
process 3315: arguments to dbus_connection_get_data() were incorrect, assertion "connection != NULL" failed in file dbus-connection.c line 5757.
This is normally a bug in some application using the D-Bus library.
process 3315: arguments to dbus_connection_set_data() were incorrect, assertion "connection != NULL" failed in file dbus-connection.c line 5721.
This is normally a bug in some application using the D-Bus library.
Aborted
/home/user #

anyone? canīt find any sollution here in the forum...
thanks

amadeukaos 2011-05-12 07:13

Re: [problem] python problem? -inner spin -msaber -papertoss
 
bump? sorry

amadeukaos 2011-05-12 08:04

Re: [problem] python problem? -inner spin -msaber -papertoss
 
ok, msaber worked via terminal, I should not run sudo root to run it... but anyway, none of these programs runs via icon desktop yet =\

ivyking 2011-05-12 08:27

Re: [problem] python problem? -inner spin -msaber -papertoss
 
well If you just want a quick solution , you can have the icon actually run the application in terminal..

ex. for paper toss

edit /usr/share/applications/hildon/papertoss.desktop

change the line that starts with Exec=python /opt/papertoss/game.py
to Exec=osso-xterm python\ /opt/papertoss/game.py

note that after writing python DONOT leave a space then \ then leave a space then /opt/papertoss/game.py

the same can be applied to other applications , just find the .desktop file for that application in /usr/share/applications/hildon/ and edit it

misiak 2011-05-12 09:14

Re: [problem] python problem? -inner spin -msaber -papertoss
 
Quote:

Originally Posted by ivyking (Post 1004703)
well If you just want a quick solution , you can have the icon actually run the application in terminal..

ex. for paper toss

edit /usr/share/applications/hildon/papertoss.desktop

change the line that starts with Exec=python /opt/papertoss/game.py
to Exec=osso-xterm python \ /opt/papertoss/game.py

note that after writing python leave a space then \ then space then /opt/papertoss/game.py

the same can be applied to other applications , just find the .desktop file for that application in /usr/share/applications/hildon/ and edit it

Nice hack :P But it doesn't really solve his problem, it's just workaround...

amadeukaos 2011-05-12 17:07

Re: [problem] python problem? -inner spin -msaber -papertoss
 
Did just like you said

[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Terminal=false
Name=Paper Toss
Exec=osso-xterm python \ /opt/papertoss/game.py
Icon=papertoss


Name[en_GB]=papertoss.desktop

and it FAILED, it opens the terminal as just like I typed python on it
=/

amadeukaos 2011-05-12 17:08

Re: [problem] python problem? -inner spin -msaber -papertoss
 
maybe I should re-install all python related stuff? lol... how I do that? :P

misiak 2011-05-12 21:48

Re: [problem] python problem? -inner spin -msaber -papertoss
 
Quote:

Originally Posted by amadeukaos (Post 1005005)
maybe I should re-install all python related stuff? lol... how I do that? :P

You could try in terminal
Code:

root
apt-get install --reinstall python* pygame*

and maybe adding more pysomething* at the end (i don't remember other python stuff now), if you want to reinstall all python stuff ;) If it's not python problem, maybe it is some system application launcher... (which hildon-blahblah app is responsible for running apps from app menu? hildon-home? hildon-desktop?)

And, could you tell if this works:
- create widget on your homescreen with shortcut to some python app
- try to run this app from there
- check if it works

ivyking 2011-05-16 18:05

Re: [problem] python problem? -inner spin -msaber -papertoss
 
Quote:

Originally Posted by amadeukaos (Post 1005004)
Did just like you said

[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Terminal=false
Name=Paper Toss
Exec=osso-xterm python \ /opt/papertoss/game.py
Icon=papertoss


Name[en_GB]=papertoss.desktop

and it FAILED, it opens the terminal as just like I typed python on it
=/

sorry I made a mistake , and corrected the original post too ,
Do not leave a space between python and \

so the correct form is :

Exec=osso-xterm python\ /opt/papertoss/game.py

amadeukaos 2011-05-16 18:49

Re: [problem] python problem? -inner spin -msaber -papertoss
 
Quote:

Originally Posted by ivyking (Post 1007614)
sorry I made a mistake , and corrected the original post too ,
Do not leave a space between python and \

so the correct form is :

Exec=osso-xterm python\ /opt/papertoss/game.py

Thanks man, it worked this way, I think something is broken, but it will fix only if I flash the device, so Iīm happy with this solution, LOL

only didnt manage to get msaber to work, but its only to show off for my friends, so I donīt mind to open xterm and type msaber...

Thanks!

Khertan 2011-05-16 19:11

Re: [problem] python problem? -inner spin -msaber -papertoss
 
works also out of the box ...

There is really people using mSaber ? I ask because i mainly abandon it, and forgot i ve do that until recently. There is delay in audio playback ... i think it could be really really better ... i can probably improve it in short time. It was my first app for n900 developped on the n810 :)

amadeukaos 2011-05-16 22:32

Re: [problem] python problem? -inner spin -msaber -papertoss
 
Quote:

Originally Posted by Khertan (Post 1007652)
works also out of the box ...

There is really people using mSaber ? I ask because i mainly abandon it, and forgot i ve do that until recently. There is delay in audio playback ... i think it could be really really better ... i can probably improve it in short time. It was my first app for n900 developped on the n810 :)

cool man, I like msaber, its awesome to impress geek girls, LOL
if you have a symbian, search for light saber for symbian s60v5, you could try do something like this, there is a hit detector, actually if you push the acelerometer hard, it will bring a sound of sabers hiting thenselve, lol...

:D waiting for the msaber 2.0

amadeukaos 2011-05-16 22:35

Re: [problem] python problem? -inner spin -msaber -papertoss
 
http://www.youtube.com/watch?v=66FlHXJnLmk

tpd 2011-05-20 00:47

Re: [problem] python problem? -inner spin -msaber -papertoss
 
if this is still an issue could you try the following???

dpkg -i | grep libsdl-mixer1.2

1.2.6-5+0m5 is fine if it mentions ogg and mp3 in there aswell I think that may be the source of the issue. (I managed to get my phone in the same state after investigating this library)


All times are GMT. The time now is 10:48.

vBulletin® Version 3.8.8