Active Topics

 



Notices


Reply
Thread Tools
Moderator | Posts: 6,215 | Thanked: 6,400 times | Joined on Nov 2011
#221
Try doing the chmod without being root...
 
Win7Mac's Avatar
Community Council | Posts: 664 | Thanked: 1,648 times | Joined on Apr 2012 @ Hamburg
#222
^ That does nothing...
__________________
Nokia 5110 > 3310 > 6230 > N70 > N9 BLACK 64GB
Hildon Foundation Board member
Maemo Community e.V. co-creator, founder and director since Q4/2016
Current Maemo Community Council member
 
Moderator | Posts: 6,215 | Thanked: 6,400 times | Joined on Nov 2011
#223
Originally Posted by Win7Mac View Post
^ That does nothing...
Nothing?

So the operation not permitted doesn't come and it simply goes to the next line?

Then it means the chmod has been done successfully...
 

The Following User Says Thank You to thedead1440 For This Useful Post:
Win7Mac's Avatar
Community Council | Posts: 664 | Thanked: 1,648 times | Joined on Apr 2012 @ Hamburg
#224
Originally Posted by thedead1440 View Post
Nothing?

So the operation not permitted doesn't come and it simply goes to the next line?
Exactly.

Originally Posted by thedead1440 View Post
Then it means the chmod has been done successfully...
I'd love to believe it, but
Code:
{script:python /home/user/uptime.py}
shows nothing on my standby screen...
__________________
Nokia 5110 > 3310 > 6230 > N70 > N9 BLACK 64GB
Hildon Foundation Board member
Maemo Community e.V. co-creator, founder and director since Q4/2016
Current Maemo Community Council member
 
Moderator | Posts: 6,215 | Thanked: 6,400 times | Joined on Nov 2011
#225
What I did:

Copied the script to /home/user
chmod 775 /home/user/uptime.py
{scriptython /home/user/uptime.py} added this as the 4th line in Billboard

Result:



Just so that you believe:

Code:
RM696-21-3_PR_005:~# python /home/user/uptime.py
2:53

Last edited by thedead1440; 2012-10-07 at 16:29.
 
Win7Mac's Avatar
Community Council | Posts: 664 | Thanked: 1,648 times | Joined on Apr 2012 @ Hamburg
#226
Of course I believe YOU, I just don't believe I did it the correct way.
Might it be that the python-script has to be coded in UTF8 instead of ANSI?
Sorry, I have no coding skills, I just followed these instructions and copy/pasted that code.
__________________
Nokia 5110 > 3310 > 6230 > N70 > N9 BLACK 64GB
Hildon Foundation Board member
Maemo Community e.V. co-creator, founder and director since Q4/2016
Current Maemo Community Council member
 
Moderator | Posts: 6,215 | Thanked: 6,400 times | Joined on Nov 2011
#227
Originally Posted by Win7Mac View Post
Of course I believe YOU, I just don't believe I did it the correct way.
Might it be that the python-script has to be coded in UTF8 instead of ANSI?
Sorry, I have no coding skills, I just followed these instructions and copy/pasted that code.
Sorry if I sounded rude

Download from http://db.tt/f63qw6Ve and save it to /home/user/

It could be that your line endings are Windows not Unix?


P.S. My coding skills (if you could call them so) are no better than anyone here, so don't fret

Last edited by thedead1440; 2012-10-07 at 16:52.
 
Win7Mac's Avatar
Community Council | Posts: 664 | Thanked: 1,648 times | Joined on Apr 2012 @ Hamburg
#228
Originally Posted by thedead1440 View Post
It could be that your line endings are Windows not Unix?
Thanks for your file, it is actually 3 Bytes smaller than the one I produced on my Win-machine. So probably yes, the line endings...

But no success. So I chmod +x'ed it again, but still no success.
I'm lost...
Attached Images
 
__________________
Nokia 5110 > 3310 > 6230 > N70 > N9 BLACK 64GB
Hildon Foundation Board member
Maemo Community e.V. co-creator, founder and director since Q4/2016
Current Maemo Community Council member
 
Moderator | Posts: 6,215 | Thanked: 6,400 times | Joined on Nov 2011
#229
I'm not sure maybe do a chmod 775 like i did instead of just a chmod +x...

The 3bytes are what Windows adds on hence its line endings for sure...
 
Posts: 63 | Thanked: 46 times | Joined on Feb 2012
#230
Originally Posted by Win7Mac View Post
Think I found a bug:
After watching a video with the default player, the title was still displayed after player was closed. Reboot emptied the line.

Still struggling with the python-script for uptime here.
My desktop is a Win7 and I used notepad++ for creating this script
Code:
#!/usr/bin/python
import datetime
seconds = int(float(open('/proc/uptime').read().split()[0]))
print str(datetime.timedelta(0, seconds))[:-3]
Coding was set to ANSI and I simply saved as python. Then copied it to /home/user, became root and tried
Code:
chmod +x /home/user/uptime.py
But got "operation not permitted". Where did I fail?
Try without became root user, if you modified files in /home/user/, the owner of those files is user no root user.
 

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


 
Forum Jump


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