Files
binary-repo/x11/apps/xinit/files/xinit.initd
T
2023-03-15 14:07:02 +00:00

31 lines
609 B
Plaintext

#!/sbin/openrc-run
name="xinit"
description="X11 autologin service"
supervisor="supervise-daemon"
pidfile="/var/run/xinit.pid"
command="/etc/X11/xinit/xserverrc"
if [ "$DISPLAY" == "" ] ; then
command_args=":0"
else
command_args="$DISPLAY"
fi
start_pre(){
if [ "$DISPLAY" == "" ] ; then
DISPLAY=:0
fi
while sleep 0.3 ; do
if env DISPLAY=$DISPLAY xterm -bg "#000000" -e true 2>/dev/null ; then
exec su - "$USER" -c "env DISPLAY=$DISPLAY /etc/X11/xinit/xinitrc"
fi
done &
}
depend()
{
need dbus
provide gui display-manager getty
}