Skip to content

Commit

Permalink
Simplify unify-xauth invocation logic during install
Browse files Browse the repository at this point in the history
Ignore whether ~/.Xauthority-allhosts file already present
  • Loading branch information
sakaki- committed Oct 18, 2019
1 parent e79fd9e commit 9b03f2e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ postinst() {
# graphical apps will work immediately
if U="$(who | grep '(:0)' | cut -d' ' -f1 | head -n1)" && [[ ! -z "${U}" ]]; then
UXA="/home/${U}/.Xauthority"
if [[ -s "${UXA}" && ! -s "${UXA}-allhosts" ]]; then
if [[ -s "${UXA}" ]]; then
su --login "${U}" -c "XAUTHORITY=${UXA} DISPLAY=:0 unify-xauth" &>/dev/null || true
fi
fi
Expand Down

0 comments on commit 9b03f2e

Please sign in to comment.