WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: OLPC XO  (Read 11943 times)

Offline mavrothal

  • WikiUser
  • *
  • Posts: 43
Re: OLPC XO
« Reply #15 on: March 27, 2010, 05:39:09 AM »
OK, I managed :)
One thing is not clear to me. Is the actual path to battery capacity should be in the  ChargeLavel_Link file or in the readbattery script?
Because if in the ChargeLavel_Link  it just reads the path and not the output of the link.
Adding the path in the `readbettery' works just fine.

What should I trim if I just need the battery monitor? 2MB is rather a lot

PS: I did try with with everyway I could imagine to make it autostart through /opt/bootlocal.sh. No luck.  How do you autostart it in TC-XO?
« Last Edit: March 27, 2010, 09:31:27 AM by mavrothal »

Offline jls

  • Hero Member
  • *****
  • Posts: 2118
Re: OLPC XO
« Reply #16 on: March 27, 2010, 10:32:23 AM »
calculator doesn't work: click 1+1= and it reports 0
clock "says" 17:30 while date command "says" 18:30
I see am empty rectangular box, what is it?
plops 0.0.2 binary tested in mc 2.10 on a desktop pc
dCore user

Offline jls

  • Hero Member
  • *****
  • Posts: 2118
Re: OLPC XO
« Reply #17 on: March 27, 2010, 10:44:31 AM »
I think the box is the cpu graph, but is always empty
dCore user

Offline jls

  • Hero Member
  • *****
  • Posts: 2118
Re: OLPC XO
« Reply #18 on: March 27, 2010, 10:59:21 AM »
this is the screenshot
dCore user

Offline Lerc

  • WikiUser
  • *
  • Posts: 10
Re: OLPC XO
« Reply #19 on: March 27, 2010, 11:23:16 AM »
I think the box is the cpu graph, but is always empty
Actually it's an all purpose graphing widget. the monitor script can be used to make it a cpu graph.  It's empty because nothing is giving it data by default.

Any integers sent to the data pipe will be graphed.
I made a clip showing the widgets in action

This link jumps to the grapher bit. it starts off just by using seq but gets clever at the end.
 http://www.youtube.com/watch?v=0QJ9fTYZuwk&fmt=22#t=4m00s

Offline Lerc

  • WikiUser
  • *
  • Posts: 10
Re: OLPC XO
« Reply #20 on: March 27, 2010, 11:43:20 AM »
calculator doesn't work: click 1+1= and it reports 0
The calculator calls the evaluate script in order to facilitate people plugging in their own evaluation engines.  ( for instance http://forum.tinycorelinux.net/index.php?topic=5561.0 appeals as a start for a lightweight solution)

At a guess I would say there's a dependency for wcalc. libmpfr perhaps?  go to the calculator directory and try ./evaluate 1+1 and see what it does. 

Quote
clock "says" 17:30 while date command "says" 18:30
That'll be a legitimate bug, there's some locale thing that escapes me apparently.  Curiously, it seems to be wrong on about half the computers I try it on.

The example widget in the wiki is the clock  it's a full 60 lines long http://code.google.com/p/plops/wiki/ExampleWidget

See if you can tell where I went wrong.

Offline Lerc

  • WikiUser
  • *
  • Posts: 10
Re: OLPC XO
« Reply #21 on: March 27, 2010, 12:07:40 PM »
OK, I managed :)
One thing is not clear to me. Is the actual path to battery capacity should be in the  ChargeLavel_Link file or in the readbattery script?
Because if in the ChargeLavel_Link  it just reads the path and not the output of the link.
Adding the path in the `readbettery' works just fine.
the readbattery script is all that is required.  The ChargeLevel_Link_link is supposed just to be a convenience link, so you can change the path without editing the script.  If you are comfortable with editing scripts just change readbattery so it outputs the battery level directly. (which it sounds like you did anyway)
Quote

What should I trim if I just need the battery monitor? 2MB is rather a lot
Most of the bulk is in the calculator.  The most recent version includes wcalc because I had issues with readline versions so I just dumped wcalc with he readline it needs into the calculator directory. 

As I linked just before.  http://forum.tinycorelinux.net/index.php?topic=5561.0 is a good starting point for an evaluate script that would do a rough job with fewer dependencies.

Quote
PS: I did try with with everyway I could imagine to make it autostart through /opt/bootlocal.sh. No luck.  How do you autostart it in TC-XO?
I'm using OpenBox with a custom ~/.config/openbox/autostart.sh

The script launches any executables in ~/.config/autostart and /config/autostart/*/AppRun
So I just needed to drop the Plops icon in ~/.config/autostart and tell Rox-Filer to make it a symlink.

I actually call $HOME/.config/openbox/autostart.sh explicitly at the end of  .xsession so it's not really openbox specific anymore. 

I'm close to being able to put up an image of the SD card that I'm booting my XO from. It's feeling quite nice to use.

Offline mavrothal

  • WikiUser
  • *
  • Posts: 43
Re: OLPC XO
« Reply #22 on: March 28, 2010, 02:23:04 PM »
This is driving me crazy...
After the first succeful launch of the battery monitor and reboot quite often I get
Code: [Select]
Launch/battery
X Error of failed request:  BadAtom (invalid Atom parameter)
  Major opcode of failed request:  18 (X_ChangeProperty)
  Atom id in failed request:  0x0
  Serial number of failed request:  23
  Current serial number in output stream:  28
Any idea???

Offline Lerc

  • WikiUser
  • *
  • Posts: 10
Re: OLPC XO
« Reply #23 on: March 28, 2010, 06:57:36 PM »
This is driving me crazy...
After the first succeful launch of the battery monitor and reboot quite often I get
Code: [Select]
Launch/battery
X Error of failed request:  BadAtom (invalid Atom parameter)
Any idea???

I can reproduce this,  I put a sleep 5 in my .xsession  because I have a
a line xset +fp $HOME/usr/share/fonts that wasn't working from the script but was from the commandline.  Putting the sleep in there fixed the xset problem,  it seems to also fix the widgets problem.

From that I would guess that the waitforx command earlier in .xsession is perhaps not waiting properly,  The other possibility is that it needs a complimentary waitforwm.  The XO is just pushing the bounds of slowness :-)

So try a wee sleep ahead of the launching the widgets and see what happens.


 

Offline mavrothal

  • WikiUser
  • *
  • Posts: 43
Re: OLPC XO
« Reply #24 on: March 29, 2010, 02:28:37 AM »
I can reproduce this,  I put a sleep 5 in my .xsession  because I have a
a line xset +fp $HOME/usr/share/fonts that wasn't working from the script but was from the commandline. 

The issue is that this is also happening from the command line at times...

I'm trying to make a tcz with just the battery monitor and is very frustrating when the performance is unpredictably spotty... Would be great if you just make one. ;D

An addition you may want to put in Plops is the ability to quit the widgets individually after launching, and not all or nothing.
Another addition you want to make is for the handler to quit if it fails because a) you may and up with a lot of ghost processes running, b) I _think_ that you can not launch 2 instances of the same widget.


Offline Lerc

  • WikiUser
  • *
  • Posts: 10
Re: OLPC XO
« Reply #25 on: March 31, 2010, 01:41:37 AM »
The issue is that this is also happening from the command line at times...

I'm trying to make a tcz with just the battery monitor and is very frustrating when the performance is unpredictably spotty... Would be great if you just make one. ;D

Now the problem with that is I have yet to make a tcz. So I'll be as stuck as you :-)

I must say though, it's not really designed to be a system level installed thing.  It more properly resides in the users home directory.    Also It's a bit heavy for just the one widget.  I focused on keeping the per-widget resources low, the plan is to make plenty (I'm rather tempted to make a winamp-ish widget to drive mpd) of widgets. 

Quote
An addition you may want to put in Plops is the ability to quit the widgets individually after launching, and not all or nothing.
Another addition you want to make is for the handler to quit if it fails because a) you may and up with a lot of ghost processes running, b) I _think_ that you can not launch 2 instances of the same widget.
Yeah, it's a bit rough around the edges.   It works fine running once at boot, which is the usual case but killing and rerunning is prone to get it confused.  I do plan to get to these things, but I have a million and one things to do.

Running multiple instances is as simple as making a new copy of it.  To make a clone of another widget you could have a directory with, a set of Pipes and symlinks to the required files.  I figured, as is the nature of Widgets, people have a tendancy to want customise.  So I decided to have the widget directory hold the entire widget, allowing people to copy, symlink, or provide custom files as they see fit.  The easiest example of this would be a alternative clock widget that has a symlink to the same exe as the default clock, but a different png file for the clock face (plus it's own commands,events & results pipes). 


Offline mavrothal

  • WikiUser
  • *
  • Posts: 43
Re: OLPC XO
« Reply #26 on: March 31, 2010, 03:35:06 AM »
must say though, it's not really designed to be a system level installed thing.  It more properly resides in the users home directory.    Also It's a bit heavy for just the one widget. 
If you remove the core the entire tcz is only 800k which is OK I guess for a battery monitor (if it was working properly ;))

Quote
Yeah, it's a bit rough around the edges.   It works fine running once at boot, which is the usual case but killing and rerunning is prone to get it confused.
The problem I have is, that if I run it "as is" is fine. If I make any modifications (deleting widgets, editing the plops.conf file etc), runs fine but on reboot does not run anymore ???

Quote
I do plan to get to these things, but I have a million and one things to do.
OK we'll have a race! Till I learn how to code a simple GenMon-like in FLTK  (don't worry you'll win easily  ;D)

Offline mavrothal

  • WikiUser
  • *
  • Posts: 43
Re: OLPC XO
« Reply #27 on: April 21, 2010, 12:52:43 AM »
OK we'll have a race! Till I learn how to code a simple GenMon-like in FLTK  (don't worry you'll win easily  ;D)
I win  :P
But I cheated   ;D

Offline anika200

  • WikiUser
  • *
  • Posts: 2
Re: OLPC XO
« Reply #28 on: May 20, 2010, 06:04:24 AM »
Trying out the 02 build and have run into several problems.  A little back ground, the usb stick was created in Fedora12 and I am no linux expert but I know enough to get by.  Now the problems in order of appearance.

My wireless network could not be found even though I had the proper name in bootlocal.sh.  I am using an Apple airport extreme.  I solved this by adding "any" as the essid.

Next I get the Xauth: time out in locking authority file /home/tc/.Xauthority error.  Long story, turns out the whole /home dir was owned by "500" with group "500"?  Solved this (i quess) by chown -R tc:staff ~

Now on the next boot wireless is working ( i can ping google) and permissions seem fine.  I get to a screen that is suposed to set up xvesa? maybe.  It never accepts any input besides (q) for quit.  I am now at a command prompt.
This is all the further I ever get with this build.  I try startx and get an error 42.273418 hsetroot[1269]: segfault at 88 ip 08049cb4 sp bf9e12a0 error 4 in hsetroot.

I am running of a usb stick formated in ext2.  Hmmm,  what to try next.

Offline lucky13

  • Jr. Member
  • **
  • Posts: 76
    • my mostly linux-related blog
Re: OLPC XO
« Reply #29 on: May 20, 2010, 06:47:15 AM »
Trying out the 02 build and have run into several problems.  A little back ground, the usb stick was created in Fedora12 and I am no linux expert but I know enough to get by.  Now the problems in order of appearance.

My wireless network could not be found even though I had the proper name in bootlocal.sh.  I am using an Apple airport extreme.  I solved this by adding "any" as the essid.

Do you really consider that a solution since "any" means it will associate with the first/strongest SSID it can pick up? It's fine as long as you're sure you're connecting, and staying connected, to your own router. There are other ways to associate if your SSID name isn't working for some reason (you could elaborate on what you've named it, if you have spaces and didn't put the name in quotation marks, etc.). Also, using "any" basically precludes use of encryption like WEP (weak) or WPA (stronger, particularly is you use a strong passphrase). That's not "getting by," it's dangerous because it means all your data, cookies, etc., not sent to SSL/TSL-secured pages are in plain text.

Quote
Next I get the Xauth: time out in locking authority file /home/tc/.Xauthority error.  Long story, turns out the whole /home dir was owned by "500" with group "500"?  Solved this (i quess) by chown -R tc:staff ~

Default user numeric ownership in RHEL, Fedora, etc., typically starts at 500.500. If you do ls -aln ~/ in tinycore you'll see why there's a "problem" when mixing disparate permissions based on different distros' defaults; tc is 1000.1000 (or 1001.1001? I don't remember off-hand but I know Debian's starts at 1000.1000).  This can be changed on either side for the sake of consistency to reduce future issues if you're going to continue to use Fedora and TinyCore and if you're going to share data between them (such as using the same /home partition). When/if you do this, make sure you're not duplicating a number already in use on whichever you change.

Quote
Now on the next boot wireless is working ( i can ping google) and permissions seem fine.  I get to a screen that is suposed to set up xvesa? maybe.  It never accepts any input besides (q) for quit.  I am now at a command prompt.
This is all the further I ever get with this build.  I try startx and get an error 42.273418 hsetroot[1269]: segfault at 88 ip 08049cb4 sp bf9e12a0 error 4 in hsetroot.

I am running of a usb stick formated in ext2.  Hmmm,  what to try next.

Did you try setting your video as a bootcode?
« Last Edit: May 20, 2010, 06:52:44 AM by lucky13 »