diff --git a/x11/apps/xinit/files/xinit.confd b/x11/apps/xinit/files/xinit.confd index 13f3e6af..1b68464c 100644 --- a/x11/apps/xinit/files/xinit.confd +++ b/x11/apps/xinit/files/xinit.confd @@ -2,3 +2,5 @@ ## X11 autologin service ## Target user name (default=root) #USER=root +## Target dpy number +#DISPLAY=:0 diff --git a/x11/apps/xinit/files/xinit.initd b/x11/apps/xinit/files/xinit.initd index f3fd1896..7e2e5246 100644 --- a/x11/apps/xinit/files/xinit.initd +++ b/x11/apps/xinit/files/xinit.initd @@ -5,12 +5,15 @@ description="X11 autologin service" supervisor="supervise-daemon" pidfile="/var/run/xinit.pid" command="/etc/X11/xinit/xserverrc" -command_args=":0" +command_args="$DISPLAY" start_pre(){ + if [ "$DISPLAY" == "" ] ; then + DISPLAY=:0 + fi while sleep 0.3 ; do - if env DISPLAY=:0 xterm -bg "#000000" -e true 2>/dev/null ; then - su - "$USER" -c "env DISPLAY=:0 /etc/X11/xinit/xinitrc" + if env DISPLAY=$DISPLAY xterm -bg "#000000" -e true 2>/dev/null ; then + su - "$USER" -c "env DISPLAY=$DISPLAY /etc/X11/xinit/xinitrc" fi done & } diff --git a/x11/apps/xinit/ympbuild b/x11/apps/xinit/ympbuild index 71bb893c..c52f4450 100644 --- a/x11/apps/xinit/ympbuild +++ b/x11/apps/xinit/ympbuild @@ -15,7 +15,7 @@ source=("https://gitlab.freedesktop.org/xorg/app/xinit/-/archive/xinit-$version/ "files/xinit.confd" "files/xinit.initd" ) -depends=(util-macros xorgproto libX11 xorg-server) +depends=(util-macros xorgproto libX11 xorg-server xterm) makedepends=() md5sums=('0855364c1c869679300d55e9dd57e2aa' 'SKIP'