OESF Portables Forum

Everything Else => Zaurus Distro Support and Discussion => Distros, Development, and Model Specific Forums => Archived Forums => Ubuntu => Topic started by: craigtyson on June 04, 2009, 01:43:29 pm

Title: Post Install Tweeks
Post by: craigtyson on June 04, 2009, 01:43:29 pm
Having installed ZUBUNTU for the first time, here are some bits that people might find of use

after loging in the first time run

ts_calibrate

to calibrate your touch screen

run killall tskeys

to get some free memory

ensure dhcp is running properly by changing the 102 and 103 entries for dhcp in /etc/passwd to 0

get your wifi / network running by looking on the forums

once you have internet connectivity, install synaptic so you can find packages with

apt-get install synaptic

now you're ready to rock
Title: Post Install Tweeks
Post by: RX Shorty on June 19, 2009, 09:45:44 pm
Nice
Thanks, I am going to try Zubuntu tonight.
Title: Post Install Tweeks
Post by: ptoki on July 09, 2009, 01:58:31 pm
at my c1000 its not nessesary to kill tskeys
its sufficient to edit /etc/zaurusd/mach-config-vars and put TSKEYS_DEVICE=/dev/input/event2 instead default value

another must do thing is:
alsamixer:
set headphone, pcm, speaker  to the top
unmute all left mixers (four of them) and right mixer (leave other right mixers muted)
finally enable speaker function (third control from end)

This gives clear sound through speaker and working headphones in stereo.

bass, treble, 3d set as you like. Play a bit with all of this deemphasis and filter thing if you have audiohile ear.

if your usb device does not work try dmesg and look if there is something like this:
usb 1-2: new full speed USB device using pxa27x-ohci and address 6
usb 1-2: rejected 1 configuration due to insufficient available bus power
usb 1-2: no configuration chosen from 1 choice

if you encounter problems with usb power then here is solution: https://www.oesf.org/forum/index.php?showto...mp;hl=usb+power (https://www.oesf.org/forum/index.php?showtopic=20739&hl=usb+power)

tweak a bit zaurus leds:
echo mmc0 > /sys/class/leds/spitz\:green\:mail/trigger
echo ide-disk > /sys/class/leds/spitz\:amber\:charge/trigger

if you like put it in /etc/init.d/zaurusd right after echo "starting zaurusd"
this gives you blinking leds while accessing cards.

Make some swap, 64MB is quite enough for pda use, if you intend to use zaurus with zubuntu as a little laptop it may be neccessary to put some more swap.

install lynx, dillo, mpg321 (uses a lot less cpu), fbreader, consider installing mpd

after that zubuntu is very fine. I would even say it may be a new cacko.

Great job for its creators and maintainers! I dont miss cacko

In case you encounter "Unresolved Inheritance Operation" do as https://www.oesf.org/forum/index.php?showtopic=26703 (https://www.oesf.org/forum/index.php?showtopic=26703) thread says.
xfig, xpat2, xmpuzles are affected.
Title: Post Install Tweeks
Post by: brontoZaurus on July 23, 2009, 07:35:40 am
Quote from: craigtyson
Having installed ZUBUNTU for the first time, here are some bits that people might find of use

after loging in the first time run

ts_calibrate

to calibrate your touch screen

run killall tskeys

to get some free memory

ensure dhcp is running properly by changing the 102 and 103 entries for dhcp in /etc/passwd to 0

get your wifi / network running by looking on the forums

once you have internet connectivity, install synaptic so you can find packages with

apt-get install synaptic

now you're ready to rock
i cant run synaptic in Zubuntu 8.04, it installs but when i click it in the menu, nothing happens...
someone who can throw some light...
Title: Post Install Tweeks
Post by: craigtyson on July 24, 2009, 10:44:32 am
Quote from: brontoZaurus
Quote from: craigtyson
Having installed ZUBUNTU for the first time, here are some bits that people might find of use

after loging in the first time run

ts_calibrate

to calibrate your touch screen

run killall tskeys

to get some free memory

ensure dhcp is running properly by changing the 102 and 103 entries for dhcp in /etc/passwd to 0

get your wifi / network running by looking on the forums

once you have internet connectivity, install synaptic so you can find packages with

apt-get install synaptic

now you're ready to rock
i cant run synaptic in Zubuntu 8.04, it installs but when i click it in the menu, nothing happens...
someone who can throw some light...

What do you get from a command line when you type in synaptic?

C
Title: Post Install Tweeks
Post by: brontoZaurus on July 27, 2009, 03:49:50 am
oh!
yes from shell it works, but from the menu icon doesn´t.
thanks anyway!!!  
Title: Post Install Tweeks
Post by: craigtyson on July 27, 2009, 06:47:44 am
Quote from: brontoZaurus
oh!
yes from shell it works, but from the menu icon doesn´t.
thanks anyway!!!  

Some apps seem to run gksudo {command} in their menu entry

I know WIFI Radar does

Try editing synaptic.desktop and take out the gksudo

C
Title: Post Install Tweeks
Post by: brontoZaurus on July 27, 2009, 08:02:57 am
ok but where is located that file¿?
thanks in advance.

Edited:

/usr/share/applications/synaptic.desktop

Ok no problem located and removed de "gksu" word and all is ok now.
thanks man!
Title: Post Install Tweeks
Post by: ptoki on July 30, 2009, 12:00:10 pm
Another chunk of post install tweaks.

Put
Code: [Select]
#middle mouse click
"xte 'mouseclick 2'"
    Shift + b:1
in /root/.xbindkeysrc to have middle click with shift key (right click with Control is already there). Finally it is possible to use xfig  without mouse.

put
Code: [Select]
xhost + in .xinitrc to have screen flipping working (xrandr from zaurus-hinge script cant connect to X and thus not working).

Edit /etc/zaurusd/zaurus-hinge and put there display-brightness.sh off just after #echo "sleeping"
and display-brightness.sh on after #echo "lanscape".
Change /bin/display-brightness.sh script

put
Code: [Select]
elif [ "$1" = "off" ]; then
    if [ $BRIGHTNESS -ne 0 ];then
    echo "$BRIGHTNESS" >/tmp/backlight
    echo 0 > $BRIGHTNESS_FILE
    fi
elif [ "$1" = "on" ]; then
    cat /tmp/backlight > $BRIGHTNESS_FILE
    rm /tmp/backlight
just after "fi" in "down" section.

This will give you turned off screen when lid is closed (but screen will be lit while in portrait mode)

change
Code: [Select]
STEP=5
MAX_BRIGHTNESS=47
MIN_BRIGHTNESS=0
in this script according to /sys/class/backlight/$DRIVER/max_brightness
or just uncomment
Code: [Select]
#MAX_BRIGHTNESS=`cat /sys/class/backlight/$DRIVER/max_brightness` line (I suppose someone put there a artificial limit to save batteries  or it is a legacy from other zaurus model) In c1000 max is 47.

put
Code: [Select]
/root/repeatoff in /root/.xinitrc and put there a repeat-rate-workaround:
Code: [Select]
#!/bin/sh
xset r on
for k in 10 11 12 13 14 15 16 17 18 19 24 25 26 27 28 29 30 31 32 33 38 39 40 41 42 43 44 45 46 52 53 54 55 56 57 58 20 59 60 70
do
xset -r "$k"
done
It is a bit modified version of solution provided by gojira here https://www.oesf.org/forum/index.php?showtopic=25165 (https://www.oesf.org/forum/index.php?showtopic=25165). I added escape key to non repeated keys (useful in mc)

All files modified are attached.

Edit: did minor changes, attachments updated.
Title: Post Install Tweeks
Post by: ptoki on August 06, 2009, 01:30:11 am
To make irda work:
Ensure that modules irda, ircomm_tty, ircomm, pxaficp_ir are loaded.
install irda-utils (so irattach is available)
cat /proc/net/irda/discovery will tell you if any device is found by irda.
irattach irda0 -s will make irda working.

Then:
irxfer or ircp -r will make beaming to zaurus working
To beam files from zaurus use irobex_palm3 ircp doezt work with for example nokia e61.
Title: Post Install Tweeks
Post by: ptoki on September 11, 2009, 04:18:06 am
Another batch of tweaks:

Do not use LXDE, it has a bug (not sure which component) causing high cpu usage after resume (probably something with changing date/time too rapidly) and it doesnt have fill-all-space behaviour.

Install aosd_cat as osd functionality.
in .xbindkeysrc put similar configuration to display-backlight for volume controls (amixer sput PCM ...)
and for checking battery.
Add some osd to those scripts to have nice OSD while changing volume, brightness and similar. It is independent from WM-s.
Aosd_cat is very early version but it works quite nicely (lacks bar and multi line functionality)
Title: Post Install Tweeks
Post by: craigtyson on September 11, 2009, 05:56:20 am
Quote from: ptoki
Another batch of tweaks:

Do not use LXDE, it has a bug (not sure which component) causing high cpu usage after resume (probably something with changing date/time too rapidly) and it doesnt have fill-all-space behaviour.

Install aosd_cat as osd functionality.
in .xbindkeysrc put similar configuration to display-backlight for volume controls (amixer sput PCM ...)
and for checking battery.
Add some osd to those scripts to have nice OSD while changing volume, brightness and similar. It is independent from WM-s.
Aosd_cat is very early version but it works quite nicely (lacks bar and multi line functionality)

In my experience changing the date once the gui is up causes MAXout of theCPU and eventual lockup.  The only way I've found round this is to set the date at first login at the command line.
Title: Post Install Tweeks
Post by: RGRICH on December 05, 2009, 02:35:34 pm
Quote from: ptoki
at my c1000 its not nessesary to kill tskeys
its sufficient to edit /etc/zaurusd/mach-config-vars and put TSKEYS_DEVICE=/dev/input/event2 instead default value

another must do thing is:
alsamixer:
set headphone, pcm, speaker  to the top
unmute all left mixers (four of them) and right mixer (leave other right mixers muted)
finally enable speaker function (third control from end)

This gives clear sound through speaker and working headphones in stereo.

bass, treble, 3d set as you like. Play a bit with all of this deemphasis and filter thing if you have audiohile ear.

if your usb device does not work try dmesg and look if there is something like this:
usb 1-2: new full speed USB device using pxa27x-ohci and address 6
usb 1-2: rejected 1 configuration due to insufficient available bus power
usb 1-2: no configuration chosen from 1 choice

if you encounter problems with usb power then here is solution: https://www.oesf.org/forum/index.php?showto...mp;hl=usb+power (https://www.oesf.org/forum/index.php?showtopic=20739&hl=usb+power)

tweak a bit zaurus leds:
echo mmc0 > /sys/class/leds/spitz\:green\:mail/trigger
echo ide-disk > /sys/class/leds/spitz\:amber\:charge/trigger

if you like put it in /etc/init.d/zaurusd right after echo "starting zaurusd"
this gives you blinking leds while accessing cards.

Make some swap, 64MB is quite enough for pda use, if you intend to use zaurus with zubuntu as a little laptop it may be neccessary to put some more swap.

install lynx, dillo, mpg321 (uses a lot less cpu), fbreader, consider installing mpd

after that zubuntu is very fine. I would even say it may be a new cacko.

Great job for its creators and maintainers! I dont miss cacko

In case you encounter "Unresolved Inheritance Operation" do as https://www.oesf.org/forum/index.php?showtopic=26703 (https://www.oesf.org/forum/index.php?showtopic=26703) thread says.
xfig, xpat2, xmpuzles are affected.
I'm having the power problem with a usb ethernet dongle. I tried the workaround describe here by setting the address in the bConfigurationValue but that did not seem to make any difference. Is there something else to try?
Title: Post Install Tweeks
Post by: ptoki on December 22, 2009, 05:08:13 am
Quote from: RGRICH
Quote from: ptoki
at my c1000 its not nessesary to kill tskeys

if your usb device does not work try dmesg and look if there is something like this:
usb 1-2: new full speed USB device using pxa27x-ohci and address 6
usb 1-2: rejected 1 configuration due to insufficient available bus power
usb 1-2: no configuration chosen from 1 choice

if you encounter problems with usb power then here is solution: https://www.oesf.org/forum/index.php?showto...mp;hl=usb+power (https://www.oesf.org/forum/index.php?showtopic=20739&hl=usb+power)
I'm having the power problem with a usb ethernet dongle. I tried the workaround describe here by setting the address in the bConfigurationValue but that did not seem to make any difference. Is there something else to try?
What dmesg says after setting this value?
are you sure that all needed modules are loaded?
You can try powered hub or make a hardware hack (changing pullup resistor in zaurus - quite difficult for amateur).
Or buying another ethernet dongle.
Title: Post Install Tweeks
Post by: ptoki on February 15, 2010, 05:43:35 am
Next thing to do is to make dual boot with cacko.
Zubuntu does not handle hardware acceleration for video (or I cant do it properly).
Cacko is fine for old software, video, some games. Iqnotes are missing for zubuntu.

To have dual boot working do:
Use other linux box to do this:
Copy all files from SD-card to somewhere else. Use mc and do not copy /media or /mnt (there are some links and that can make troubles  )

Make backup: dd if=/dev/mmcblk of=/tmp/backup.card bs=1M

Then make cfdisk and partition card to two or more partitions.
One for cacko kernel (small 10-16mb is enough) and one for zubuntu (rest of sd-card).
Make ext2 on both partitions (mkfs.ext2).
Put boot dir on both partitions (mkdir boot).

On small partition put kernel image, command-line and description.
On big partition put files copied from sd-card at the beginning.

And voila. My c1000 boots to zubuntu or to cacko.
Some helpful threads (source of whole knowledge about this):
https://www.oesf.org/forum/index.php?showtopic=26640 (https://www.oesf.org/forum/index.php?showtopic=26640)
https://www.oesf.org/forum/index.php?showtopic=26548 (https://www.oesf.org/forum/index.php?showtopic=26548)


One more thing:
Cacko does not like my sd-card which doesnt have a partition. I tried to make dual booting on two cards(to avoid copying files back and forth) but cacko kernel was filling dmesg log with messages about "unreadable something" (I dont remember exactly). After making partition all is fine.
But anyway I found new target for my mobile life: sharp netwalkre pc z1
Title: Post Install Tweeks
Post by: danboid on April 22, 2010, 06:28:44 pm
Quote from: ptoki
tweak a bit zaurus leds:
echo mmc0 > /sys/class/leds/spitz\:green\:mail/trigger
echo ide-disk > /sys/class/leds/spitz\:amber\:charge/trigger

if you like put it in /etc/init.d/zaurusd right after echo "starting zaurusd"
this gives you blinking leds while accessing cards.

This would seem to be wrong or at least outdated. If I add

Code: [Select]
echo "mmc0" > /sys/class/leds/spitz\:green\:hddacti/trigger
to zaurusd then the green led blinks whilst zubuntu boots then after its booted (ie after running the zaurusd daemon) the green LED only blinks when I access the SD card.

As far as I can tell you can only have one event / device (in this case mmc0 or ide-disk) assigned per LED trigger although under 2.4 based distros my green LED would flash when I accessed either the CF or SD interfaces.

Have I misunderstood or is there a workaround for this?
Title: Post Install Tweeks
Post by: ptoki on April 25, 2010, 03:15:51 pm
Quote from: danboid
Quote from: ptoki
tweak a bit zaurus leds:
echo mmc0 > /sys/class/leds/spitz\:green\:mail/trigger
echo ide-disk > /sys/class/leds/spitz\:amber\:charge/trigger

if you like put it in /etc/init.d/zaurusd right after echo "starting zaurusd"
this gives you blinking leds while accessing cards.

This would seem to be wrong or at least outdated. If I add

Code: [Select]
echo "mmc0" > /sys/class/leds/spitz\:green\:hddacti/trigger
to zaurusd then the green led blinks whilst zubuntu boots then after its booted (ie after running the zaurusd daemon) the green LED only blinks when I access the SD card.

As far as I can tell you can only have one event / device (in this case mmc0 or ide-disk) assigned per LED trigger although under 2.4 based distros my green LED would flash when I accessed either the CF or SD interfaces.

Have I misunderstood or is there a workaround for this?

Well, I have only c1000 device so I cant tell how other devices behave. I confirm that there is possible to have only one device triggering LED. At least I did not try to echo something else than one trigger name.
Your code is correct and works as should to.
In c1000 there are two leds. And in my case I have two leds for cf and sd card blinking separately.

Additionally I can tell that amber led (charge) is acting problematically. Sometimes it works and sometimes it does not blink even when I am reading files on cf card.
Title: Post Install Tweeks
Post by: danboid on April 26, 2010, 04:22:52 am
Quote from: ptoki
Quote from: danboid
Quote from: ptoki
tweak a bit zaurus leds:
echo mmc0 > /sys/class/leds/spitz\:green\:mail/trigger
echo ide-disk > /sys/class/leds/spitz\:amber\:charge/trigger

if you like put it in /etc/init.d/zaurusd right after echo "starting zaurusd"
this gives you blinking leds while accessing cards.

This would seem to be wrong or at least outdated. If I add

Code: [Select]
echo "mmc0" > /sys/class/leds/spitz\:green\:hddacti/trigger
to zaurusd then the green led blinks whilst zubuntu boots then after its booted (ie after running the zaurusd daemon) the green LED only blinks when I access the SD card.

As far as I can tell you can only have one event / device (in this case mmc0 or ide-disk) assigned per LED trigger although under 2.4 based distros my green LED would flash when I accessed either the CF or SD interfaces.

Have I misunderstood or is there a workaround for this?

Well, I have only c1000 device so I cant tell how other devices behave. I confirm that there is possible to have only one device triggering LED. At least I did not try to echo something else than one trigger name.
Your code is correct and works as should to.
In c1000 there are two leds. And in my case I have two leds for cf and sd card blinking separately.

Additionally I can tell that amber led (charge) is acting problematically. Sometimes it works and sometimes it does not blink even when I am reading files on cf card.

I knew that I could use the amber led to monitor SD activity if I wanted to but I'd rather leave that as a charge indicator.

I can only presume that the Zaurus LED triggering worked differently under 2.4 kernels and you could assign multiple devices to trigger the same LED?
Title: Post Install Tweeks
Post by: ptoki on April 26, 2010, 06:30:33 am
Quote from: danboid
Quote from: ptoki
Quote from: danboid
Quote from: ptoki
tweak a bit zaurus leds:
echo mmc0 > /sys/class/leds/spitz\:green\:mail/trigger
echo ide-disk > /sys/class/leds/spitz\:amber\:charge/trigger

if you like put it in /etc/init.d/zaurusd right after echo "starting zaurusd"
this gives you blinking leds while accessing cards.

This would seem to be wrong or at least outdated. If I add

Code: [Select]
echo "mmc0" > /sys/class/leds/spitz\:green\:hddacti/trigger
to zaurusd then the green led blinks whilst zubuntu boots then after its booted (ie after running the zaurusd daemon) the green LED only blinks when I access the SD card.

As far as I can tell you can only have one event / device (in this case mmc0 or ide-disk) assigned per LED trigger although under 2.4 based distros my green LED would flash when I accessed either the CF or SD interfaces.

Have I misunderstood or is there a workaround for this?

Well, I have only c1000 device so I cant tell how other devices behave. I confirm that there is possible to have only one device triggering LED. At least I did not try to echo something else than one trigger name.
Your code is correct and works as should to.
In c1000 there are two leds. And in my case I have two leds for cf and sd card blinking separately.

Additionally I can tell that amber led (charge) is acting problematically. Sometimes it works and sometimes it does not blink even when I am reading files on cf card.

I knew that I could use the amber led to monitor SD activity if I wanted to but I'd rather leave that as a charge indicator.

I can only presume that the Zaurus LED triggering worked differently under 2.4 kernels and you could assign multiple devices to trigger the same LED?
I have no idea. I think (but dont have any hard base on it) that in 2.4 kernel green led was used by some sort proprietary code to show any activity.

But just got an idea.
Try to look in /proc and /sys and search for interrupts information. I took numbers from /proc/interrupts or similar.
I did screensaver replacement for zubuntu on c1000 by looking number of interrupts generated by keyboard to put zaurus to sleep after some time without keypress (and touch screen taps) but only when mpd is stopped/paused.

I grepped file with interrups cuted number of them and compared with the same file after some sleep.

You can do the same to the led. Just grep interrupts or counters for cf, sd, network, put those in variable and sleep 1 sec.
If numbers change do a blink led.
It will be much less responsive but will act as you expect.

I will try to post my sleep script in a few days (im away from zaurus).
Title: Post Install Tweeks
Post by: danboid on April 29, 2010, 11:58:14 am
Hi ptoki!

I'm not quite sure what you mean so it'd be great if you could post your sleep script and explain how it could be modified to work with the LEDs

Thanks!
Title: Post Install Tweeks
Post by: ptoki on May 01, 2010, 05:14:39 am
Here is my script:
[div class=\'codetop\']CODE[/div][div class=\'codemain\' style=\'height:200px;white-space:pre;overflow:auto\']#!/bin/sh
ONE=$(grep Spitzkbd /proc/interrupts|md5sum)
while true
do
    sleep 240
    PLAYING=$(mpc|grep "play"|wc -l)
    if [ "$PLAYING" = 0 ]; then
   TWO=$(grep "Spitzkbd\|ts" /proc/interrupts|md5sum)
   #echo $ONE $TWO
   if [ "$ONE" = "$TWO" ]; then
       apm -s
        fi
    fi
ONE=$TWO
done[/div]

File with interrupts (/proc/interrupts) looks like this:
[div class=\'codetop\']CODE[/div][div class=\'codemain\' style=\'height:200px;white-space:pre;overflow:auto\']           CPU0
  3:       1240          SC  ohci_hcd:usb1
  6:         12          SC  pxa_i2c-i2c.1
 11:          0          SC  pxa27x_udc
 16:          0          SC  SSP
 17:         34          SC  LCD
 18:       2214          SC  pxa_i2c-i2c.0
 23:     158689          SC  pxa2xx-mci
 25:      17071          SC  DMA
 26:     295976          SC  ost0
 73:          0        GPIO  MMC card detect
 75:         40        GPIO  ts
 76:         87        GPIO  Spitzkbd Sense
 77:          0        GPIO  Spitzkbd HP Type, sharpsl_rc
 80:          0        GPIO  Spitzkbd Sync
 81:         77        GPIO  Spitzkbd Sense
 85:          0        GPIO  Fatal Battery
 98:         56        GPIO  Spitzkbd Sense
100:         79        GPIO  Spitzkbd Sense
102:        158        GPIO  Spitzkbd Sense
103:        763        GPIO  Spitzkbd Sense
154:          0        GPIO  Battery Cover
155:         82        GPIO  Spitzkbd Sense
158:          0        GPIO  PCMCIA0 CD
159:         30        GPIO  Spitzkbd PwrOn
160:         23        GPIO  Spitzkbd SWB
161:          4        GPIO  Spitzkbd SWA
165:          0        GPIO  CO
169:      10693        GPIO  ide0
179:          0        GPIO  AC Input Detect
180:          0        GPIO  Spitzkbd HP
Err:          0
[/div]
I think ide0 contains number of interrupts for cf card and pxa2xx-mci contains number of interrupts for sd card.

If you want to check activity of network card just check output of ifconfig and look for eth0, ppp0 wifi activity represented by number of bytes,sent/received.

In my case it was not important how much keys was pressed i just needed to know if anything happened so i used md5sum to check that.

There is a lot of ways to achieve result which You need, just peek in /proc or /sys and with simple script monitor what is happening in those files while You are doodling with zaurus and then write script to use that information and react.
You can use beeping instead led flash. Or you can try aosd_cat as a OSD visualizer.


I have written a small utility to show vital signs of my zaurus. I connected it to a keypress using .xbindkeysrc:
Look at "#show" battery section. When you press FN and 0 (zero) then /bin/batt script is executed.
Also Fn+9 is mpd toggle and fn+8 and Fn+7 is next and prev song

[div class=\'codetop\']CODE[/div][div class=\'codemain\' style=\'height:200px;white-space:pre;overflow:auto\']###########################
# xbindkeys configuration #
###########################
#
# Version: 0.1.3
#
# If you edit this, do not forget to uncomment any lines that you change.
# The pound(#) symbol may be used anywhere for comments.
#
# A list of keys is in /usr/include/X11/keysym.h and in
# /usr/include/X11/keysymdef.h
# The XK_ is not needed.
#
# List of modifier (on my keyboard):
#   Control, Shift, Mod1 (Alt), Mod2 (NumLock),
#   Mod3 (CapsLock), Mod4, Mod5 (Scroll).
#
# Another way to specifie a key is to use 'xev' and set the
# keycode with c:nnn or the modifier with m:nnn where nnn is
# the keycode or the state returned by xev
#
# This file is created by xbindkey_config
# The structure is :
# # Remark
# "command"
# m:xxx + c:xxx
# Shift+...




#keystate_numlock = enable
#keystate_scrolllock = enable
#keystate_capslock = enable



#Brigtness Down
"display-brightness.sh down"
    m:0x40 + c:12
    Mod4 + 3

#Brightness Up
"display-brightness.sh up"
    m:0x40 + c:13
    Mod4 + 4

#Volume Down
"pcm down"
    m:0x40 + c:10
    Mod4 + 1
"pcm down"
    F19
   
#Volume Up
"pcm up"
    m:0x40 + c:11
    Mod4 + 2
"pcm up"
    F20
     
#show battery
"/bin/batt osd"
    m:0x40 + c:19
    Mod4 + 0

#toggle mpd
"mpc toggle"
    m:0x40 + c:18
    Mod4 + 9
"mpc toggle"
    F18
   
#prev mpd
"mpc prev"
    m:0x40 + c:16
    Mod4 + 7

#next mpd
"mpc next"
    m:0x40 + c:17
    Mod4 + 8


#Right Mouse Click
"xte 'mouseclick 3'"
   Control + b:1   (mouse)

#middle mouse click
"xte 'mouseclick 2'"
   Shift + b:1

#rotate
"/bin/rot"
   F10

"xte 'key Delete'"
    Mod4 + c:22
    #

#f1
#"xte 'key f1'"
#   Mod4 + 1

#rotate screen
"/bin/rot"
    m:0x40 + c:15

#fake alt-tab
"xte 'keydown Alt_L' 'key Tab' 'keyup Alt_L'"
    c:67
"xte 'keydown Alt_L' 'key Tab' 'keyup Alt_L'"
    F17
   
#fake alt-f4
"xte 'keydown Alt_L' 'key F4' 'keyup Alt_L'"
    c:96
   
#show desktop
"xte 'keydown Alt_L' 'key l' 'keyup Alt_L'"
    c:107
   
#
# End of xbindkeys configuration[/div]

It is helpful to use xev to check which codes are generated by X while pressing keyboard keys.

Here is a batt script:
It shows some nice information about Z

[div class=\'codetop\']CODE[/div][div class=\'codemain\' style=\'height:200px;white-space:pre;overflow:auto\']#!/bin/sh

a=$(cat /sys/devices/platform/sharpsl-pm/battery_percentage)
f=$( free|grep Mem|awk '{ print $1 int($4/1024) }'|tail -n 3|tr "\n" " ")
l=$(top -b -n 1|grep "load average"|cut -d "," -f 3-6|cut -d ":" -f 2)
d=$(date)
s=$(amixer sget PCM|grep "\["|cut -d " " -f 4,6)


TEKST=$(echo -e "PCM\n$s\n$d\nbatt:$a \n$f \nload:$l")

echo -e "batt:$a $f load:$l"
if [ "$1" =  "osd" ]; then
aosd_cat -d 5000 -e 0 -F "Trebuchet 30" -s 3 -S 100 -r 1 -g 1 -b 0 -x 30 -y 30 -t "$TEKST"
fi
[/div]
And one more:
[div class=\'codetop\']CODE[/div][div class=\'codemain\' style=\'height:200px;white-space:pre;overflow:auto\']pcm script (used to change volume)

#!/bin/sh


STEP=3

if [ ! -n "$1" ]; then
    echo "max / current"
    amixer sget PCM
elif [ "$1" = "up" ]; then
    amixer sset PCM $STEP"%+"
elif [ "$1" = "down" ]; then
    amixer sset PCM $STEP"%-"
else
    echo -e "\nUsage:\n\t `basename $0` [up | down]\n"
fi[/div]

And if I remember correctly I have changed slightly standard zubuntu script to change display brightness.

[div class=\'codetop\']CODE[/div][div class=\'codemain\' style=\'height:200px;white-space:pre;overflow:auto\']#!/bin/sh

# display-brightness.sh
# simple script to set display-brightness for zaurus clamshell
# author: patrick steiner <[EMAIL PROTECTED]>
# modified by: Ian Munsie <[EMAIL PROTECTED]>
# modified by: Paul M "speculatrix" - for Spitz/Zubuntu
# version: 1.02 | 15/12/2008 21:48 GMT

STEP=5
MAX_BRIGHTNESS=47
MIN_BRIGHTNESS=0

DRIVER="`ls /sys/class/backlight/|head -n 1`"
BRIGHTNESS_FILE="/sys/class/backlight/$DRIVER/brightness"
BRIGHTNESS=`cat /sys/class/backlight/$DRIVER/actual_brightness`
# this gives bad number - 15 is max, 16 is off!
#MAX_BRIGHTNESS=`cat /sys/class/backlight/$DRIVER/max_brightness`

POWER_FILE="/sys/class/backlight/$DRIVER/bl_power"
POWER_ON=0
#POWER_OFF=1


if [ ! -n "$1" ]; then
    echo "max / current"
    echo "$MAX_BRIGHTNESS / $BRIGHTNESS"
elif [ "$1" = "up" ]; then
    test -x /usr/bin/bl && bl on
    echo $POWER_ON >> $POWER_FILE
    if [ $BRIGHTNESS -lt $MAX_BRIGHTNESS ]; then
        let BRIGHTNESS=$BRIGHTNESS+$STEP
        if [ $BRIGHTNESS -ge $MAX_BRIGHTNESS ]; then
            let BRIGHTNESS=$MAX_BRIGHTNESS
        fi
        echo $BRIGHTNESS >> $BRIGHTNESS_FILE
    fi
elif [ "$1" = "down" ]; then
    test -x /usr/bin/bl && bl on
    echo $POWER_ON >> $POWER_FILE
    if [ $BRIGHTNESS -gt $MIN_BRIGHTNESS ]; then
        let BRIGHTNESS=$BRIGHTNESS-$STEP
        if [ $BRIGHTNESS -le $MIN_BRIGHTNESS ]; then
            let BRIGHTNESS=$MIN_BRIGHTNESS
        fi
        echo $BRIGHTNESS >> $BRIGHTNESS_FILE
    fi
elif [ "$1" = "off" ]; then
    if [ $BRIGHTNESS -ne 0 ];then
   echo "$BRIGHTNESS" >/tmp/backlight
   echo 0 > $BRIGHTNESS_FILE
    fi
elif [ "$1" = "on" ]; then
    cat /tmp/backlight > $BRIGHTNESS_FILE
    rm /tmp/backlight
else
    echo -e "\nUsage:\n\t `basename $0` [up | down]\n"
fi
[/div]

Combined together with .xbindkeyrc, those give quite nice result in usability of the zaurus. Dont forget ro run xbindkeys in your ./homedir/.xinitrc. the saver script is also executed there with background option (& ampersand at the end of a command)
BTW I use matchbox WM so there is not much to put in panel to monitor OS condition thats why i have those scripts.
Aosd_cat is quite slow to start but I use it rarely so it is not a problem.