You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to run the Heroic Games Launcher (which is an Electron application and is wrapped using buildFHSEnvBubblewrap in NixOS), but it returns an error:
Authorization required, but no authorization protocol specified
[74969:0405/130128.036942:ERROR:ozone_platform_x11.cc(240)] Missing X server or $DISPLAY
[74969:0405/130128.036952:ERROR:env.cc(255)] The platform failed to initialize. Exiting
Which I suspect is related to Xauth, because the $DISPLAY env var is definitely set in my terminal.
I think this is what causes it:
I enabled user-authority-in-system-dir in LightDM to try and clean up my $HOME directory. This option makes LightDM start the X11 server with the .Xauthority file in /run/lightdm/<username>/xauthority rather than $HOME/.Xauthority, which is also reflected in the XAUTHORITY env variable.
I suspect that the bubblewrap env does not expose /run/lightdm, so Electron doesn't find the .Xauthority file and doesn't even try to connect to the X11 display. I kind of confirmed this by copying /run/lightdm/<username>/xauthority to ~/.Xauthority and started heroic with XAUTHORITY=~/.Xauthority heroic, which worked.
I see that there's already a fix for SDDM which places XAUTHORITY in /tmp. Would it be possible to also fix the situation where XAUTHORITY is in /run?
Describe the bug
I tried to run the Heroic Games Launcher (which is an Electron application and is wrapped using
buildFHSEnvBubblewrap
in NixOS), but it returns an error:Which I suspect is related to Xauth, because the
$DISPLAY
env var is definitely set in my terminal.I think this is what causes it:
I enabled
user-authority-in-system-dir
in LightDM to try and clean up my$HOME
directory. This option makes LightDM start the X11 server with the.Xauthority
file in/run/lightdm/<username>/xauthority
rather than$HOME/.Xauthority
, which is also reflected in theXAUTHORITY
env variable.I suspect that the bubblewrap env does not expose
/run/lightdm
, so Electron doesn't find the.Xauthority
file and doesn't even try to connect to the X11 display. I kind of confirmed this by copying/run/lightdm/<username>/xauthority
to~/.Xauthority
and started heroic withXAUTHORITY=~/.Xauthority heroic
, which worked.I see that there's already a fix for SDDM which places XAUTHORITY in
/tmp
. Would it be possible to also fix the situation where XAUTHORITY is in/run
?https://github.com/NixOS/nixpkgs/blob/master/pkgs/build-support/build-fhsenv-bubblewrap/default.nix#L209
Steps To Reproduce
Steps to reproduce the behavior:
user-authority-in-system-dir
in lightdm config:heroic
Expected behavior
Heroic Games Launcher connects to the X11 server using the Xauthority file in
/run/lightdm/<username>/xauthority
.Notify maintainers
Metadata
Add a 👍 reaction to issues you find important.
The text was updated successfully, but these errors were encountered: