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

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}"