Help - Search - Members - Calendar
Full Version: Rc8 - Personal Updates
OESF Forums > Distros, Development, and Model Specific Forums > Distro Support and Discussion > pdaXrom
Bundabrg
Ok, every version of a rom I put on I tend to put in changes that I feel make things slightly more comfortable for me. In case anyone else would find them useful I will be putting them into ipks and putting them in my cookpot feed directory.

The feed URL is: http://dev.worldguard.com.au/projects/zaur...rom/rc8/cookpot

Currently I have the following there:

apmwrapper - Creates directories suspend.d, resume.d and scripts.d under /etc/apm. Then wraps apm so that files in suspend.d and resume.d are executed when the device enters each state. Detects if apm is already wrapped (as it is under rc8) and backs up the original wrapper. Will also work with an unwrapped apm.

chkhinge-scripts - Creates directories closed.d, landscape.d, portrait.d and scripts.d under /etc/sysconfig/clamshell. Then backs up the existing shell scripts in that dir, links them into the new directory structure and creates new shell scripts to call the files in each dir when the device changes into closed, lanscape or portrait. I got the idea from the pdaxrom bugs page.

hotfix-pdaxrom - My personal fixes to problems as I see them. Currently creates a cron.hourly job that sets the "hardware" clock to minimize timeloss on a crash; adds scripts to /etc/apm directories to unmount all smbfs mounts before a suspend and to set the "hardware" clock on both suspend and resume to minimize time loss on crash

All of the above should install and uninstall cleanly.

- Bundabrg
Bundabrg
Updated the following: -

hotfix-pdaxrom
  • Creates a cron.hourly job that sets the "hardware" clock to minimize timeloss on a crash
  • Adds scripts to /etc/apm directories to unmount all smbfs mounts before a suspend and to set the "hardware" clock on both suspend and resume to minimize time loss on crash
  • (NEW) Wraps xrandr so that when full resolution is selected (IE: xrandr -s 0) and matchbox-panel is running, it will restart matchbox-panel. This restores the applets that were killed due to lack of screen space.
  • (NEW) Patches /etc/profile PS1 to display in colour
  • (NEW) Adds .Xdefaults to root as posted by jerrybme
- Bundabrg
Vanguard
Those sound useful!

A couple questions, since my linux skills are still a bit lacking:

What happens if there's no network connection when the scripts try to set the clock?

You mention that apm is already wrapped (I take it this means that there's a script called apm that runs some commands, and then runs apm)...after installing your stuff, do the things in the previous wrapper still work?

What happens if you don't unmount smbfs shares before you suspend?

What's PS1? (I'm guessing it's the console that comes up when you first start the rom, before you get into x)

What does .Xdefaults do?


Thanks for your patience!
jerrybme
One minor point about .Xdefaults- To get some of the settings for aterm to work, you must remove the arguements in the /usr/share/applications/aterm.desktop that set geometery and fonts etc otherwise they will over-ride the .Xdefault settings.

Nice work Bundabrg

Cheers,
Jerry
Bundabrg
Hi All

Vanguard
QUOTE
What happens if there's no network connection when the scripts try to set the clock?


My scripts just call "sltime -set". Nothing at all to do with network time. This just stores the current date/time to the so-called "hardware" clock. These devices have no real hardware clock so when the device reboots the time is set to 1/1/1970. What happens in pdaXrom is that on bootup on of the startup scripts calls "sltime" with no parameters, thus restoring the time last set with a previous "sltime -set". Therefore I like to have it set fairly often and my scripts sets it hourly and before/after suspend/resume. This means timeloss due to a crash (which incidently does not happen much under rc8) is minimal.
I also have a script that calls ntpdate as in rc5, which works fine if there is no net connection, however I did not include that as I feel the ntpd package will probably do a better job.

QUOTE
You mention that apm is already wrapped (I take it this means that there's a script called apm that runs some commands, and then runs apm)...after installing your stuff, do the things in the previous wrapper still work?


pdaXrom renames the real apm to apm.x, and has a script that calls cardctl eject and insert before and after a suspend. My package just changes this so the wrapper will run a directory of scripts on each state (one of which handles the insert/eject of the old wrapper). For a normal user there is no advantage to the different wrapper, however it makes adding new items to it MUCH easier and my hotfix package makes use of it. I'm a firm believer of using directories of scripts ala run-parts.

QUOTE
What happens if you don't unmount smbfs shares before you suspend?


Its a real annoyance, and its actually to do with the timeout of samba. Unmounting just seems to help minimize the problem coming up. Say for instance you mount //server/work onto /mnt/work. If you lose network connectivity, like suspending, that mount remains. If you try to access the directory, the program accessing (say rox filer or a terminal) will hang whilst the smbfs tries to reconnect. However sometimes even though you resumed and are back on the network and it should be able to find the server, it gets stuck for AGES. And you can't even unmount it when its stuck since the now stuck application is locking the mount.

QUOTE
What's PS1? (I'm guessing it's the console that comes up when you first start the rom, before you get into x)


PS1 is an environtment variable that the shell uses as its primary promt. Normal pdaxrom jusr shows a #. I like to show the current directory, name of host, and have it in colour. Open aterm after applying the hotfix and see the difference.

QUOTE
What does .Xdefaults do?


This file contains "variables" that varous X programs use to configure themselves. In this case it sets some defaults for how aterm dispays itself.

jerrybme
QUOTE
One minor point about .Xdefaults- To get some of the settings for aterm to work, you must remove the arguements in the /usr/share/applications/aterm.desktop that set geometery and fonts etc otherwise they will over-ride the .Xdefault settings.


Good point. I'll update the hotfix to backup and replace this file.

- Bundabrg
Bundabrg
jerrybme
I had a look at the ATerm apprun and /usr/share/applications dir and, on my C860 anyway with a lanscape setting when using the keyboard, aterm looks better with 80x25 and a font of -misc-fixed-medium-r-normal--14-*. So I've modified the Xdefaults to use this setting (just in case) and left the launchers untouched. I'm assuming you are using a 6000 (or equiv) that is portrait when using keyboard? How do the two settings compare to you? Is it worth having the hotfix determine TYPE of pda and patch .Xdefaults accordingly?

Updates today:

hotfix-pdaxrom - 1.0.5
  • Creates a cron.hourly job that sets the "hardware" clock to minimize timeloss on a crash
  • Adds scripts to /etc/apm directories to unmount all smbfs mounts before a suspend and to set the "hardware" clock on both suspend and resume to minimize time loss on crash
  • Wraps xrandr so that when full resolution is selected (IE: xrandr -s 0) and matchbox-panel is running, it will restart matchbox-panel. This restores the applets that were killed due to lack of screen space.
  • Patches /etc/profile PS1 to display in colour
  • (MODIFIED) Adds .Xdefaults to root as posted by jerrybme
  • (NEW) Modify esd.conf to terminate and wait longer to start (rgrep)


- Bundabrg
Vanguard
Thanks for the detailed, yet understandable descriptions of what these things do!
jerrybme
Bundabrg:
No, I'm using a cl750, see my signature wink.gif , It's a matter of preference and which font you choose. That's the beauty of linux - freedom of choice. I suggest you set it to what works best for you and others can tweak to fit their needs and/or hardware.

Also, a note for others that may use other window managers, wrapping xrandr can muck up other scripts they may use or wrote. I prefer fvwm because of it's flexibility (and it's what I use on my desktop) so I had to edit scripts that call xrandr to call xrandr.x.

Cheers,
Jerry
Bundabrg
jerrybme
QUOTE
Also, a note for others that may use other window managers, wrapping xrandr can muck up other scripts they may use or wrote. I prefer fvwm because of it's flexibility (and it's what I use on my desktop) so I had to edit scripts that call xrandr to call xrandr.x.


What actually goes wrong? The wrapper should only restart matchbox-panel iff (if and only if) it is already running, otherwise it quits after running the original.
cs_jacky
Hi Bundabrg,

Do I need to install cron job ipk to run the hourly cron jobs in your ipk? Thanks.

Jacky
jerrybme
QUOTE(Bundabrg @ Jan 2 2005, 07:26 PM)
What actually goes wrong? The wrapper should only restart matchbox-panel iff (if and only if) it is already running, otherwise it quits after running the original.

Running fvwm and executing my mplayer script:
CODE
#!/bin/bash
xrandr -s 1
sleep 1
mplayer  -fstype fullscreen -fs -ac mad  -really-quiet $1
sleep 1
xrandr -s 0
sleep


I get the following error:
CODE
X  Error of failed request: BadImplementation (server does not implement operation)
Major opcode of failed request: 141 (RANDR)
Minor opcode of failed request: 5 (RRGetScreenInfo)
Serial number of failed request: 8
Current serial number in output stream: 8

Then mplayer runs in fullscreen mode but at the regular resolution. Changing the script to call xrandr.x instead of xrandr it works fine

***Update***
Ok, now it's not doing it any longer huh.gif

I've rebooted and switched back and forth from matchbox to fvwm and back several times and can no longer produce the error!

I hadn't made any changes or installed anything since the last time I got the error, very strange.

Cheers,
Jerry
Bundabrg
QUOTE(cs_jacky @ Jan 3 2005, 02:36 PM)
Hi Bundabrg,

Do I need to install cron job ipk to run the hourly cron jobs in your ipk? Thanks.

Jacky

Correct me if I'm wrong but I think cron comes with rc8 standard. In fact I can't even find mention of cron in ipkg list. Under RC5 you would need hc-cron, but my packages are untested with rc5.

So the short answer is no, you don't need to install cron.
conundrum
I remember this being one of the few times I really liked the PS1 value, anyway it can be pulled out of the ipk, or is someone still running RC8...? smile.gif
Chero
QUOTE(conundrum @ Oct 4 2005, 03:44 PM)
I remember this being one of the few times I really liked the PS1 value, anyway it can be pulled out of the ipk, or is someone still running RC8...? smile.gif
*


You can probably find the ipk in ScotYellich's mirrored feeds.
conundrum
No go, thanks anyway Chero. smile.gif
pgas
Bundabrg is still here, and maybe you'll find the PS1 here:

http://www.oesf.org/forums/index.php?showtopic=15461

wink.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2014 Invision Power Services, Inc.