diff options
Diffstat (limited to 'meta/packages/x11-common')
10 files changed, 505 insertions, 0 deletions
diff --git a/meta/packages/x11-common/x11-common/etc/X11/Xdefaults b/meta/packages/x11-common/x11-common/etc/X11/Xdefaults new file mode 100644 index 0000000000..f5b69dd516 --- /dev/null +++ b/meta/packages/x11-common/x11-common/etc/X11/Xdefaults | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | Rxvt*scrollBar_right: true | ||
| 2 | Rxvt*font: xft:Mono:pixelsize=9 | ||
| 3 | |||
diff --git a/meta/packages/x11-common/x11-common/etc/X11/Xinit b/meta/packages/x11-common/x11-common/etc/X11/Xinit new file mode 100644 index 0000000000..f566ffe5be --- /dev/null +++ b/meta/packages/x11-common/x11-common/etc/X11/Xinit | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | # | ||
| 3 | |||
| 4 | export USER=root | ||
| 5 | export HOME=/home/root | ||
| 6 | if [ ! -d $HOME ] && [ -d /root ]; then | ||
| 7 | HOME=/root | ||
| 8 | fi | ||
| 9 | export XAPPLRESDIR=/usr/X11R6/lib/app-defaults | ||
| 10 | export XFILESEARCHPATH=./%N%S%C.ad:/usr/X11R6/lib/X11/%L/%T/%N%S%C:/usr/X11R6/lib/X11/%l/%T/%N%S%C:/usr/X11R6/lib/X11/%T/%N%S%C:./%N%S.ad:/usr/X11R6/lib/X11/%L/%T/%N%S:/usr/X11R6/lib/X11/%l/%T/%N%S:/usr/X11R6/lib/X11/%T/%N%S:/usr/local/lib/X11/app-defaults/%N%S%C.ad | ||
| 11 | |||
| 12 | export PATH=$PATH:/usr/X11R6/bin | ||
| 13 | |||
| 14 | SYSSESSIONDIR=/etc/X11/Xinit.d | ||
| 15 | |||
| 16 | exec run-parts $SYSSESSIONDIR | ||
diff --git a/meta/packages/x11-common/x11-common/etc/X11/Xserver b/meta/packages/x11-common/x11-common/etc/X11/Xserver new file mode 100644 index 0000000000..689d522d09 --- /dev/null +++ b/meta/packages/x11-common/x11-common/etc/X11/Xserver | |||
| @@ -0,0 +1,83 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | # | ||
| 3 | |||
| 4 | . /etc/formfactor/config | ||
| 5 | |||
| 6 | # note xinit needs full server path | ||
| 7 | XSERVER=/usr/bin/Xipaq | ||
| 8 | if [ -f /usr/bin/Xfbdev ]; then | ||
| 9 | XSERVER=/usr/bin/Xfbdev | ||
| 10 | fi | ||
| 11 | if [ -f /usr/bin/Xepson ]; then | ||
| 12 | XSERVER=/usr/bin/Xepson | ||
| 13 | fi | ||
| 14 | if [ -f /usr/bin/Xorg ]; then | ||
| 15 | XSERVER=/usr/bin/Xorg | ||
| 16 | fi | ||
| 17 | if [ -f /usr/bin/Xomap ]; then | ||
| 18 | XSERVER=/usr/bin/Xomap | ||
| 19 | fi | ||
| 20 | |||
| 21 | . /etc/profile | ||
| 22 | |||
| 23 | module_id() { | ||
| 24 | ## used to read from assets, but sometimes assets is corrupted | ||
| 25 | # grep "Module ID" /proc/hal/assets | sed "s/.*://" | ||
| 26 | ## used to read from /proc/hal/model, but that is removed in 2.6 | ||
| 27 | # echo ' iPAQ' `cat /proc/hal/model` | ||
| 28 | awk 'BEGIN { FS=": " } /Hardware/ { print $2 } ' </proc/cpuinfo | ||
| 29 | } | ||
| 30 | |||
| 31 | export USER=root | ||
| 32 | |||
| 33 | ARGS=" -br -pn" | ||
| 34 | |||
| 35 | if [ "$XSERVER" != "/usr/bin/Xorg" ]; then | ||
| 36 | |||
| 37 | # use ucb 1x00 touchscreen if present | ||
| 38 | if [ -z "$TSLIB_TSDEVICE" ] && [ -e /dev/touchscreen/ucb1x00 ]; then | ||
| 39 | ARGS="$ARGS -mouse /dev/touchscreen/ucb1x00" | ||
| 40 | fi | ||
| 41 | |||
| 42 | # use usb mouse if present | ||
| 43 | if [ -z "$TSLIB_TSDEVICE" ] && [ -e /dev/input/mice ]; then | ||
| 44 | ARGS="$ARGS -mouse /dev/input/mice" | ||
| 45 | fi | ||
| 46 | |||
| 47 | # kdrive 1.4 onwards needs -mouse args | ||
| 48 | if [ -n "$TSLIB_TSDEVICE" ]; then | ||
| 49 | ARGS="$ARGS -mouse tslib" | ||
| 50 | fi | ||
| 51 | |||
| 52 | # start off server in conventional location. | ||
| 53 | case `module_id` in | ||
| 54 | "Generic OMAP1510/1610/1710") | ||
| 55 | ARGS="$ARGS -mouse /dev/input/event0" ;; | ||
| 56 | "Compulab CM-x270") | ||
| 57 | #modprobe mbxfb | ||
| 58 | #ARGS="$ARGS -fb /dev/fb1" | ||
| 59 | ;; | ||
| 60 | "Nokia N800") | ||
| 61 | ARGS="$ARGS -mouse tslib" ;; | ||
| 62 | "Nokia 770") | ||
| 63 | ARGS="$ARGS -mouse tslib" ;; | ||
| 64 | *) | ||
| 65 | ;; | ||
| 66 | esac | ||
| 67 | |||
| 68 | ARGS="$ARGS -screen ${DISPLAY_WIDTH_PIXELS}x${DISPLAY_HEIGHT_PIXELS}@${DISPLAY_ORIENTATION}x${DISPLAY_BPP}" | ||
| 69 | |||
| 70 | if [ ! -z "$DISPLAY_DPI" ]; then | ||
| 71 | ARGS="$ARGS -dpi $DISPLAY_DPI" | ||
| 72 | fi | ||
| 73 | |||
| 74 | if [ ! -z "$DISPLAY_SUBPIXEL_ORDER" ]; then | ||
| 75 | ARGS="$ARGS -rgba $DISPLAY_SUBPIXEL_ORDER" | ||
| 76 | fi | ||
| 77 | |||
| 78 | fi | ||
| 79 | |||
| 80 | DISPLAY=':0' | ||
| 81 | |||
| 82 | exec xinit /etc/X11/Xsession -- $XSERVER $DISPLAY $ARGS $* | ||
| 83 | |||
diff --git a/meta/packages/x11-common/x11-common/etc/X11/Xsession b/meta/packages/x11-common/x11-common/etc/X11/Xsession new file mode 100644 index 0000000000..8f3e5edd7d --- /dev/null +++ b/meta/packages/x11-common/x11-common/etc/X11/Xsession | |||
| @@ -0,0 +1,42 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | HOME_VOLATILE=/home/$USER/ramdisk | ||
| 4 | export HOME_VOLATILE | ||
| 5 | |||
| 6 | HOME=/home/$USER | ||
| 7 | export HOME | ||
| 8 | |||
| 9 | if [ -x /usr/bin/dbus-launch ]; then | ||
| 10 | # As this is the X session script, always start a new DBus session. | ||
| 11 | eval `dbus-launch --sh-syntax --exit-with-session` | ||
| 12 | echo "D-BUS per-session daemon address is: $DBUS_SESSION_BUS_ADDRESS" | ||
| 13 | fi | ||
| 14 | |||
| 15 | . /etc/profile | ||
| 16 | |||
| 17 | if [ -f $HOME/.profile ]; then | ||
| 18 | . $HOME/.profile | ||
| 19 | fi | ||
| 20 | |||
| 21 | SYSSESSIONDIR=/etc/X11/Xsession.d | ||
| 22 | |||
| 23 | for SESSIONFILE in $SYSSESSIONDIR/*; do | ||
| 24 | set +e | ||
| 25 | case "$SESSIONFILE" in | ||
| 26 | *.sh) | ||
| 27 | . "$SESSIONFILE" | ||
| 28 | ;; | ||
| 29 | *.shbg) | ||
| 30 | "$SESSIONFILE" & | ||
| 31 | ;; | ||
| 32 | *~) | ||
| 33 | # Ignore backup files | ||
| 34 | ;; | ||
| 35 | *) | ||
| 36 | "$SESSIONFILE" | ||
| 37 | ;; | ||
| 38 | esac | ||
| 39 | set -e | ||
| 40 | done | ||
| 41 | |||
| 42 | exit 0 | ||
diff --git a/meta/packages/x11-common/x11-common/etc/X11/Xsession.d/12keymap.sh b/meta/packages/x11-common/x11-common/etc/X11/Xsession.d/12keymap.sh new file mode 100644 index 0000000000..a9d102c746 --- /dev/null +++ b/meta/packages/x11-common/x11-common/etc/X11/Xsession.d/12keymap.sh | |||
| @@ -0,0 +1,4 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | # kdrive 1.4 does not have default keymap in server | ||
| 4 | #xmodmap - </etc/X11/default.xmodmap | ||
diff --git a/meta/packages/x11-common/x11-common/etc/X11/Xsession.d/90XWindowManager.sh b/meta/packages/x11-common/x11-common/etc/X11/Xsession.d/90XWindowManager.sh new file mode 100644 index 0000000000..b936dedf3b --- /dev/null +++ b/meta/packages/x11-common/x11-common/etc/X11/Xsession.d/90XWindowManager.sh | |||
| @@ -0,0 +1,7 @@ | |||
| 1 | if [ -x $HOME/.Xsession ]; then | ||
| 2 | exec $HOME/.Xsession | ||
| 3 | elif [ -x /usr/bin/x-session-manager ]; then | ||
| 4 | exec /usr/bin/x-session-manager | ||
| 5 | else | ||
| 6 | exec /usr/bin/x-window-manager | ||
| 7 | fi | ||
diff --git a/meta/packages/x11-common/x11-common/etc/X11/default.xmodmap b/meta/packages/x11-common/x11-common/etc/X11/default.xmodmap new file mode 100644 index 0000000000..05a13fa3c8 --- /dev/null +++ b/meta/packages/x11-common/x11-common/etc/X11/default.xmodmap | |||
| @@ -0,0 +1,260 @@ | |||
| 1 | keycode 8 = | ||
| 2 | keycode 9 = Escape | ||
| 3 | keycode 10 = 1 exclam | ||
| 4 | keycode 11 = 2 at | ||
| 5 | keycode 12 = 3 numbersign | ||
| 6 | keycode 13 = 4 dollar | ||
| 7 | keycode 14 = 5 percent | ||
| 8 | keycode 15 = 6 asciicircum | ||
| 9 | keycode 16 = 7 ampersand braceleft | ||
| 10 | keycode 17 = 8 asterisk bracketleft | ||
| 11 | keycode 18 = 9 parenleft bracketright | ||
| 12 | keycode 19 = 0 parenright braceright | ||
| 13 | keycode 20 = minus underscore backslash | ||
| 14 | keycode 21 = equal plus | ||
| 15 | keycode 22 = BackSpace | ||
| 16 | keycode 23 = Tab | ||
| 17 | keycode 24 = q Q q | ||
| 18 | keycode 25 = w W w | ||
| 19 | keycode 26 = e E | ||
| 20 | keycode 27 = r R r | ||
| 21 | keycode 28 = t T t | ||
| 22 | keycode 29 = y Y y | ||
| 23 | keycode 30 = u U u | ||
| 24 | keycode 31 = i I i | ||
| 25 | keycode 32 = o O o | ||
| 26 | keycode 33 = p P p | ||
| 27 | keycode 34 = bracketleft braceleft | ||
| 28 | keycode 35 = bracketright braceright asciitilde | ||
| 29 | keycode 36 = Return | ||
| 30 | keycode 37 = Control_L | ||
| 31 | keycode 38 = a A | ||
| 32 | keycode 39 = s S s | ||
| 33 | keycode 40 = d D | ||
| 34 | keycode 41 = f F | ||
| 35 | keycode 42 = g G g | ||
| 36 | keycode 43 = h H h | ||
| 37 | keycode 44 = j J j | ||
| 38 | keycode 45 = k K k | ||
| 39 | keycode 46 = l L l | ||
| 40 | keycode 47 = semicolon colon | ||
| 41 | keycode 48 = apostrophe quotedbl | ||
| 42 | keycode 49 = grave asciitilde | ||
| 43 | keycode 50 = Shift_L | ||
| 44 | keycode 51 = backslash bar | ||
| 45 | keycode 52 = z Z z | ||
| 46 | keycode 53 = x X x | ||
| 47 | keycode 54 = c C | ||
| 48 | keycode 55 = v V v | ||
| 49 | keycode 56 = b B | ||
| 50 | keycode 57 = n N n | ||
| 51 | keycode 58 = m M m | ||
| 52 | keycode 59 = comma less | ||
| 53 | keycode 60 = period greater | ||
| 54 | keycode 61 = slash question | ||
| 55 | keycode 62 = Shift_R | ||
| 56 | keycode 63 = KP_Multiply | ||
| 57 | keycode 64 = Alt_L | ||
| 58 | keycode 65 = space | ||
| 59 | keycode 66 = Caps_Lock | ||
| 60 | keycode 67 = F1 F11 | ||
| 61 | keycode 68 = F2 F12 | ||
| 62 | keycode 69 = F3 F13 | ||
| 63 | keycode 70 = F4 F14 | ||
| 64 | keycode 71 = F5 F15 | ||
| 65 | keycode 72 = F6 F16 | ||
| 66 | keycode 73 = F7 F17 | ||
| 67 | keycode 74 = F8 F18 | ||
| 68 | keycode 75 = F9 F19 | ||
| 69 | keycode 76 = F10 F20 | ||
| 70 | keycode 77 = Num_Lock | ||
| 71 | keycode 78 = Scroll_Lock | ||
| 72 | keycode 79 = KP_7 | ||
| 73 | keycode 80 = KP_8 | ||
| 74 | keycode 81 = KP_9 | ||
| 75 | keycode 82 = KP_Subtract | ||
| 76 | keycode 83 = KP_4 | ||
| 77 | keycode 84 = KP_5 | ||
| 78 | keycode 85 = KP_6 | ||
| 79 | keycode 86 = KP_Add | ||
| 80 | keycode 87 = KP_1 | ||
| 81 | keycode 88 = KP_2 | ||
| 82 | keycode 89 = KP_3 | ||
| 83 | keycode 90 = KP_0 | ||
| 84 | keycode 91 = KP_Decimal | ||
| 85 | keycode 92 = | ||
| 86 | keycode 93 = | ||
| 87 | keycode 94 = less greater bar | ||
| 88 | keycode 95 = F11 | ||
| 89 | keycode 96 = F12 | ||
| 90 | keycode 97 = | ||
| 91 | keycode 98 = | ||
| 92 | keycode 99 = | ||
| 93 | keycode 100 = | ||
| 94 | keycode 101 = | ||
| 95 | keycode 102 = | ||
| 96 | keycode 103 = | ||
| 97 | keycode 104 = KP_Enter | ||
| 98 | keycode 105 = Control_R | ||
| 99 | keycode 106 = KP_Divide | ||
| 100 | keycode 107 = | ||
| 101 | keycode 108 = Mode_switch | ||
| 102 | keycode 109 = Break | ||
| 103 | keycode 110 = Home | ||
| 104 | keycode 111 = Up | ||
| 105 | keycode 112 = Prior | ||
| 106 | keycode 113 = Left | ||
| 107 | keycode 114 = Right | ||
| 108 | keycode 115 = End | ||
| 109 | keycode 116 = Down | ||
| 110 | keycode 117 = Next | ||
| 111 | keycode 118 = Insert | ||
| 112 | keycode 119 = Delete | ||
| 113 | keycode 120 = Menu | ||
| 114 | keycode 121 = F13 | ||
| 115 | keycode 122 = F14 | ||
| 116 | keycode 123 = Help | ||
| 117 | keycode 124 = Execute | ||
| 118 | keycode 125 = F17 | ||
| 119 | keycode 126 = KP_Subtract | ||
| 120 | keycode 127 = Pause | ||
| 121 | keycode 128 = | ||
| 122 | keycode 129 = | ||
| 123 | keycode 130 = | ||
| 124 | keycode 131 = | ||
| 125 | keycode 132 = | ||
| 126 | keycode 133 = | ||
| 127 | keycode 134 = | ||
| 128 | keycode 135 = | ||
| 129 | keycode 136 = | ||
| 130 | keycode 137 = | ||
| 131 | keycode 138 = | ||
| 132 | keycode 139 = | ||
| 133 | keycode 140 = | ||
| 134 | keycode 141 = | ||
| 135 | keycode 142 = | ||
| 136 | keycode 143 = | ||
| 137 | keycode 144 = | ||
| 138 | keycode 145 = | ||
| 139 | keycode 146 = | ||
| 140 | keycode 147 = | ||
| 141 | keycode 148 = | ||
| 142 | keycode 149 = | ||
| 143 | keycode 150 = | ||
| 144 | keycode 151 = | ||
| 145 | keycode 152 = | ||
| 146 | keycode 153 = | ||
| 147 | keycode 154 = | ||
| 148 | keycode 155 = | ||
| 149 | keycode 156 = | ||
| 150 | keycode 157 = | ||
| 151 | keycode 158 = | ||
| 152 | keycode 159 = | ||
| 153 | keycode 160 = | ||
| 154 | keycode 161 = | ||
| 155 | keycode 162 = | ||
| 156 | keycode 163 = | ||
| 157 | keycode 164 = | ||
| 158 | keycode 165 = | ||
| 159 | keycode 166 = | ||
| 160 | keycode 167 = | ||
| 161 | keycode 168 = | ||
| 162 | keycode 169 = | ||
| 163 | keycode 170 = | ||
| 164 | keycode 171 = | ||
| 165 | keycode 172 = | ||
| 166 | keycode 173 = | ||
| 167 | keycode 174 = | ||
| 168 | keycode 175 = | ||
| 169 | keycode 176 = | ||
| 170 | keycode 177 = | ||
| 171 | keycode 178 = | ||
| 172 | keycode 179 = | ||
| 173 | keycode 180 = | ||
| 174 | keycode 181 = | ||
| 175 | keycode 182 = | ||
| 176 | keycode 183 = | ||
| 177 | keycode 184 = | ||
| 178 | keycode 185 = | ||
| 179 | keycode 186 = | ||
| 180 | keycode 187 = | ||
| 181 | keycode 188 = | ||
| 182 | keycode 189 = | ||
| 183 | keycode 190 = | ||
| 184 | keycode 191 = | ||
| 185 | keycode 192 = | ||
| 186 | keycode 193 = | ||
| 187 | keycode 194 = | ||
| 188 | keycode 195 = | ||
| 189 | keycode 196 = | ||
| 190 | keycode 197 = | ||
| 191 | keycode 198 = | ||
| 192 | keycode 199 = | ||
| 193 | keycode 200 = | ||
| 194 | keycode 201 = | ||
| 195 | keycode 202 = | ||
| 196 | keycode 203 = | ||
| 197 | keycode 204 = | ||
| 198 | keycode 205 = | ||
| 199 | keycode 206 = | ||
| 200 | keycode 207 = | ||
| 201 | keycode 208 = | ||
| 202 | keycode 209 = | ||
| 203 | keycode 210 = | ||
| 204 | keycode 211 = | ||
| 205 | keycode 212 = | ||
| 206 | keycode 213 = | ||
| 207 | keycode 214 = | ||
| 208 | keycode 215 = | ||
| 209 | keycode 216 = | ||
| 210 | keycode 217 = | ||
| 211 | keycode 218 = | ||
| 212 | keycode 219 = | ||
| 213 | keycode 220 = | ||
| 214 | keycode 221 = | ||
| 215 | keycode 222 = | ||
| 216 | keycode 223 = | ||
| 217 | keycode 224 = | ||
| 218 | keycode 225 = | ||
| 219 | keycode 226 = | ||
| 220 | keycode 227 = | ||
| 221 | keycode 228 = | ||
| 222 | keycode 229 = | ||
| 223 | keycode 230 = | ||
| 224 | keycode 231 = | ||
| 225 | keycode 232 = | ||
| 226 | keycode 233 = | ||
| 227 | keycode 234 = | ||
| 228 | keycode 235 = | ||
| 229 | keycode 236 = | ||
| 230 | keycode 237 = | ||
| 231 | keycode 238 = | ||
| 232 | keycode 239 = | ||
| 233 | keycode 240 = | ||
| 234 | keycode 241 = | ||
| 235 | keycode 242 = | ||
| 236 | keycode 243 = | ||
| 237 | keycode 244 = | ||
| 238 | keycode 245 = | ||
| 239 | keycode 246 = | ||
| 240 | keycode 247 = | ||
| 241 | keycode 248 = | ||
| 242 | keycode 249 = | ||
| 243 | keycode 250 = | ||
| 244 | keycode 251 = | ||
| 245 | keycode 252 = | ||
| 246 | keycode 253 = | ||
| 247 | keycode 254 = | ||
| 248 | |||
| 249 | add shift = Shift_L | ||
| 250 | add shift = Shift_R | ||
| 251 | add shift = Menu | ||
| 252 | add lock = Caps_Lock | ||
| 253 | add control = Control_L | ||
| 254 | add control = Control_R | ||
| 255 | add mod1 = Alt_L | ||
| 256 | add mod2 = Num_Lock | ||
| 257 | !mod3 | ||
| 258 | add mod4 = Mode_switch | ||
| 259 | !mod5 | ||
| 260 | |||
diff --git a/meta/packages/x11-common/x11-common_0.1.bb b/meta/packages/x11-common/x11-common_0.1.bb new file mode 100644 index 0000000000..a4cef9c49a --- /dev/null +++ b/meta/packages/x11-common/x11-common_0.1.bb | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | DESCRIPTION = "Common X11 scripts" | ||
| 2 | LICENSE = "GPL" | ||
| 3 | SECTION = "x11" | ||
| 4 | RDEPENDS_${PN} = "xmodmap xdpyinfo xtscal xinit formfactor" | ||
| 5 | PR = "r34" | ||
| 6 | |||
| 7 | SRC_URI = "file://etc" | ||
| 8 | S = ${WORKDIR} | ||
| 9 | |||
| 10 | PACKAGE_ARCH = "all" | ||
| 11 | |||
| 12 | do_install() { | ||
| 13 | cp -R ${S}/etc ${D}/etc | ||
| 14 | chmod -R 755 ${D}/etc | ||
| 15 | find ${D}/etc -type d -name .svn -prune -exec rm -rf {} \; | ||
| 16 | find ${D}/etc -type f -name \*~ -exec rm -rf {} \; | ||
| 17 | } | ||
diff --git a/meta/packages/x11-common/xserver-nodm-init.bb b/meta/packages/x11-common/xserver-nodm-init.bb new file mode 100644 index 0000000000..46cb164a51 --- /dev/null +++ b/meta/packages/x11-common/xserver-nodm-init.bb | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | DESCRIPTION = "Simple Xserver Init Script (no dm)" | ||
| 2 | LICENSE = "GPL" | ||
| 3 | SECTION = "x11" | ||
| 4 | PRIORITY = "optional" | ||
| 5 | PR = "r17" | ||
| 6 | RDEPENDS = "dbus-wait" | ||
| 7 | |||
| 8 | SRC_URI = "file://xserver-nodm" | ||
| 9 | S = ${WORKDIR} | ||
| 10 | |||
| 11 | PACKAGE_ARCH = "all" | ||
| 12 | |||
| 13 | do_install() { | ||
| 14 | install -d ${D}/etc | ||
| 15 | install -d ${D}/etc/init.d | ||
| 16 | install xserver-nodm ${D}/etc/init.d | ||
| 17 | } | ||
| 18 | |||
| 19 | inherit update-rc.d | ||
| 20 | |||
| 21 | INITSCRIPT_NAME = "xserver-nodm" | ||
| 22 | INITSCRIPT_PARAMS = "start 9 5 2 . stop 20 0 1 6 ." | ||
diff --git a/meta/packages/x11-common/xserver-nodm-init/xserver-nodm b/meta/packages/x11-common/xserver-nodm-init/xserver-nodm new file mode 100755 index 0000000000..f6399fc1fa --- /dev/null +++ b/meta/packages/x11-common/xserver-nodm-init/xserver-nodm | |||
| @@ -0,0 +1,51 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | # | ||
| 3 | ### BEGIN INIT INFO | ||
| 4 | # Provides: xserver | ||
| 5 | # Required-Start: $local_fs $remote_fs dbus | ||
| 6 | # Required-Stop: $local_fs $remote_fs | ||
| 7 | # Default-Start: 2 3 4 5 | ||
| 8 | # Default-Stop: 0 1 6 | ||
| 9 | ### END INIT INFO | ||
| 10 | |||
| 11 | killproc() { # kill the named process(es) | ||
| 12 | pid=`/bin/pidof $1` | ||
| 13 | [ "$pid" != "" ] && kill $pid | ||
| 14 | } | ||
| 15 | |||
| 16 | read CMDLINE < /proc/cmdline | ||
| 17 | for x in $CMDLINE; do | ||
| 18 | case $x in | ||
| 19 | x11=false) | ||
| 20 | echo "X Server disabled" | ||
| 21 | exit 0; | ||
| 22 | ;; | ||
| 23 | esac | ||
| 24 | done | ||
| 25 | |||
| 26 | case "$1" in | ||
| 27 | start) | ||
| 28 | . /etc/profile | ||
| 29 | echo "Starting Xserver" | ||
| 30 | /etc/X11/Xserver & | ||
| 31 | # Wait for the desktop to say its finished loading | ||
| 32 | dbus-wait org.matchbox_project.desktop Loaded | ||
| 33 | ;; | ||
| 34 | |||
| 35 | stop) | ||
| 36 | echo "Stopping XServer" | ||
| 37 | killproc xinit | ||
| 38 | ;; | ||
| 39 | |||
| 40 | restart) | ||
| 41 | $0 stop | ||
| 42 | sleep 1 | ||
| 43 | $0 start | ||
| 44 | ;; | ||
| 45 | |||
| 46 | *) | ||
| 47 | echo "usage: $0 { start | stop | restart }" | ||
| 48 | ;; | ||
| 49 | esac | ||
| 50 | |||
| 51 | exit 0 | ||
