Clean up X start up scripts. Remove uneeded files. Use xinit to more safely launch Xserver and XSession scripts
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@632 311d38ba-8fff-0310-9ca6-ca027cbcb966
This commit is contained in:
parent
2d5a5e5ba9
commit
521b22d2f8
|
@ -1,4 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
xrandr -o normal
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [ -z "`which chkhinge`" ]; then
|
||||
# probably not a clamshell zaurus
|
||||
exit 0
|
||||
fi
|
||||
|
||||
chkhinge -e
|
||||
if [ $? = 12 ]; then
|
||||
xrandr -o right
|
||||
fi
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
MACHINE=`awk 'BEGIN { FS=": " } /Hardware/ { print $2 } ' </proc/cpuinfo`
|
||||
|
||||
case $MACHINE in
|
||||
"SHARP Shepherd" | "SHARP Husky" | "SHARP Corgi")
|
||||
case `uname -r` in
|
||||
2.4*)
|
||||
xmodmap - < /etc/X11/shepherd.xmodmap
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
"Sharp-Collie")
|
||||
xmodmap - < /etc/X11/collie.xmodmap
|
||||
;;
|
||||
"Simpad")
|
||||
xmodmap - < /etc/X11/simpad.xmodmap
|
||||
;;
|
||||
"HP iPAQ H2200")
|
||||
xmodmap - < /etc/X11/h2200.xmodmap
|
||||
;;
|
||||
esac
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [ ! -f /etc/pointercal ] && [ ! -z "$TSLIB_TSDEVICE" ]; then
|
||||
/usr/bin/xtscal
|
||||
fi
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [ -f /proc/hal/model ]; then
|
||||
xmodmap -e 'keycode 104 = Return'
|
||||
fi
|
|
@ -1,4 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
xset s 30 180
|
||||
xset s off
|
|
@ -1,3 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
xrdb -load -nocpp < /etc/X11/Xdefaults
|
|
@ -1,18 +1,19 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
|
||||
XSERVER=Xipaq
|
||||
# note xinit needs full server path
|
||||
XSERVER=/usr/bin/Xipaq
|
||||
if [ -f /usr/bin/Xfbdev ]; then
|
||||
XSERVER=Xfbdev
|
||||
XSERVER=/usr/bin/Xfbdev
|
||||
fi
|
||||
if [ -f /usr/bin/Xepson ]; then
|
||||
XSERVER=Xepson
|
||||
XSERVER=/usr/bin/Xepson
|
||||
fi
|
||||
if [ -f /usr/bin/Xorg ]; then
|
||||
XSERVER=Xorg
|
||||
XSERVER=/usr/bin/Xorg
|
||||
fi
|
||||
if [ -f /usr/bin/Xomap ]; then
|
||||
XSERVER=Xomap
|
||||
XSERVER=/usr/bin/Xomap
|
||||
fi
|
||||
|
||||
. /etc/profile
|
||||
|
@ -72,4 +73,6 @@ case `module_id` in
|
|||
ARGS="$ARGS -rgba vrgb"
|
||||
esac
|
||||
|
||||
exec $XSERVER $ARGS $*
|
||||
DISPLAY=':0'
|
||||
|
||||
exec xinit /etc/X11/Xsession -- $XSERVER $DISPLAY $ARGS $*
|
||||
|
|
|
@ -19,29 +19,9 @@ if [ -f $HOME/.profile ]; then
|
|||
. $HOME/.profile
|
||||
fi
|
||||
|
||||
SYSSESSIONDIR=/etc/X11/Xsession-gpe.d
|
||||
SYSSESSIONDIR=/etc/X11/Xsession.d
|
||||
|
||||
if [ ! -d $SYSSESSIONDIR ]; then
|
||||
SYSSESSIONDIR=/etc/X11/Xsession.d
|
||||
fi
|
||||
|
||||
# Use run-parts to source every file in the session directory; we source
|
||||
# instead of executing so that the variables and functions defined above
|
||||
# are available to the scripts, and so that they can pass variables to each
|
||||
# other.
|
||||
|
||||
# Can't use run-parts like this, busybox doesn't support it. Use ls instead
|
||||
#SESSIONFILES=$(run-parts --list $SYSSESSIONDIR)
|
||||
|
||||
SESSIONFILES=`ls -X $SYSSESSIONDIR`
|
||||
if [ -n "$SESSIONFILES" ]; then
|
||||
for SESSIONFILE in $SESSIONFILES; do
|
||||
# Test if script is executable first before sourcing it
|
||||
if [ -x "$SYSSESSIONDIR/$SESSIONFILE" ]; then
|
||||
. $SYSSESSIONDIR/$SESSIONFILE
|
||||
fi
|
||||
done
|
||||
fi
|
||||
run-parts $SYSSESSIONDIR
|
||||
|
||||
exit 0
|
||||
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
while [ ! -z $TSLIB_TSDEVICE ] && [ ! -f /etc/pointercal ]
|
||||
do
|
||||
/usr/bin/xtscal
|
||||
done
|
|
@ -1,5 +0,0 @@
|
|||
keycode 96 = XF86Calendar
|
||||
keycode 97 = telephone
|
||||
keycode 48 = XF86Start
|
||||
keycode 98 = XF86Mail
|
||||
keycode 117 = XF86PowerDown
|
|
@ -1,5 +0,0 @@
|
|||
keycode 75 = XF86Calendar
|
||||
keycode 76 = telephone
|
||||
keycode 77 = XF86Mail
|
||||
keycode 78 = XF86Start
|
||||
keycode 124 = XF86PowerDown
|
|
@ -1,49 +0,0 @@
|
|||
keycode 38 = Mode_switch
|
||||
keycode 31 = w W caret
|
||||
keycode 13 = e E equal
|
||||
keycode 26 = r R plus
|
||||
keycode 28 = t T bracketleft
|
||||
keycode 33 = y y bracketright
|
||||
keycode 29 = u U braceleft
|
||||
keycode 17 = i I braceright
|
||||
!keycode 73 = Tab Tab Caps_Lock
|
||||
keycode 12 = d D periodcentered
|
||||
keycode 14 = f F backslash
|
||||
keycode 15 = g G semicolon
|
||||
keycode 16 = h H colon
|
||||
keycode 18 = j J asterisk
|
||||
keycode 19 = k K currency
|
||||
keycode 20 = l L bar
|
||||
keycode 10 = b B underscore
|
||||
keycode 66 = minus minus at
|
||||
keycode 71 = comma slash less
|
||||
keycode 72 = period question greater
|
||||
|
||||
! Side keys
|
||||
keycode 134 = Down
|
||||
keycode 133 = Up
|
||||
keycode 131 = Return
|
||||
keycode 132 = Escape
|
||||
|
||||
!Special keys
|
||||
!keycode 96 = XF86Calendar
|
||||
!keycode 97 = telephone
|
||||
!keycode 98 = XF86Mail
|
||||
!keycode 48 = XF86HomePage
|
||||
!keycode 37 = XF86Start
|
||||
|
||||
clear Shift
|
||||
clear Lock
|
||||
clear Control
|
||||
clear Mod1
|
||||
clear Mod2
|
||||
clear Mod3
|
||||
clear Mod4
|
||||
clear Mod5
|
||||
|
||||
add Shift = Shift_L Shift_R
|
||||
!add Lock = Caps_Lock
|
||||
add Control = Control_L Control_R
|
||||
add Mod1 = Alt_L Alt_R
|
||||
add Mod2 = Mode_switch
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
keycode 102 = XF86PowerDown
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
DESCRIPTION = "Common X11 scripts"
|
||||
LICENSE = "GPL"
|
||||
SECTION = "x11"
|
||||
RDEPENDS_${PN} = "xmodmap libxrandr xdpyinfo xtscal"
|
||||
PR = "r6"
|
||||
RDEPENDS_${PN} = "xmodmap libxrandr xdpyinfo xtscal xinit"
|
||||
PR = "r7"
|
||||
|
||||
SRC_URI = "file://etc"
|
||||
S = ${WORKDIR}
|
||||
|
|
|
@ -2,7 +2,7 @@ DESCRIPTION = "Simple Xserver Init Script (no dm)"
|
|||
LICENSE = "GPL"
|
||||
SECTION = "x11"
|
||||
PRIORITY = "optional"
|
||||
PR = "r6"
|
||||
PR = "r7"
|
||||
|
||||
SRC_URI = "file://xserver-nodm"
|
||||
S = ${WORKDIR}
|
||||
|
|
|
@ -8,8 +8,6 @@ killproc() { # kill the named process(es)
|
|||
[ "$pid" != "" ] && kill $pid
|
||||
}
|
||||
|
||||
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
# We don't want this script to block the rest of the boot process
|
||||
|
@ -20,28 +18,22 @@ case "$1" in
|
|||
|
||||
echo "Starting Xserver"
|
||||
/etc/X11/Xserver &
|
||||
|
||||
export DISPLAY=:0
|
||||
|
||||
while [ ! -z $TSLIB_TSDEVICE ] && [ ! -f /etc/pointercal ]
|
||||
do
|
||||
/usr/bin/xtscal
|
||||
done
|
||||
|
||||
/etc/X11/Xsession &
|
||||
fi
|
||||
;;
|
||||
|
||||
stop)
|
||||
echo "Stopping XServer"
|
||||
killproc Xfbdev
|
||||
killproc Xomap
|
||||
killproc Xorg
|
||||
killproc Xepson
|
||||
killproc xinit
|
||||
;;
|
||||
|
||||
restart)
|
||||
$0 stop
|
||||
sleep 1
|
||||
$0 start
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "usage: $0 { start | stop }"
|
||||
echo "usage: $0 { start | stop | restart }"
|
||||
;;
|
||||
esac
|
||||
|
||||
|
|
Loading…
Reference in New Issue