diff options
author | Matthew Allum <mallum@openedhand.com> | 2006-08-23 10:44:12 +0000 |
---|---|---|
committer | Matthew Allum <mallum@openedhand.com> | 2006-08-23 10:44:12 +0000 |
commit | 521b22d2f817b603fa0948199624699031fcf832 (patch) | |
tree | fcdec27c11f9e3b3bcd46d962a1315ea2afcc7cc | |
parent | 2d5a5e5ba93b6b1ce8ddf092c7d4839e525d48ff (diff) | |
download | poky-521b22d2f817b603fa0948199624699031fcf832.tar.gz |
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
17 files changed, 28 insertions, 165 deletions
diff --git a/meta/packages/xserver-kdrive-common/xserver-kdrive-common/etc/X11/Xinit.d/01xrandr b/meta/packages/xserver-kdrive-common/xserver-kdrive-common/etc/X11/Xinit.d/01xrandr deleted file mode 100644 index abde87d53c..0000000000 --- a/meta/packages/xserver-kdrive-common/xserver-kdrive-common/etc/X11/Xinit.d/01xrandr +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | xrandr -o normal | ||
4 | |||
diff --git a/meta/packages/xserver-kdrive-common/xserver-kdrive-common/etc/X11/Xinit.d/11zaurus b/meta/packages/xserver-kdrive-common/xserver-kdrive-common/etc/X11/Xinit.d/11zaurus deleted file mode 100644 index 61ca84b595..0000000000 --- a/meta/packages/xserver-kdrive-common/xserver-kdrive-common/etc/X11/Xinit.d/11zaurus +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | if [ -z "`which chkhinge`" ]; then | ||
4 | # probably not a clamshell zaurus | ||
5 | exit 0 | ||
6 | fi | ||
7 | |||
8 | chkhinge -e | ||
9 | if [ $? = 12 ]; then | ||
10 | xrandr -o right | ||
11 | fi | ||
12 | |||
diff --git a/meta/packages/xserver-kdrive-common/xserver-kdrive-common/etc/X11/Xinit.d/12keymap b/meta/packages/xserver-kdrive-common/xserver-kdrive-common/etc/X11/Xinit.d/12keymap deleted file mode 100644 index abc14f8661..0000000000 --- a/meta/packages/xserver-kdrive-common/xserver-kdrive-common/etc/X11/Xinit.d/12keymap +++ /dev/null | |||
@@ -1,23 +0,0 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | MACHINE=`awk 'BEGIN { FS=": " } /Hardware/ { print $2 } ' </proc/cpuinfo` | ||
4 | |||
5 | case $MACHINE in | ||
6 | "SHARP Shepherd" | "SHARP Husky" | "SHARP Corgi") | ||
7 | case `uname -r` in | ||
8 | 2.4*) | ||
9 | xmodmap - < /etc/X11/shepherd.xmodmap | ||
10 | ;; | ||
11 | esac | ||
12 | ;; | ||
13 | "Sharp-Collie") | ||
14 | xmodmap - < /etc/X11/collie.xmodmap | ||
15 | ;; | ||
16 | "Simpad") | ||
17 | xmodmap - < /etc/X11/simpad.xmodmap | ||
18 | ;; | ||
19 | "HP iPAQ H2200") | ||
20 | xmodmap - < /etc/X11/h2200.xmodmap | ||
21 | ;; | ||
22 | esac | ||
23 | |||
diff --git a/meta/packages/xserver-kdrive-common/xserver-kdrive-common/etc/X11/Xinit.d/30xTs_Calibrate b/meta/packages/xserver-kdrive-common/xserver-kdrive-common/etc/X11/Xinit.d/30xTs_Calibrate deleted file mode 100644 index 26d8551b18..0000000000 --- a/meta/packages/xserver-kdrive-common/xserver-kdrive-common/etc/X11/Xinit.d/30xTs_Calibrate +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | if [ ! -f /etc/pointercal ] && [ ! -z "$TSLIB_TSDEVICE" ]; then | ||
4 | /usr/bin/xtscal | ||
5 | fi | ||
6 | |||
diff --git a/meta/packages/xserver-kdrive-common/xserver-kdrive-common/etc/X11/Xinit.d/40xmodmap b/meta/packages/xserver-kdrive-common/xserver-kdrive-common/etc/X11/Xinit.d/40xmodmap deleted file mode 100644 index 7ae3b58860..0000000000 --- a/meta/packages/xserver-kdrive-common/xserver-kdrive-common/etc/X11/Xinit.d/40xmodmap +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | if [ -f /proc/hal/model ]; then | ||
4 | xmodmap -e 'keycode 104 = Return' | ||
5 | fi | ||
diff --git a/meta/packages/xserver-kdrive-common/xserver-kdrive-common/etc/X11/Xinit.d/55xScreenSaver b/meta/packages/xserver-kdrive-common/xserver-kdrive-common/etc/X11/Xinit.d/55xScreenSaver deleted file mode 100644 index 5f6d0dae5d..0000000000 --- a/meta/packages/xserver-kdrive-common/xserver-kdrive-common/etc/X11/Xinit.d/55xScreenSaver +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | xset s 30 180 | ||
4 | xset s off | ||
diff --git a/meta/packages/xserver-kdrive-common/xserver-kdrive-common/etc/X11/Xinit.d/60xXDefaults b/meta/packages/xserver-kdrive-common/xserver-kdrive-common/etc/X11/Xinit.d/60xXDefaults deleted file mode 100644 index 6b35e0357c..0000000000 --- a/meta/packages/xserver-kdrive-common/xserver-kdrive-common/etc/X11/Xinit.d/60xXDefaults +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | xrdb -load -nocpp < /etc/X11/Xdefaults | ||
diff --git a/meta/packages/xserver-kdrive-common/xserver-kdrive-common/etc/X11/Xserver b/meta/packages/xserver-kdrive-common/xserver-kdrive-common/etc/X11/Xserver index 88b8abbb23..64017fb8bb 100644 --- a/meta/packages/xserver-kdrive-common/xserver-kdrive-common/etc/X11/Xserver +++ b/meta/packages/xserver-kdrive-common/xserver-kdrive-common/etc/X11/Xserver | |||
@@ -1,18 +1,19 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | # | 2 | # |
3 | 3 | ||
4 | XSERVER=Xipaq | 4 | # note xinit needs full server path |
5 | XSERVER=/usr/bin/Xipaq | ||
5 | if [ -f /usr/bin/Xfbdev ]; then | 6 | if [ -f /usr/bin/Xfbdev ]; then |
6 | XSERVER=Xfbdev | 7 | XSERVER=/usr/bin/Xfbdev |
7 | fi | 8 | fi |
8 | if [ -f /usr/bin/Xepson ]; then | 9 | if [ -f /usr/bin/Xepson ]; then |
9 | XSERVER=Xepson | 10 | XSERVER=/usr/bin/Xepson |
10 | fi | 11 | fi |
11 | if [ -f /usr/bin/Xorg ]; then | 12 | if [ -f /usr/bin/Xorg ]; then |
12 | XSERVER=Xorg | 13 | XSERVER=/usr/bin/Xorg |
13 | fi | 14 | fi |
14 | if [ -f /usr/bin/Xomap ]; then | 15 | if [ -f /usr/bin/Xomap ]; then |
15 | XSERVER=Xomap | 16 | XSERVER=/usr/bin/Xomap |
16 | fi | 17 | fi |
17 | 18 | ||
18 | . /etc/profile | 19 | . /etc/profile |
@@ -72,4 +73,6 @@ case `module_id` in | |||
72 | ARGS="$ARGS -rgba vrgb" | 73 | ARGS="$ARGS -rgba vrgb" |
73 | esac | 74 | esac |
74 | 75 | ||
75 | exec $XSERVER $ARGS $* | 76 | DISPLAY=':0' |
77 | |||
78 | exec xinit /etc/X11/Xsession -- $XSERVER $DISPLAY $ARGS $* | ||
diff --git a/meta/packages/xserver-kdrive-common/xserver-kdrive-common/etc/X11/Xsession b/meta/packages/xserver-kdrive-common/xserver-kdrive-common/etc/X11/Xsession index cfa3a9a6e3..b607462fe3 100644 --- a/meta/packages/xserver-kdrive-common/xserver-kdrive-common/etc/X11/Xsession +++ b/meta/packages/xserver-kdrive-common/xserver-kdrive-common/etc/X11/Xsession | |||
@@ -19,29 +19,9 @@ if [ -f $HOME/.profile ]; then | |||
19 | . $HOME/.profile | 19 | . $HOME/.profile |
20 | fi | 20 | fi |
21 | 21 | ||
22 | SYSSESSIONDIR=/etc/X11/Xsession-gpe.d | 22 | SYSSESSIONDIR=/etc/X11/Xsession.d |
23 | 23 | ||
24 | if [ ! -d $SYSSESSIONDIR ]; then | 24 | run-parts $SYSSESSIONDIR |
25 | SYSSESSIONDIR=/etc/X11/Xsession.d | ||
26 | fi | ||
27 | |||
28 | # Use run-parts to source every file in the session directory; we source | ||
29 | # instead of executing so that the variables and functions defined above | ||
30 | # are available to the scripts, and so that they can pass variables to each | ||
31 | # other. | ||
32 | |||
33 | # Can't use run-parts like this, busybox doesn't support it. Use ls instead | ||
34 | #SESSIONFILES=$(run-parts --list $SYSSESSIONDIR) | ||
35 | |||
36 | SESSIONFILES=`ls -X $SYSSESSIONDIR` | ||
37 | if [ -n "$SESSIONFILES" ]; then | ||
38 | for SESSIONFILE in $SESSIONFILES; do | ||
39 | # Test if script is executable first before sourcing it | ||
40 | if [ -x "$SYSSESSIONDIR/$SESSIONFILE" ]; then | ||
41 | . $SYSSESSIONDIR/$SESSIONFILE | ||
42 | fi | ||
43 | done | ||
44 | fi | ||
45 | 25 | ||
46 | exit 0 | 26 | exit 0 |
47 | 27 | ||
diff --git a/meta/packages/xserver-kdrive-common/xserver-kdrive-common/etc/X11/Xsession.d/30xTs_Calibrate b/meta/packages/xserver-kdrive-common/xserver-kdrive-common/etc/X11/Xsession.d/30xTs_Calibrate new file mode 100644 index 0000000000..8e6a8b22cb --- /dev/null +++ b/meta/packages/xserver-kdrive-common/xserver-kdrive-common/etc/X11/Xsession.d/30xTs_Calibrate | |||
@@ -0,0 +1,6 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | while [ ! -z $TSLIB_TSDEVICE ] && [ ! -f /etc/pointercal ] | ||
4 | do | ||
5 | /usr/bin/xtscal | ||
6 | done | ||
diff --git a/meta/packages/xserver-kdrive-common/xserver-kdrive-common/etc/X11/collie.xmodmap b/meta/packages/xserver-kdrive-common/xserver-kdrive-common/etc/X11/collie.xmodmap deleted file mode 100644 index 5c0b39dc88..0000000000 --- a/meta/packages/xserver-kdrive-common/xserver-kdrive-common/etc/X11/collie.xmodmap +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | keycode 96 = XF86Calendar | ||
2 | keycode 97 = telephone | ||
3 | keycode 48 = XF86Start | ||
4 | keycode 98 = XF86Mail | ||
5 | keycode 117 = XF86PowerDown | ||
diff --git a/meta/packages/xserver-kdrive-common/xserver-kdrive-common/etc/X11/h2200.xmodmap b/meta/packages/xserver-kdrive-common/xserver-kdrive-common/etc/X11/h2200.xmodmap deleted file mode 100644 index 736766efd7..0000000000 --- a/meta/packages/xserver-kdrive-common/xserver-kdrive-common/etc/X11/h2200.xmodmap +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | keycode 75 = XF86Calendar | ||
2 | keycode 76 = telephone | ||
3 | keycode 77 = XF86Mail | ||
4 | keycode 78 = XF86Start | ||
5 | keycode 124 = XF86PowerDown | ||
diff --git a/meta/packages/xserver-kdrive-common/xserver-kdrive-common/etc/X11/shepherd.xmodmap b/meta/packages/xserver-kdrive-common/xserver-kdrive-common/etc/X11/shepherd.xmodmap deleted file mode 100644 index 0a03b4f426..0000000000 --- a/meta/packages/xserver-kdrive-common/xserver-kdrive-common/etc/X11/shepherd.xmodmap +++ /dev/null | |||
@@ -1,49 +0,0 @@ | |||
1 | keycode 38 = Mode_switch | ||
2 | keycode 31 = w W caret | ||
3 | keycode 13 = e E equal | ||
4 | keycode 26 = r R plus | ||
5 | keycode 28 = t T bracketleft | ||
6 | keycode 33 = y y bracketright | ||
7 | keycode 29 = u U braceleft | ||
8 | keycode 17 = i I braceright | ||
9 | !keycode 73 = Tab Tab Caps_Lock | ||
10 | keycode 12 = d D periodcentered | ||
11 | keycode 14 = f F backslash | ||
12 | keycode 15 = g G semicolon | ||
13 | keycode 16 = h H colon | ||
14 | keycode 18 = j J asterisk | ||
15 | keycode 19 = k K currency | ||
16 | keycode 20 = l L bar | ||
17 | keycode 10 = b B underscore | ||
18 | keycode 66 = minus minus at | ||
19 | keycode 71 = comma slash less | ||
20 | keycode 72 = period question greater | ||
21 | |||
22 | ! Side keys | ||
23 | keycode 134 = Down | ||
24 | keycode 133 = Up | ||
25 | keycode 131 = Return | ||
26 | keycode 132 = Escape | ||
27 | |||
28 | !Special keys | ||
29 | !keycode 96 = XF86Calendar | ||
30 | !keycode 97 = telephone | ||
31 | !keycode 98 = XF86Mail | ||
32 | !keycode 48 = XF86HomePage | ||
33 | !keycode 37 = XF86Start | ||
34 | |||
35 | clear Shift | ||
36 | clear Lock | ||
37 | clear Control | ||
38 | clear Mod1 | ||
39 | clear Mod2 | ||
40 | clear Mod3 | ||
41 | clear Mod4 | ||
42 | clear Mod5 | ||
43 | |||
44 | add Shift = Shift_L Shift_R | ||
45 | !add Lock = Caps_Lock | ||
46 | add Control = Control_L Control_R | ||
47 | add Mod1 = Alt_L Alt_R | ||
48 | add Mod2 = Mode_switch | ||
49 | |||
diff --git a/meta/packages/xserver-kdrive-common/xserver-kdrive-common/etc/X11/simpad.xmodmap b/meta/packages/xserver-kdrive-common/xserver-kdrive-common/etc/X11/simpad.xmodmap deleted file mode 100644 index d8b73b207f..0000000000 --- a/meta/packages/xserver-kdrive-common/xserver-kdrive-common/etc/X11/simpad.xmodmap +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | keycode 102 = XF86PowerDown | ||
2 | |||
diff --git a/meta/packages/xserver-kdrive-common/xserver-kdrive-common_0.1.bb b/meta/packages/xserver-kdrive-common/xserver-kdrive-common_0.1.bb index b1f06fe3b6..04ac1c1931 100644 --- a/meta/packages/xserver-kdrive-common/xserver-kdrive-common_0.1.bb +++ b/meta/packages/xserver-kdrive-common/xserver-kdrive-common_0.1.bb | |||
@@ -1,8 +1,8 @@ | |||
1 | DESCRIPTION = "Common X11 scripts" | 1 | DESCRIPTION = "Common X11 scripts" |
2 | LICENSE = "GPL" | 2 | LICENSE = "GPL" |
3 | SECTION = "x11" | 3 | SECTION = "x11" |
4 | RDEPENDS_${PN} = "xmodmap libxrandr xdpyinfo xtscal" | 4 | RDEPENDS_${PN} = "xmodmap libxrandr xdpyinfo xtscal xinit" |
5 | PR = "r6" | 5 | PR = "r7" |
6 | 6 | ||
7 | SRC_URI = "file://etc" | 7 | SRC_URI = "file://etc" |
8 | S = ${WORKDIR} | 8 | S = ${WORKDIR} |
diff --git a/meta/packages/xserver-kdrive-common/xserver-nodm-init.bb b/meta/packages/xserver-kdrive-common/xserver-nodm-init.bb index 5dff889184..d1ed98dfaf 100644 --- a/meta/packages/xserver-kdrive-common/xserver-nodm-init.bb +++ b/meta/packages/xserver-kdrive-common/xserver-nodm-init.bb | |||
@@ -2,7 +2,7 @@ DESCRIPTION = "Simple Xserver Init Script (no dm)" | |||
2 | LICENSE = "GPL" | 2 | LICENSE = "GPL" |
3 | SECTION = "x11" | 3 | SECTION = "x11" |
4 | PRIORITY = "optional" | 4 | PRIORITY = "optional" |
5 | PR = "r6" | 5 | PR = "r7" |
6 | 6 | ||
7 | SRC_URI = "file://xserver-nodm" | 7 | SRC_URI = "file://xserver-nodm" |
8 | S = ${WORKDIR} | 8 | S = ${WORKDIR} |
diff --git a/meta/packages/xserver-kdrive-common/xserver-nodm-init/xserver-nodm b/meta/packages/xserver-kdrive-common/xserver-nodm-init/xserver-nodm index eeab55a71a..be405bc008 100755 --- a/meta/packages/xserver-kdrive-common/xserver-nodm-init/xserver-nodm +++ b/meta/packages/xserver-kdrive-common/xserver-nodm-init/xserver-nodm | |||
@@ -8,8 +8,6 @@ killproc() { # kill the named process(es) | |||
8 | [ "$pid" != "" ] && kill $pid | 8 | [ "$pid" != "" ] && kill $pid |
9 | } | 9 | } |
10 | 10 | ||
11 | |||
12 | |||
13 | case "$1" in | 11 | case "$1" in |
14 | start) | 12 | start) |
15 | # We don't want this script to block the rest of the boot process | 13 | # We don't want this script to block the rest of the boot process |
@@ -20,28 +18,22 @@ case "$1" in | |||
20 | 18 | ||
21 | echo "Starting Xserver" | 19 | echo "Starting Xserver" |
22 | /etc/X11/Xserver & | 20 | /etc/X11/Xserver & |
23 | |||
24 | export DISPLAY=:0 | ||
25 | |||
26 | while [ ! -z $TSLIB_TSDEVICE ] && [ ! -f /etc/pointercal ] | ||
27 | do | ||
28 | /usr/bin/xtscal | ||
29 | done | ||
30 | |||
31 | /etc/X11/Xsession & | ||
32 | fi | 21 | fi |
33 | ;; | 22 | ;; |
34 | 23 | ||
35 | stop) | 24 | stop) |
36 | echo "Stopping XServer" | 25 | echo "Stopping XServer" |
37 | killproc Xfbdev | 26 | killproc xinit |
38 | killproc Xomap | 27 | ;; |
39 | killproc Xorg | 28 | |
40 | killproc Xepson | 29 | restart) |
30 | $0 stop | ||
31 | sleep 1 | ||
32 | $0 start | ||
41 | ;; | 33 | ;; |
42 | 34 | ||
43 | *) | 35 | *) |
44 | echo "usage: $0 { start | stop }" | 36 | echo "usage: $0 { start | stop | restart }" |
45 | ;; | 37 | ;; |
46 | esac | 38 | esac |
47 | 39 | ||