Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 602172 - x11-misc/virtualgl-2.4.1-r3: race condition when first setting Xauthority
Summary: x11-misc/virtualgl-2.4.1-r3: race condition when first setting Xauthority
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal with 2 votes (vote)
Assignee: Pacho Ramos
URL:
Whiteboard:
Keywords: NeedPatch
Depends on:
Blocks:
 
Reported: 2016-12-09 16:16 UTC by Stefano
Modified: 2023-06-28 09:42 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefano 2016-12-09 16:16:41 UTC
When vgl is invoked the first time, apparently a race condition does not allow it to correctly set Xauthority.

When ran a second time, it works flawlessly.

Apparently, a "sleep 1" before 
xauth -f /var/lib/VirtualGL/vgl_xauth_key add $DISPLAY . $(xauth -f $XAUTHORITY list | awk '{print $3;exit}') && \                                                                                                                                         
chmod 644 /var/lib/VirtualGL/vgl_xauth_key

Fixes the race and makes the init script work reliably every time, but I hope there is a better fix :-)

Reproducible: Always
Comment 1 Sam Jorna (wraeth) gentoo-dev 2016-12-13 02:03:07 UTC
Is this only when using with SDDM?
Comment 2 Stefano 2016-12-13 11:21:44 UTC
It happened only with SDDM, but I cannot tell whether it is specific.
Comment 3 Pacho Ramos gentoo-dev 2020-11-29 11:41:28 UTC
is this still happening with 2.6.x versions?
Comment 4 Stefano 2020-11-30 09:11:08 UTC
Indeed it is. My solution however was to stop using it.
Comment 5 Francois Chenier 2023-06-28 09:42:51 UTC
A better way would be to create a soft link to the server $XAUTHORITY file and delete the soft link when the service stop

BTW for sddm v.0.20 the new way of detecting the $XAUTHORITY file (in /etc/conf.d/vgl) is 

XAUTHORITY=$(find /run/sddm/ 2>/dev/null | tail -n1)

The common case that should work in almost all environments doesn't work for the latest sddm.