Author Topic: Rc8 - Personal Updates  (Read 6052 times)

Bundabrg

  • Full Member
  • ***
  • Posts: 183
    • View Profile
Rc8 - Personal Updates
« on: December 30, 2004, 03:58:24 am »
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
[img]http://www.worldguard.com.au/brendan-ambi.png\" border=\"0\" class=\"linked-sig-image\" /]

Bundabrg

  • Full Member
  • ***
  • Posts: 183
    • View Profile
Rc8 - Personal Updates
« Reply #1 on: December 30, 2004, 08:20:44 pm »
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
« Last Edit: December 30, 2004, 10:11:51 pm by Bundabrg »
[img]http://www.worldguard.com.au/brendan-ambi.png\" border=\"0\" class=\"linked-sig-image\" /]

Vanguard

  • Newbie
  • *
  • Posts: 32
    • View Profile
    • http://
Rc8 - Personal Updates
« Reply #2 on: December 31, 2004, 06:41:33 pm »
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

  • Hero Member
  • *****
  • Posts: 639
    • View Profile
    • http://
Rc8 - Personal Updates
« Reply #3 on: December 31, 2004, 07:54:16 pm »
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
SL-C3100
Angstrom-GPE
Lexar SD 1 GB
PQI 2GB CF
Ambicom WL1100 CF

Bundabrg

  • Full Member
  • ***
  • Posts: 183
    • View Profile
Rc8 - Personal Updates
« Reply #4 on: January 02, 2005, 02:49:53 am »
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
[img]http://www.worldguard.com.au/brendan-ambi.png\" border=\"0\" class=\"linked-sig-image\" /]

Bundabrg

  • Full Member
  • ***
  • Posts: 183
    • View Profile
Rc8 - Personal Updates
« Reply #5 on: January 02, 2005, 03:38:22 am »
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
[img]http://www.worldguard.com.au/brendan-ambi.png\" border=\"0\" class=\"linked-sig-image\" /]

Vanguard

  • Newbie
  • *
  • Posts: 32
    • View Profile
    • http://
Rc8 - Personal Updates
« Reply #6 on: January 02, 2005, 09:59:10 am »
Thanks for the detailed, yet understandable descriptions of what these things do!

jerrybme

  • Hero Member
  • *****
  • Posts: 639
    • View Profile
    • http://
Rc8 - Personal Updates
« Reply #7 on: January 02, 2005, 10:35:13 am »
Bundabrg:
No, I'm using a cl750, see my signature  , 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
SL-C3100
Angstrom-GPE
Lexar SD 1 GB
PQI 2GB CF
Ambicom WL1100 CF

Bundabrg

  • Full Member
  • ***
  • Posts: 183
    • View Profile
Rc8 - Personal Updates
« Reply #8 on: January 02, 2005, 08:26:36 pm »
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.
[img]http://www.worldguard.com.au/brendan-ambi.png\" border=\"0\" class=\"linked-sig-image\" /]

cs_jacky

  • Full Member
  • ***
  • Posts: 143
    • View Profile
    • http://
Rc8 - Personal Updates
« Reply #9 on: January 03, 2005, 09:36:27 am »
Hi Bundabrg,

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

Jacky

jerrybme

  • Hero Member
  • *****
  • Posts: 639
    • View Profile
    • http://
Rc8 - Personal Updates
« Reply #10 on: January 03, 2005, 12:25:10 pm »
Quote
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: [Select]
#!/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: [Select]
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  

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
« Last Edit: January 03, 2005, 01:45:11 pm by jerrybme »
SL-C3100
Angstrom-GPE
Lexar SD 1 GB
PQI 2GB CF
Ambicom WL1100 CF

Bundabrg

  • Full Member
  • ***
  • Posts: 183
    • View Profile
Rc8 - Personal Updates
« Reply #11 on: January 03, 2005, 06:39:33 pm »
Quote
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.
[img]http://www.worldguard.com.au/brendan-ambi.png\" border=\"0\" class=\"linked-sig-image\" /]

conundrum

  • Full Member
  • ***
  • Posts: 102
    • View Profile
Rc8 - Personal Updates
« Reply #12 on: October 04, 2005, 10:44:13 am »
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...?

Chero

  • Hero Member
  • *****
  • Posts: 1140
    • View Profile
    • http://users.telenet.be/zaurususer/Chero
Rc8 - Personal Updates
« Reply #13 on: October 04, 2005, 10:48:48 am »
Quote
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...?
[div align=\"right\"][{POST_SNAPBACK}][/a][/div]

You can probably find the ipk [a href=\"http://zaurus.spy.org/feeds/cacko/pdaXrom/1.1.0/]in ScotYellich's mirrored feeds.[/url]
HP-95LX -> HP Jornada 680 -> SL-C860 -> SL-C3100 -> Fuji u810 -> SL-C1000 -> HTC uni -> SL-C860 -> SL-C760.
March 12 2009 : Back because the Zaurus is one of a kind.
SL-C760 : pdaXrom
Pandora pre-ordered -> received and tested : great device but not my cup of tea -> sold.

conundrum

  • Full Member
  • ***
  • Posts: 102
    • View Profile
Rc8 - Personal Updates
« Reply #14 on: October 04, 2005, 03:24:09 pm »
No go, thanks anyway Chero.