aboutsummaryrefslogtreecommitdiff
path: root/sv/x/run
blob: ca33a20bfe97d92163a4cc216f96f7fa0af7439b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh

exec 2>&1

export DISPLAY="${DISPLAY:-:0}"
export XAUTHORITY="${XAUTHORITY:-~/.Xauthority}"

mcookie=$(/usr/bin/mcookie)
xserverauthfile=$(mktemp -p /tmp serverauth.XXXXXXXXXX)

xauth -q -f "$xserverauthfile" add "$DISPLAY" . "$mcookie"
xauth -q add "$DISPLAY" . "$mcookie"

exec xinit "${PWD}/xinit" -- /etc/X11/xinit/xserverrc "$DISPLAY" -noreset -auth "${xserverauthfile}"
# exec /usr/bin/Xorg "$DISPLAY" -nolisten tcp -noreset -verbose 2 "vt7"