From ebfd2ec9a4f222ba2f57e10a5bd79753bccec785 Mon Sep 17 00:00:00 2001 From: aliriza Date: Wed, 15 Mar 2023 14:07:02 +0000 Subject: [PATCH] dpy number options --- x11/apps/xinit/files/xinit.initd | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/x11/apps/xinit/files/xinit.initd b/x11/apps/xinit/files/xinit.initd index 7e2e5246..90e47d46 100644 --- a/x11/apps/xinit/files/xinit.initd +++ b/x11/apps/xinit/files/xinit.initd @@ -5,7 +5,11 @@ description="X11 autologin service" supervisor="supervise-daemon" pidfile="/var/run/xinit.pid" command="/etc/X11/xinit/xserverrc" -command_args="$DISPLAY" +if [ "$DISPLAY" == "" ] ; then + command_args=":0" +else + command_args="$DISPLAY" +fi start_pre(){ if [ "$DISPLAY" == "" ] ; then @@ -13,7 +17,7 @@ start_pre(){ fi while sleep 0.3 ; do if env DISPLAY=$DISPLAY xterm -bg "#000000" -e true 2>/dev/null ; then - su - "$USER" -c "env DISPLAY=$DISPLAY /etc/X11/xinit/xinitrc" + exec su - "$USER" -c "env DISPLAY=$DISPLAY /etc/X11/xinit/xinitrc" fi done & }