#!/bin/sh # /dev is a fresh ramfs each boot, populated by makedevs from # /etc/device_table. That table asks for gid 46 on apm_bios and gid 29 on the # audio nodes, but no such groups exist in /etc/group, so everything lands as # gid 0 and the session user cannot open them. Psion's answer for the audio # nodes was to chown them here, once /dev is up; apm_bios needs the same. # # Without it `apm --suspend` fails: it reads battery state from /proc/apm, # which is world-readable, but suspending is an ioctl on /dev/apm_bios, which # is mode 660 root:root. That is why the power button did nothing -- and why # ipaq-sleep, which runs as lx and whose default sleep command is # `apm --suspend`, has never been able to suspend on idle either. chown lx /dev/dsp /dev/mixer /dev/apm_bios if ! grep -q '^lx::' /etc/passwd; then exec gpe-login else ln -s /var/tmp/xsession-errors.lx /home/lx/.xsession-errors exec su lx -c /etc/X11/Xsession >> /home/lx/.xsession-errors 2>&1 fi