summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--user/xinit/06_move_serverauthfile_into_tmp.patch20
-rw-r--r--user/xinit/APKBUILD54
-rw-r--r--user/xinit/Xsession55
-rw-r--r--user/xinit/xinitrc55
-rw-r--r--user/xinit/xserverrc2
-rw-r--r--user/xinit/xsession.skel10
6 files changed, 196 insertions, 0 deletions
diff --git a/user/xinit/06_move_serverauthfile_into_tmp.patch b/user/xinit/06_move_serverauthfile_into_tmp.patch
new file mode 100644
index 000000000..99e8a6754
--- /dev/null
+++ b/user/xinit/06_move_serverauthfile_into_tmp.patch
@@ -0,0 +1,20 @@
+Move startx auth files in /tmp so they are removed on reboot.
+http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=357736
+The trap patch didn't seem to work on reboot.
+---
+ startx.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: xinit/startx.cpp
+===================================================================
+--- xinit.orig/startx.cpp
++++ xinit/startx.cpp
+@@ -273,7 +273,7 @@
+ dummy=0
+
+ XCOMM create a file with auth information for the server. ':0' is a dummy.
+- xserverauthfile=$HOME/.serverauth.$$
++ xserverauthfile=`mktemp -p /tmp serverauth.XXXXXXXXXX`
+ trap "rm -f '$xserverauthfile'" HUP INT QUIT ILL TRAP KILL BUS TERM
+ xauth -q -f "$xserverauthfile" << EOF
+ add :$dummy . $mcookie
diff --git a/user/xinit/APKBUILD b/user/xinit/APKBUILD
new file mode 100644
index 000000000..5c81ba261
--- /dev/null
+++ b/user/xinit/APKBUILD
@@ -0,0 +1,54 @@
+# Maintainer: A. Wilcox <awilfox@adelielinux.org>
+pkgname=xinit
+pkgver=1.4.0
+pkgrel=0
+pkgdesc="X.Org initialisation program"
+url="https://www.X.Org/"
+arch="all"
+license="X11"
+subpackages="$pkgname-doc"
+depends="cmd:mcookie cmd:xauth cmd:xmodmap cmd:xrdb"
+makedepends="libx11-dev util-macros"
+source="https://www.X.Org/releases/individual/app/xinit-$pkgver.tar.bz2
+ 06_move_serverauthfile_into_tmp.patch
+ xinitrc
+ xsession.skel
+ Xsession
+ xserverrc"
+
+build() {
+ cd "$builddir"
+ ./configure \
+ --build=$CBUILD \
+ --host=$CHOST \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --localstatedir=/var \
+ --with-xinitdir=/etc/X11/xinit
+ make
+}
+
+check() {
+ cd "$builddir"
+ make check
+}
+
+package() {
+ cd "$builddir"
+ make DESTDIR="$pkgdir" install
+ chmod +x "$pkgdir"/usr/bin/startx
+ install -m755 -d "$pkgdir"/etc/skel
+ install -m755 -D "$srcdir"/xinitrc "$pkgdir"/etc/X11/xinit/xinitrc
+ install -m755 -D "$srcdir"/Xsession "$pkgdir"/etc/X11/xinit/Xsession
+ install -m755 "$srcdir"/xsession.skel "$pkgdir"/etc/skel/.xsession
+ install -m755 "$srcdir"/xserverrc "$pkgdir"/etc/X11/xinit/xserverrc
+ mkdir -p "$pkgdir"/etc/X11/xinit/xinitrc.d
+}
+
+sha512sums="53a29081130c1e195eb441ee77ccaa044b18b4cca3d2d5da3a6d67aa421dfd9718fa18b6be6232a41e40cf260c8190064c4d8d9ab771177bd5cd12e77a8fa79e xinit-1.4.0.tar.bz2
+2296c10a5d74bff42d9642a4787dc3f2b77492fc81174af48dc88cd3c8fa49c7f70147b790d8c82c2df6c910d9d412965999e7a342ca28697a97b5d522669edd 06_move_serverauthfile_into_tmp.patch
+1b19f800d1f64e49b533929ea6b9580d6dc24b680e1461edcc5784ba9fbb387fef57576b1e3d4bc67cb0ff2b248b670c148a3c7a350e1062bb9b95e9a2ba7805 xinitrc
+448bc6c7987a4735b6584e307cd5c53092b1a338043293f5f110d11818dd1b80508401a3b6f09525c82a16a88f293b37011d8ca112460b0f95d26897e3e0619e xsession.skel
+b311032a751bb21d6c49ffe1dfc67beb577b5d5bec4a4c12612c4c0f9b9d6d2a07f7435c7d2fe9ab4c318546ee0cb9d4ff3f7ef908e756a818da529e913e667d Xsession
+f86d96d76bcb340021e7904925f0029f8662e4dfc32489198b3a8695dca069da496539e2287249c763fe9c4d8d5d591fd18fe49a0bee822cbbd0eb712efbb89b xserverrc"
diff --git a/user/xinit/Xsession b/user/xinit/Xsession
new file mode 100644
index 000000000..6b9403fd4
--- /dev/null
+++ b/user/xinit/Xsession
@@ -0,0 +1,55 @@
+#!/bin/sh
+#
+# X session wrapper
+
+echo "Running X session wrapper"
+
+# Load profile
+for file in /etc/profile "$HOME/.profile" /etc/xprofile "$HOME/.xprofile"; do
+ if [ -f "$file" ]; then
+ echo "Loading profile from $file";
+ . "$file"
+ fi
+done
+
+# Load resources
+for file in /etc/X11/Xresources "$HOME/.Xresources"; do
+ if [ -f "$file" ]; then
+ echo "Loading resource: $file"
+ xrdb -nocpp -merge "$file"
+ fi
+done
+
+# Load keymaps
+use_xkbmap=false
+for file in "/etc/X11/Xkbmap" "$HOME/.Xkbmap"; do
+ if [ -f "$file" ]; then
+ echo "Loading keymap: $file"
+ setxkbmap `cat "$file"` && use_xkbmap=true
+ fi
+done
+
+# Load xmodmap if not using XKB
+if ! $use_xkbmap; then
+ for file in "/etc/X11/Xmodmap" "$HOME/.Xmodmap"; do
+ if [ -f "$file" ]; then
+ echo "Loading modmap: $file"
+ xmodmap "$file"
+ fi
+ done
+fi
+
+# Run all system xinitrc shell scripts.
+xinitdir="/etc/X11/xinit/xinitrc.d"
+if [ -d "$xinitdir" ]; then
+ for script in $xinitdir/*; do
+ echo "Loading xinit script $script"
+ if [ -x "$script" -a ! -d "$script" ]; then
+ . "$script"
+ fi
+ done
+fi
+
+echo "X session wrapper complete, running session $@"
+
+exec $@
diff --git a/user/xinit/xinitrc b/user/xinit/xinitrc
new file mode 100644
index 000000000..7cb000966
--- /dev/null
+++ b/user/xinit/xinitrc
@@ -0,0 +1,55 @@
+#!/bin/sh
+# $Xorg: xinitrc.cpp,v 1.3 2000/08/17 19:54:30 cpqbld Exp $
+
+userresources=$HOME/.Xresources
+usermodmap=$HOME/.Xmodmap
+xinitdir=/etc/X11
+sysresources=$xinitdir/Xresources
+sysmodmap=$xinitdir/Xmodmap
+
+# merge in defaults and keymaps
+
+if [ -f $sysresources ]; then
+ xrdb -merge $sysresources
+fi
+
+if [ -f $sysmodmap ]; then
+ xmodmap $sysmodmap
+fi
+
+if [ -f $userresources ]; then
+ xrdb -merge $userresources
+fi
+
+if [ -f $usermodmap ]; then
+ xmodmap $usermodmap
+fi
+
+# First try ~/.xinitrc
+if [ -f "$HOME/.xinitrc" ]; then
+ XINITRC="$HOME/.xinitrc"
+ if [ -x $XINITRC ]; then
+ # if the x bit is set on .xinitrc
+ # it means the xinitrc is not a
+ # shell script but something else
+ exec $XINITRC "$@"
+ else
+ exec /bin/sh "$HOME/.xinitrc" "$@"
+ fi
+fi
+
+if [ -d /etc/X11/xinit/xinitrc.d ] ; then
+ for f in /etc/X11/xinit/xinitrc.d/?* ; do
+ [ -x "$f" ] && . "$f"
+ done
+ unset f
+fi
+
+# If not present, try the system default
+exec startkde
+
+# Fall back to LXQt
+exec startlxqt
+
+# Start only terminal as last resort
+exec konsole || exec qterminal || exec urxvt || exec xterm
diff --git a/user/xinit/xserverrc b/user/xinit/xserverrc
new file mode 100644
index 000000000..b4de25287
--- /dev/null
+++ b/user/xinit/xserverrc
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec /usr/bin/X -nolisten tcp "$@"
diff --git a/user/xinit/xsession.skel b/user/xinit/xsession.skel
new file mode 100644
index 000000000..819c248cd
--- /dev/null
+++ b/user/xinit/xsession.skel
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+#
+# ~/.xsession
+#
+# Executed by xdm/gdm/kdm at login
+#
+
+/bin/sh -l ~/.xinitrc
+