dtlogin: the session keeps the user's Xauthority
SetUserAuthorization() writes ~/.Xauthority for the user (and sets XAUTHORITY itself when it has to use the fallback file), but the session environment then named the server's auth file -- 0600 root, unreadable for the user. dtsession could not open the display and dtlogin went back to the greeter (measured 2026-11-18; dtsession runs fine when XAUTHORITY names ~/.Xauthority).
This commit is contained in:
1 parent
1f2b96e8c2
commit
21de6b6edd
1 file changed
+8
-2
@@ -1911,8 +1911,14 @@ RunGreeter( struct display *d, struct greet_info *greet,
|
||||
if (errorLogFile && errorLogFile[0])
|
||||
env = setEnv(env, ERRORLOG, errorLogFile);
|
||||
|
||||
if (d->authFile)
|
||||
env = setEnv(env, "XAUTHORITY", d->authFile);
|
||||
/*
|
||||
* MCDE: no XAUTHORITY here. The session runs as the user and its
|
||||
* cookie is in ~/.Xauthority, which SetUserAuthorization() wrote
|
||||
* (auth.c). Pointing the session at the server's file -- 0600 root
|
||||
* -- made every client of the session fail to read a cookie: dtsession
|
||||
* exited and dtlogin showed the greeter again (measured 2026-11-18).
|
||||
* The fallback path of SetUserAuthorization sets XAUTHORITY itself.
|
||||
*/
|
||||
|
||||
if (d->dtlite)
|
||||
env = setEnv(env, DTLITE, "True");
|
||||
|
||||
Reference in new issue
Block a user