summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/mini-x-session
diff options
context:
space:
mode:
authorZhai Edwin <edwin.zhai@intel.com>2011-12-21 15:16:31 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-01-03 12:12:38 +0000
commit4d13ca960a1abb836196c2f894838fdc87b2e581 (patch)
tree1875d52068628539cc81fdd4d31c77a11778ee78 /meta/recipes-graphics/mini-x-session
parentdc27861b1d02fbf50e446dca316e9c3cd25035c6 (diff)
downloadpoky-4d13ca960a1abb836196c2f894838fdc87b2e581.tar.gz
mini-x-session: Add this recipe as the session file for mini X
mini-x-session runs session files on behalf of file owner, so that no rootless X required. (From OE-Core rev: 43c2d366622ea52cba8a5b727d723c8ec30bd44b) Signed-off-by: Zhai Edwin <edwin.zhai@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-graphics/mini-x-session')
-rw-r--r--meta/recipes-graphics/mini-x-session/files/mini-x-session32
-rw-r--r--meta/recipes-graphics/mini-x-session/mini-x-session_0.1.bb24
2 files changed, 56 insertions, 0 deletions
diff --git a/meta/recipes-graphics/mini-x-session/files/mini-x-session b/meta/recipes-graphics/mini-x-session/files/mini-x-session
new file mode 100644
index 0000000000..1940e27872
--- /dev/null
+++ b/meta/recipes-graphics/mini-x-session/files/mini-x-session
@@ -0,0 +1,32 @@
1#!/bin/sh
2#
3# Very simple session manager for Mini X
4#
5
6# Uncomment below to enable parsing of debian menu entrys
7# export MB_USE_DEB_MENUS=1
8
9if [ -e $HOME/.mini_x/session ]
10then
11exec $HOME/.mini_x/session
12fi
13
14if [ -e /etc/mini_x/session ]
15then
16exec /etc/mini_x/session
17fi
18
19MINI_X_SESSION_DIR=/etc/mini_x/session.d
20
21# Execute session file on behalf of file owner
22for SESSIONFILE in $MINI_X_SESSION_DIR/*; do
23 set +e
24 USERNAME=`stat -c %U $SESSIONFILE`
25 sudo -b -i -u $USERNAME $SESSIONFILE&
26 set -e
27done
28# Default files to run if $HOME/.mini_x/session or /etc/mini_x/session
29# dont exist.
30
31matchbox-terminal&
32exec matchbox-window-manager
diff --git a/meta/recipes-graphics/mini-x-session/mini-x-session_0.1.bb b/meta/recipes-graphics/mini-x-session/mini-x-session_0.1.bb
new file mode 100644
index 0000000000..3818d16a3d
--- /dev/null
+++ b/meta/recipes-graphics/mini-x-session/mini-x-session_0.1.bb
@@ -0,0 +1,24 @@
1DESCRIPTION = "Mini X session files for poky"
2HOMEPAGE = "http://www.yoctoproject.org"
3BUGTRACKER = "http://bugzilla.pokylinux.org"
4
5LICENSE = "GPLv2"
6LIC_FILES_CHKSUM = "file://mini-x-session;endline=5;md5=b6430bffbcf05f9760e72938826b7487"
7
8SECTION = "x11"
9RCONFLICTS = "matchbox-common"
10
11SRC_URI = "file://mini-x-session"
12S = "${WORKDIR}"
13
14inherit update-alternatives
15
16ALTERNATIVE_NAME = "x-session-manager"
17ALTERNATIVE_LINK = "${bindir}/x-session-manager"
18ALTERNATIVE_PATH = "${bindir}/mini-x-session"
19ALTERNATIVE_PRIORITY = "10"
20
21do_install() {
22 install -d ${D}/${bindir}
23 install -m 0755 ${S}/mini-x-session ${D}/${bindir}
24}