/etc/X11/gpe-login.pre-session is in gpe-login 0.95-2ubuntu1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 | #!/bin/sh
USER=$1
# Sound devices on various devices #
if [ -e /dev/sound/dsp ]; then
chown $USER /dev/sound/dsp
fi
if [ -e /dev/sound/mixer ]; then
chown $USER /dev/sound/mixer
fi
if [ -e /dev/misc/buzzer ]; then
chown $USER /dev/misc/buzzer
fi
if [ -e /dev/dsp ] && ! [ -h /dev/dsp ]; then
chown $USER /dev/dsp
fi
if [ -e /dev/mixer ] && ! [ -h /dev/mixer ]; then
chown $USER /dev/mixer
fi
if [ -e /dev/snd/controlC0 ]; then
chown $USER /dev/snd/controlC0
fi
# serial device (GSM phone of HTC devices, bluetooth on iPAQ h6300)
if [ -e /dev/tts/0 ]; then
chown $USER /dev/tts/0
fi
# serial device (GSM phone of iPAQ h6300 devices)
if [ -e /dev/tts/1 ]; then
chown $USER /dev/tts/1
fi
# touchscreen devices #
if [ -e /dev/touchscreen/0raw ]; then
chown $USER /dev/touchscreen/0raw
fi
if [ -e /dev/touchscreen/0 ]; then
chown $USER /dev/touchscreen/0
fi
# suspend (iPAQ h6300)#
if [ -e /sys/power/state ]; then
chown $USER /sys/power/state
chmod u+rw /sys/power/state
fi
# screen light control #
if [ -d /sys/class/backlight ]; then
chown -R $USER /sys/class/backlight/*
chmod u+rw /sys/class/backlight/*/*
fi
if [ -d /sys/devices/platform/omapfb/panel ]; then
chown -R $USER /sys/devices/platform/omapfb/panel/*
fi
if [ -e /dev/sharp_fl ]; then
chown $USER /dev/sharp_fl
fi
# terminal and framebuffer access #
if [ -e /dev/tty ]; then
chmod a+rw /dev/tty
fi
if [ -e /dev/fb0 ]; then
chown $USER /dev/fb0
fi
# check for ramdisk location
if [ -d /mnt/ramfs ]; then
# old location as used in familiar <= 0.7.2
RAMDISK="/mnt/ramfs"
# check for location as used in familiar >= 0.8.2
elif [ -d /media/ram ]; then
RAMDISK="/media/ram"
else
# default to location as used in familiar 0.8.[01]
RAMDISK="/mnt/ram"
fi
mkdir -p $RAMDISK/home/$USER
chown $USER $RAMDISK/home/$USER
# this location MUST be consistent with HOME_VOLATILE in /etc/X11/Xsession
ln -sf $RAMDISK/home/$USER /home/$USER/ramdisk
ln -sf /home/$USER/ramdisk/.xsession-errors /home/$USER/.xsession-errors
|