Skip to content

Commit 4ac6955

Browse files
committed
vglgenkey: Abort if DISPLAY env variable is unset
In an XDMCP environment, a separate instance of the display manager is launched in a remote display session. Depending on the system, this may cause the display manager startup script to be invoked with the DISPLAY environment variable unset. If this occurred, vglgenkey preemptively removed /etc/opt/VirtualGL/vgl_xauth_key, but there was no way for xauth to generate a new key. Thus, effectively the xauth key generated for the "root" display manager was clobbered by the instance of the display manager launched in the remote display session.
1 parent 5f67738 commit 4ac6955

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

server/vglgenkey

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11
#!/bin/sh
2+
3+
# Abort if the DISPLAY environment variable is unset, which may be the case if
4+
# the display manager is launched in a remote display session via XDMCP.
5+
# Otherwise this script will clobber the existing xauth key with no possibility
6+
# of regenerating it.
7+
if [ -z "$DISPLAY" ]; then
8+
exit 0
9+
fi
10+
211
XAUTH=xauth
312
if [ -x /usr/X11R6/bin/xauth ]; then
413
XAUTH=/usr/X11R6/bin/xauth

0 commit comments

Comments
 (0)