-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Session doesn't start on debian 11 if XAUTHORITY is set #2417
Comments
I'm mostly sure to have tested the code with the usage of the variable, when I wrotten it: But now the session doesn't start and this shouldn't happen. |
OK - I've had a look into this, and tried to reconstruct what has happened. Please check my reasoning and tell me what I've got wrong. Your original PR to add XAUTHORITY support was #545 and this got merged for v0.9.1. Looking at the code, the X server is started at these lines and following:- Lines 656 to 697 in 93c55e5
env_set_user() is the function which switches the context to the user:- Lines 85 to 214 in 93c55e5
In there the environment is obtained from some hard-coded variables, and also from any settings in Your code then checks for XAUTHORITY and creates the authorization file if appropriate before starting the X server. There doesn't seem to be any way that this value can be obtained from Is that maybe what you're thinking of? As I said it's fairly complex and I may not have spotted something. Please let me know what you think. |
BTW I agree we should probably get this working in some way. LightDM has a setting to either use the system default, or to generate a LightDM-specific file:- From a quick look, that code runs as root so it can set up the directories(?). It then passes the filename over a pipe to the process which runs as the user so the file can be created in a user context. |
I wasn't aware of the I prefer not to rely on root code to create some directories, mainly for security reason, no root, no problem :). And being root is no more sufficient for creating directories: with nfs4/krb5, even root cannot create directories in the $HOME of the user (and it's my setup at work). I prefer to rely on sysadmin to get a reliable storage for the Xauth file. I'll have more time this weekend to debug this issue. |
The On my Ubuntu22.04 system, the communication you refer to above happens in /etc/X11/Xsession.d/20dbus_xdg-runtime when the session is being started. Hope that's useful. It's clearly important for the X server, the session and chansrv to share the same setting! We could do worse than emulate the LightDM functionality I think, and generate a file under /run or /var/run only accessible to the user. It's more secure than having a file available on persistent storage, and (potentially) over NFS for some configurations. |
Hello, With some background, the |
debian 11, set XAUTHORITY in /etc/profile to /tmp/.Xauth.$USER
session doesn't start . comment the XAUTHORITY -> session start
The text was updated successfully, but these errors were encountered: