General TC > Tiny Core Netbooks

OLPC XO

<< < (5/7) > >>

Lerc:

--- Quote from: jls_legalize on March 27, 2010, 01:32:23 PM ---calculator doesn't work: click 1+1= and it reports 0

--- End quote ---
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

--- End quote ---
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.

Lerc:

--- Quote from: mavrothal on March 27, 2010, 08: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.

--- End quote ---
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

--- End quote ---
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?

--- End quote ---
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.

mavrothal:
This is driving me crazy...
After the first succeful launch of the battery monitor and reboot quite often I get

--- Code: ---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
--- End code ---
Any idea???

Lerc:

--- Quote from: mavrothal on March 28, 2010, 05:23:04 PM ---This is driving me crazy...
After the first succeful launch of the battery monitor and reboot quite often I get

--- Code: ---Launch/battery
X Error of failed request:  BadAtom (invalid Atom parameter)
--- End code ---
Any idea???

--- End quote ---

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.


 

mavrothal:

--- Quote from: Lerc on March 28, 2010, 09:57:36 PM ---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. 

--- End quote ---

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.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version