Hello,

the /usr/bin/x2gostartagent script does not sufficiently specify the
location of $XAUTHORITY file for the xauth command, while the command
line for starting x2goagent refers to a specific location
$HOME/.Xauthority.

Usually, this works, because if nothing is specified on the command
line for xauth and the $XAUTHORITY variable is not defined, it falls
back to $HOME/.Xauthority.

Nonetheless, recent GDM versions set XAUTHORITY
to /var/run/gdm/auth-for-$USER-blabla/database.

As a result, when opening a shadow session as another
user, /usr/bin/x2gostartagent adds the cookie to $XAUTHORITY
(/var/run/gdm...) and then starts x2goagent -auth $HOME/.Xauthority,
which fails obviously.


The attached patch removes the -f $HOME/.Xauthority parameter from the
x2goagent command line to resolve the problem. It also removes a
redundant '-S' parameter (there is already $SESSION_TYPE there).

Can users of other distributions or display managers test if it does not
break something else? (It works on Arch Linux with GDM and Xfce.)

Regards,

Milan

-- 
http://www.milan-knizek.net/
About linux and photography (Czech only)
O linuxu a fotografování
>From 3cf225cc17cf9b3fd0ce72b921bdfa73dfa9b82c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Milan=20Kn=C3=AD=C5=BEek?= <[email protected]>
Date: Wed, 15 Feb 2012 21:00:17 +0100
Subject: [PATCH] Remove '-auth ~/.Xauthority' and redundant '-S' parameters
 from x2goagent command line.

---
 x2goserver/bin/x2gostartagent |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/x2goserver/bin/x2gostartagent b/x2goserver/bin/x2gostartagent
index 3b802b4..31af841 100755
--- a/x2goserver/bin/x2gostartagent
+++ b/x2goserver/bin/x2gostartagent
@@ -240,9 +240,9 @@ x2gofeature X2GO_RUN_EXTENSIONS &>/dev/null && x2goserver-run-extensions $SESSIO
 SESSION_WINDOW_TITLE="X2GO-${SESSION_NAME}"
 
 if  [ "$X2GO_STYPE" == "S" ]; then
-	x2goagent $X2GODPIOPTION_  -$SESSION_TYPE -auth ~/.Xauthority -S -shadow $SHADOW_DESKTOP -shadowmode $SHADOW_MODE -geometry ${X2GO_GEOMETRY} -name "${SESSION_WINDOW_TITLE}"  ${NX_AGENT} 2>${SESSION_DIR}/session.log &
+	x2goagent $X2GODPIOPTION_  -$SESSION_TYPE -shadow $SHADOW_DESKTOP -shadowmode $SHADOW_MODE -geometry ${X2GO_GEOMETRY} -name "${SESSION_WINDOW_TITLE}"  ${NX_AGENT} 2>${SESSION_DIR}/session.log &
 else
-	x2goagent $X2GODPIOPTION_ $XDMCPOPT  -$SESSION_TYPE -auth ~/.Xauthority -geometry ${X2GO_GEOMETRY} -name "${SESSION_WINDOW_TITLE}"  ${NX_AGENT} 2>${SESSION_DIR}/session.log &
+	x2goagent $X2GODPIOPTION_ $XDMCPOPT  -$SESSION_TYPE -geometry ${X2GO_GEOMETRY} -name "${SESSION_WINDOW_TITLE}"  ${NX_AGENT} 2>${SESSION_DIR}/session.log &
 fi
 
 
-- 
1.7.9.1

_______________________________________________
X2Go-Dev mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/x2go-dev

Reply via email to