summaryrefslogtreecommitdiffstats
path: root/build_tools/l7/larch0/profiles/xmini/rootoverlay/etc/X11
diff options
context:
space:
mode:
Diffstat (limited to 'build_tools/l7/larch0/profiles/xmini/rootoverlay/etc/X11')
-rw-r--r--build_tools/l7/larch0/profiles/xmini/rootoverlay/etc/X11/xinit/startx.custom18
-rw-r--r--build_tools/l7/larch0/profiles/xmini/rootoverlay/etc/X11/xinit/xinitrc.custom10
-rwxr-xr-xbuild_tools/l7/larch0/profiles/xmini/rootoverlay/etc/X11/xinit/xorg.conf.set9
-rw-r--r--build_tools/l7/larch0/profiles/xmini/rootoverlay/etc/X11/xorg.conf.base44
4 files changed, 81 insertions, 0 deletions
diff --git a/build_tools/l7/larch0/profiles/xmini/rootoverlay/etc/X11/xinit/startx.custom b/build_tools/l7/larch0/profiles/xmini/rootoverlay/etc/X11/xinit/startx.custom
new file mode 100644
index 0000000..d24a70a
--- /dev/null
+++ b/build_tools/l7/larch0/profiles/xmini/rootoverlay/etc/X11/xinit/startx.custom
@@ -0,0 +1,18 @@
+if [ -z "$DISPLAY" ] && [ ! -f /tmp/_nox_ ] \
+ && echo $(tty) | grep "tty1" &>/dev/null; then
+ startx
+
+ # Maybe there should be some code here to handle a failed startx?
+
+ # The 'return' value is at /tmp/xlogout
+ # If there is nothing there, switch user to 'newuser'
+ # If there is also nothing there, login as root
+ # - if already root, fall through to terminal
+
+ if [ -f /tmp/xlogout ] || [ -f /tmp/newuser ]; then
+ logout
+ elif [ ${UID} -ne 0 ]; then
+ echo "root" >/tmp/newuser
+ logout
+ fi
+fi
diff --git a/build_tools/l7/larch0/profiles/xmini/rootoverlay/etc/X11/xinit/xinitrc.custom b/build_tools/l7/larch0/profiles/xmini/rootoverlay/etc/X11/xinit/xinitrc.custom
new file mode 100644
index 0000000..fe443d8
--- /dev/null
+++ b/build_tools/l7/larch0/profiles/xmini/rootoverlay/etc/X11/xinit/xinitrc.custom
@@ -0,0 +1,10 @@
+case ${desktop} in
+ xfce ) exec ck-launch-session xfce4-session ;;
+
+# Now these are only wild guesses!
+ gnome ) exec ck-launch-session gnome-session ;;
+
+ kde ) exec ck-launch-session startkde ;;
+
+ * ) ;;
+esac
diff --git a/build_tools/l7/larch0/profiles/xmini/rootoverlay/etc/X11/xinit/xorg.conf.set b/build_tools/l7/larch0/profiles/xmini/rootoverlay/etc/X11/xinit/xorg.conf.set
new file mode 100755
index 0000000..4430264
--- /dev/null
+++ b/build_tools/l7/larch0/profiles/xmini/rootoverlay/etc/X11/xinit/xorg.conf.set
@@ -0,0 +1,9 @@
+#!/bin/sh
+if [ -f /etc/X11/xorg.conf.base ]; then
+ cp -f /etc/X11/xorg.conf.base /etc/X11/xorg.conf
+ for x in $(cat /proc/cmdline); do
+ [ "${x}" = "nox" ] && :> /tmp/_nox_
+ [ "${x}" = "xvesa" ] && sed 's|^#xvesa||' -i /etc/X11/xorg.conf
+ [ "${x}" = "nodri" ] && sed 's|^#nodri||' -i /etc/X11/xorg.conf
+ done
+fi
diff --git a/build_tools/l7/larch0/profiles/xmini/rootoverlay/etc/X11/xorg.conf.base b/build_tools/l7/larch0/profiles/xmini/rootoverlay/etc/X11/xorg.conf.base
new file mode 100644
index 0000000..f6f6c0e
--- /dev/null
+++ b/build_tools/l7/larch0/profiles/xmini/rootoverlay/etc/X11/xorg.conf.base
@@ -0,0 +1,44 @@
+#Section "ServerFlags"
+# # This deactivates input device hotplugging
+# Option "AutoAddDevices" "False"
+#EndSection
+
+Section "InputDevice"
+ Identifier "Generic Keyboard"
+ Driver "kbd"
+ Option "XkbRules" "xorg"
+##XKMAP+
+# Option "XkbModel" "pc101"
+# Option "XkbLayout" "de"
+##XKMAP-
+EndSection
+
+Section "InputDevice"
+ Identifier "Configured Mouse"
+ Driver "mouse"
+EndSection
+
+Section "Device"
+ Identifier "Configured Video Device"
+#xvesa Driver "vesa"
+#nodri Option "DRI" "False"
+# Option "AccelMethod" "exa"
+EndSection
+
+Section "Monitor"
+ Identifier "Configured Monitor"
+# Option "PreferredMode" "1024x768"
+# HorizSync 30.0 - 65.0
+# VertRefresh 50.0 - 75.0
+EndSection
+
+Section "Screen"
+ Identifier "Default Screen"
+ Monitor "Configured Monitor"
+# DefaultDepth 16
+# SubSection "Display"
+# Viewport 0 0
+# Depth 16
+# Modes "1024x768" "800x600"
+# EndSubSection
+EndSection