> It fails with NIS users and local users. On the working and non-working machine,
> I try with a local user and both $HOME are set as follows:
> echo $HOME
> /home/localguy

That's normal. When you did the plain xauth/nxagent tests I requested a few
mails ago, did you test with a NIS user?

I tested with both, same results. 

I've seen something non-standard i 
there, namely:
>  xauth
> Using authority file /u/erdos/myuser/.Xauthority

This suggests that the X authority file is set via the XAUTHORITY variable (echo
$XAUTHORITY) to a path that isn't located relative to $HOME but lives on a
remote server, that likely can be reached via NFS. This probably makes sense in
your setup, since that way you can provide a global Xauthority file for users
that is "shared" between all machines users log in, but could also be
problematic for X2Go/NX.

The server that works, that's where the NFS share is mounted. The workstation that fails, it uses the mounted NFS share from the server that works.
 
I haven't asked for that yet, I guess, but it might be interesting to see what
the nxagent server process actually logged. On the server side, ~/.x2go/C-*
should contain a session.log file.

Here it is from where I used the latest nightly build DMG from a Mac:

cat session.log 


running as X2Go Agent


NXAGENT - Version 3.5.99.7


Copyright (c) 2001, 2011 NoMachine (http://www.nomachine.com)

Copyright (c) 2008-2014 Oleksandr Shneyder <o.shneyder@phoca-gmbh.de>

Copyright (c) 2011-2016 Mike Gabriel <mike.gabriel@das-netzwerkteam.de>

Copyright (c) 2014-2016 Ulrich Sibiller <uli42@gmx.de>

Copyright (c) 2014-2016 Mihai Moldovan <ionic@ionic.de>

Copyright (c) 2015-2016 Qindel Group (http://www.qindel.com)

See https://github.com/ArcticaProject/nx-libs for more information.


Info: Agent running with pid '6482'.

Session: Starting session at 'Fri Oct 27 16:33:34 2017'.

Info: Proxy running in client mode with pid '6482'.

Warning: Unrecognized session type 'unix-kde-depth_32'. Assuming agent session.

Info: Waiting for connection from 'localhost' on socket 'tcp:*:41900'.

Info: Accepted connection from '127.0.0.1'.

Info: Connection with remote proxy completed.

Info: Using ADSL link parameters 512/24/1/0.

Info: Using agent parameters 5000/10/50/0/0.

Info: Using cache parameters 4/4096KB/8192KB/8192KB.

Info: Using pack method '16m-jpeg-9' with session 'unix-kde-depth_32'.

Info: Using ZLIB data compression 1/1/32.

Info: Using ZLIB stream compression 4/4.

Info: No suitable cache file found.

Info: Listening to X11 connections on display ':137'.

Error: Aborting session with 'Unable to open display 'nx/nx,options=/tmp/.x2go-localguy/C-localguy-137-1509136412_stDXFCE_dp32/options:137''.

Session: Aborting session at 'Fri Oct 27 16:33:36 2017'.

Session: Session aborted at 'Fri Oct 27 16:33:36 2017'.

Warning: Signals were not blocked in process with pid '6482'.

Info: Your session has died before reaching an usable state.

Info: This can be due to the remote X server refusing access to the client.

Info: Please check the authorization provided by your X application.

Info: Waiting the cleanup timeout to complete.


And here's the debug log from the nightly build client:

/Applications/x2goclient.app/Contents/MacOS/x2goclient --debug

x2go-INFO-1> "Starting X2Go Client..."

x2go-WARNING-1> English language requested, not loading translator.

x2go-WARNING-1> English language requested, not loading translator.

x2go-INFO-3> "Started X2Go Client."

x2go-DEBUG-../src/onmainwindow.cpp:546> "$HOME=/Users/me"

x2go-DEBUG-../src/onmainwindow.cpp:2365> Reading 4 sessions from config file.

x2go-DEBUG-../src/sessionbutton.cpp:341> Creating QPixmap with session icon: ":/img/icons/128x128/x2gosession.png".

x2go-DEBUG-../src/sessionbutton.cpp:341> Creating QPixmap with session icon: ":/img/icons/128x128/x2gosession.png".

x2go-DEBUG-../src/sessionbutton.cpp:341> Creating QPixmap with session icon: ":/img/icons/128x128/x2gosession.png".

x2go-DEBUG-../src/sessionbutton.cpp:341> Creating QPixmap with session icon: ":/img/icons/128x128/x2gosession.png".

x2go-DEBUG-../src/onmainwindow.cpp:12992> libssh not initialized yet. Initializing.

x2go-DEBUG-../src/x2goutils.cpp:219> path value at beginning: "/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin"

x2go-DEBUG-../src/x2goutils.cpp:242> tmp_clean_add: ("/usr/local/bin") 

x2go-DEBUG-../src/x2goutils.cpp:270> clean_add: ("/usr/local/bin") 

x2go-DEBUG-../src/x2goutils.cpp:291> found entry i (0) in orig_path_list ("/usr/local/bin"): true

x2go-DEBUG-../src/x2goutils.cpp:309> return value at end: "/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin"

x2go-DEBUG-../src/x2goutils.cpp:219> path value at beginning: "/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin"

x2go-DEBUG-../src/x2goutils.cpp:242> tmp_clean_add: ("/opt/local//bin") 

x2go-DEBUG-../src/x2goutils.cpp:270> clean_add: ("/opt/local//bin") 

x2go-DEBUG-../src/x2goutils.cpp:291> found entry i (0) in orig_path_list ("/opt/local//bin"): false

x2go-DEBUG-../src/x2goutils.cpp:309> return value at end: "/opt/local//bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin"

x2go-DEBUG-../src/pulsemanager.cpp:131> Found PA binary as "/Applications/x2goclient.app/Contents/exe/pulseaudio"

x2go-DEBUG-../src/pulsemanager.cpp:132> Corresponding working dir: "/Applications/x2goclient.app/Contents/exe"

x2go-DEBUG-../src/pulsemanager.cpp:369> pulseaudio --version returned:"pulseaudio 10.0-rebootstrapped

"

x2go-DEBUG-../src/pulsemanager.cpp:227> pulse started with arguments ("--exit-idle-time=-1", "-n", "-F", "/Users/rkudyba/.x2go/pulse/config.pa", "-p", "/Applications/x2goclient.app/Contents/Frameworks/pulse-10.0/modules", "--high-priority", "--log-level=debug", "--verbose", "--log-target=file:/Users/rkudyba/.x2go/pulse/pulse.log") - waiting for it to finish... 

x2go-DEBUG-../src/onmainwindow.cpp:2851> Creating QPixmap with session icon: '":/img/icons/128x128/x2gosession.png"'.

x2go-DEBUG-../src/onmainwindow.cpp:6532> Setting focus.

x2go-INFO-8> "Starting connection to server: sobolev.dsm.fordham.edu:22"

x2go-DEBUG-../src/onmainwindow.cpp:2952> Starting new ssh connection to server:"sobolev.dsm.fordham.edu":"22" krbLogin: false

x2go-DEBUG-../src/sshmasterconnection.cpp:175> SshMasterConnection, host "sobolev.dsm.fordham.edu"; port 22; user "localguy"; useproxy false; proxyserver ""; proxyport 22

x2go-DEBUG-../src/sshmasterconnection.cpp:248> Starting SSH connection without Kerberos authentication.

x2go-DEBUG-../src/sshmasterconnection.cpp:252> SshMasterConnection, instance SshMasterConnection(0x7fc04a4f8fe0)  created. 

x2go-DEBUG-../src/sshmasterconnection.cpp:520> SshMasterConnection, instance SshMasterConnection(0x7fc04a4f8fe0)  entering thread. 

x2go-DEBUG-../src/sshmasterconnection.cpp:831> Session port before config file parse: 22

x2go-DEBUG-../src/sshmasterconnection.cpp:841> Session port after config file parse: 22

x2go-DEBUG-../src/sshmasterconnection.cpp:906> Session port before config file parse (part 2): 22

x2go-DEBUG-../src/sshmasterconnection.cpp:916> Session port after config file parse (part 2): 22

x2go-DEBUG-../src/sshmasterconnection.cpp:941> cserverAuth

x2go-DEBUG-../src/sshmasterconnection.cpp:982> state: 1

x2go-DEBUG-../src/sshmasterconnection.cpp:1263> Challenge authentication failed. Trying password mechanism if available.

x2go-DEBUG-../src/sshmasterconnection.cpp:1269> Password mechanism available. Continuing.

x2go-DEBUG-../src/sshmasterconnection.cpp:1273> Password authentication requested.

x2go-DEBUG-../src/sshmasterconnection.cpp:723> User authentication OK.

x2go-DEBUG-../src/sshmasterconnection.cpp:1740> LOGIN CHECK:"LOGIN OK

"

x2go-DEBUG-../src/sshmasterconnection.cpp:1743> don't have interaction

x2go-DEBUG-../src/sshmasterconnection.cpp:1776> LOOP FINISHED

x2go-DEBUG-../src/sshmasterconnection.cpp:1780> No interaction needed, continue session

x2go-DEBUG-../src/sshmasterconnection.cpp:727> Login Check - OK

x2go-DEBUG-../src/onmainwindow.cpp:3056> SSH connection established.

x2go-DEBUG-../src/onmainwindow.cpp:3450> Continue normal X2Go session

x2go-DEBUG-../src/sshprocess.cpp:199> Executing remote command via SshProcess object 0: "export HOSTNAME && x2golistsessions"

x2go-DEBUG-../src/sshprocess.cpp:213> this=SshProcess(0x7fc04a705a50)  Running masterCon->addChannelConnection(this, ' "7347b893-bbd9-4a0b-80ed-10434b7d57da" ', ' "bash -l -c 'echo "X2GODATABEGIN:7347b893-bbd9-4a0b-80ed-10434b7d57da"; export PATH="/usr/local/bin:/usr/bin:/bin";export TERM="dumb"; export HOSTNAME && x2golistsessions; echo "X2GODATAEND:7347b893-bb" '); 

x2go-DEBUG-../src/sshmasterconnection.cpp:1842> Locking SSH channel connection MUTEX.

x2go-DEBUG-../src/sshmasterconnection.cpp:1844> Passing new channel connection object to channelConnections.

x2go-DEBUG-../src/sshmasterconnection.cpp:1846> Unlocking SSH channel connection MUTEX.

x2go-DEBUG-../src/sshmasterconnection.cpp:2034> Creating new channel.

x2go-DEBUG-../src/sshmasterconnection.cpp:2051> New channel:0x7fc04a47e560

x2go-DEBUG-../src/sshmasterconnection.cpp:2136> Executing remote: "bash -l -c 'echo "X2GODATABEGIN:7347b893-bbd9-4a0b-80ed-10434b7d57da"; export PATH="/usr/local/bin:/usr/bin:/bin";export TERM="dumb"; export HOSTNAME && x2golistsessions; echo "X2GODATAEND:7347b893-bbd9-4a0b-80ed-10434b7d57da";'"

x2go-DEBUG-../src/sshmasterconnection.cpp:2159> New exec channel created.

x2go-DEBUG-../src/sshmasterconnection.cpp:2263> EOF on channel 0x7fc04a47e560; SshProcess object: 0

x2go-DEBUG-../src/sshmasterconnection.cpp:2331> EOF sent.

x2go-DEBUG-../src/sshmasterconnection.cpp:2335> Channel closed.

x2go-DEBUG-../src/sshprocess.cpp:526> SSH finished: raw output (stdout): "X2GODATABEGIN:7347b893-bbd9-4a0b-80ed-10434b7d57da

X2GODATAEND:7347b893-bbd9-4a0b-80ed-10434b7d57da

"

x2go-DEBUG-../src/sshprocess.cpp:537> SSH finished: true - "" (0).

x2go-DEBUG-../src/onmainwindow.cpp:3918> ""

x2go-DEBUG-../src/onmainwindow.cpp:4478> Executing remote command: "X2GODPI=72 x2gostartagent 800x600 adsl 16m-jpeg-9 unix-kde-depth_32 us query 0 D XFCE both"

x2go-DEBUG-../src/sshprocess.cpp:199> Executing remote command via SshProcess object 1: "X2GODPI=72 x2gostartagent 800x600 adsl 16m-jpeg-9 unix-kde-depth_32 us query 0 D XFCE both"

x2go-DEBUG-../src/sshprocess.cpp:213> this=SshProcess(0x7fc04a4e4070)  Running masterCon->addChannelConnection(this, ' "68797105-6355-4f38-85a2-d3abd0e3be27" ', ' "bash -l -c 'echo "X2GODATABEGIN:68797105-6355-4f38-85a2-d3abd0e3be27"; export PATH="/usr/local/bin:/usr/bin:/bin";export TERM="dumb"; X2GODPI=72 x2gostartagent 800x600 adsl 16m-jpeg-9 unix-kde-depth_3" '); 

x2go-DEBUG-../src/sshmasterconnection.cpp:1842> Locking SSH channel connection MUTEX.

x2go-DEBUG-../src/sshmasterconnection.cpp:1844> Passing new channel connection object to channelConnections.

x2go-DEBUG-../src/sshmasterconnection.cpp:1846> Unlocking SSH channel connection MUTEX.

x2go-DEBUG-../src/sshmasterconnection.cpp:2034> Creating new channel.

x2go-DEBUG-../src/sshmasterconnection.cpp:2051> New channel:0x7fc04a6ed370

x2go-DEBUG-../src/sshmasterconnection.cpp:2136> Executing remote: "bash -l -c 'echo "X2GODATABEGIN:68797105-6355-4f38-85a2-d3abd0e3be27"; export PATH="/usr/local/bin:/usr/bin:/bin";export TERM="dumb"; X2GODPI=72 x2gostartagent 800x600 adsl 16m-jpeg-9 unix-kde-depth_32 us query 0 D XFCE both; echo "X2GODATAEND:68797105-6355-4f38-85a2-d3abd0e3be27";'"

x2go-DEBUG-../src/sshmasterconnection.cpp:2159> New exec channel created.

x2go-DEBUG-../src/sshmasterconnection.cpp:2208> EOF on channel 0x7fc04a6ed370; SshProcess object: 1

x2go-DEBUG-../src/sshmasterconnection.cpp:2331> EOF sent.

x2go-DEBUG-../src/sshmasterconnection.cpp:2335> Channel closed.

x2go-DEBUG-../src/sshprocess.cpp:526> SSH finished: raw output (stdout): "X2GODATABEGIN:68797105-6355-4f38-85a2-d3abd0e3be27

154

8654c4b0bf16fb6a7159c0100d50fb8b

14946

localguy-154-1509815156_stDXFCE_dp32

49132

49133

49134

X2GODATAEND:68797105-6355-4f38-85a2-d3abd0e3be27

"

x2go-DEBUG-../src/sshprocess.cpp:537> SSH finished: true - "154

8654c4b0bf16fb6a7159c0100d50fb8b

14946

localguy-154-1509815156_stDXFCE_dp32

49132

49133

49134

" (1).

x2go-DEBUG-../src/onmainwindow.cpp:5297> Agent output: "154

8654c4b0bf16fb6a7159c0100d50fb8b

14946

localguy-154-1509815156_stDXFCE_dp32

49132

49133

49134

"

x2go-DEBUG-../src/sshprocess.cpp:381> Starting tunnel via SshProcess object 2: "localhost":49132 -> "localhost":50132

x2go-DEBUG-../src/onmainwindow.cpp:5900> "Starting NX proxy, command: "/Applications/x2goclient.app/Contents/exe/"nxproxy -S nx/nx,options=/Users/rkudyba/.x2go/S-localguy-154-1509815156_stDXFCE_dp32/options:154"

x2go-DEBUG-../src/sshprocess.cpp:157> Direct tunnel: waiting for connections on "localhost":50132

x2go-DEBUG-../src/onmainwindow.cpp:6372> Proxy wrote on stderr: "

"

x2go-DEBUG-../src/onmainwindow.cpp:6372> Proxy wrote on stderr: "NXPROXY - Version 3.5.0

Copyright (C) 2001, 2010 NoMachine.

See http://www.nomachine.com/ for more information.

Info: Proxy running in client mode with pid '34904'.

Session: Starting session at '"

x2go-DEBUG-../src/onmainwindow.cpp:6372> Proxy wrote on stderr: "S"

x2go-DEBUG-../src/onmainwindow.cpp:6372> Proxy wrote on stderr: "a"

x2go-DEBUG-../src/onmainwindow.cpp:6372> Proxy wrote on stderr: "t Nov  4 13:06:03 2017'.

"

x2go-DEBUG-../src/onmainwindow.cpp:6372> Proxy wrote on stderr: "I"

x2go-DEBUG-../src/onmainwindow.cpp:6372> Proxy wrote on stderr: "nfo: Connecting to remote host 'localhost:"

x2go-DEBUG-../src/onmainwindow.cpp:6372> Proxy wrote on stderr: "50132'.

"

x2go-DEBUG-../src/onmainwindow.cpp:6372> Proxy wrote on stderr: "Info: Connection to remote proxy 'localhost:50132' established.

"

x2go-DEBUG-../src/sshprocess.cpp:109> New TCP connection.

x2go-DEBUG-../src/sshprocess.cpp:114> New socket: 27

x2go-DEBUG-../src/sshmasterconnection.cpp:2034> Creating new channel.

x2go-DEBUG-../src/sshmasterconnection.cpp:2051> New channel:0x7fc04a426580

x2go-DEBUG-../src/sshmasterconnection.cpp:2057> Forwarding parameters: from remote ("localhost":49132) to local ("localhost":49394)

x2go-DEBUG-../src/sshmasterconnection.cpp:2094> Temporary session port after config file parse: 49132

x2go-DEBUG-../src/sshmasterconnection.cpp:2098> Temporary session host after config file parse: localhost

x2go-DEBUG-../src/sshmasterconnection.cpp:2128> New channel forwarded.

x2go-DEBUG-../src/onmainwindow.cpp:6372> Proxy wrote on stderr: "Info: Connection with remote proxy completed.

"

x2go-DEBUG-../src/onmainwindow.cpp:6372> Proxy wrote on stderr: "Warning: Unrecognized session type 'unix-kde-depth_32'. Assuming agent session.

"

x2go-DEBUG-../src/onmainwindow.cpp:6372> Proxy wrote on stderr: "I"

x2go-DEBUG-../src/onmainwindow.cpp:6372> Proxy wrote on stderr: "nfo: Using ADSL link parameters 512/24/1/0.

Info: Using cache parameters 4/4096KB/8192KB/8192KB.

Info: Using pack method '16m-jpeg-9' with session 'unix-kde-depth_32'.

Info: Using ZLIB data compression 1/1/32.

Info: Using ZLIB stream compression 4/4.

Info: No suitable cache file found.

Info: Forwarding X11 connections to display '/private/tmp/com.apple.launchd.XQbZF46YQZ/org.macosforge.xquartz:0'.

Session: Session started at 'Sat Nov  4 13:06:03 2017'.

"

x2go-DEBUG-../src/onmainwindow.cpp:6372> Proxy wrote on stderr: "Warning: Protocol mismatch or no X authentication data.

"

x2go-DEBUG-../src/onmainwindow.cpp:6372> Proxy wrote on stderr: "Session: Terminating session at 'Sat Nov  4 13:06:07 2017'.

Info"

x2go-DEBUG-../src/onmainwindow.cpp:6372> Proxy wrote on stderr: ": Your session was closed before reaching a usable state.

Info: This can be due to the local X server refusing access to the client.

Info: Please check authorization provided by the remote X application.

Session: Session terminated at 'Sat Nov  4 13:06:07 2017'.

"

x2go-DEBUG-../src/sshmasterconnection.cpp:2312> Socket 27 closed.

x2go-DEBUG-../src/sshmasterconnection.cpp:2331> EOF sent.

x2go-DEBUG-../src/sshmasterconnection.cpp:2335> Channel closed.

x2go-DEBUG-../src/onmainwindow.cpp:6225> Deleting Proxy.

x2go-DEBUG-../src/onmainwindow.cpp:6274> Waiting for proxy to exit.

x2go-DEBUG-../src/onmainwindow.cpp:6298> Checking exit status.

x2go-DEBUG-../src/sshprocess.cpp:199> Executing remote command via SshProcess object 3: "x2gocmdexitmessage localguy-154-1509815156_stDXFCE_dp32"

x2go-DEBUG-../src/sshprocess.cpp:213> this=SshProcess(0x7fc04a466d40)  Running masterCon->addChannelConnection(this, ' "9d651d45-a0a2-433e-b23a-4fc47df29eb9" ', ' "bash -l -c 'echo "X2GODATABEGIN:9d651d45-a0a2-433e-b23a-4fc47df29eb9"; export PATH="/usr/local/bin:/usr/bin:/bin";export TERM="dumb"; x2gocmdexitmessage localguy-154-1509815156_stDXFCE_dp32; echo "X2G" '); 

x2go-DEBUG-../src/sshmasterconnection.cpp:1842> Locking SSH channel connection MUTEX.

x2go-DEBUG-../src/sshmasterconnection.cpp:1844> Passing new channel connection object to channelConnections.

x2go-DEBUG-../src/sshmasterconnection.cpp:1846> Unlocking SSH channel connection MUTEX.

x2go-DEBUG-../src/sshmasterconnection.cpp:2034> Creating new channel.

x2go-DEBUG-../src/sshmasterconnection.cpp:2051> New channel:0x7fc04a7772f0

x2go-DEBUG-../src/sshmasterconnection.cpp:2136> Executing remote: "bash -l -c 'echo "X2GODATABEGIN:9d651d45-a0a2-433e-b23a-4fc47df29eb9"; export PATH="/usr/local/bin:/usr/bin:/bin";export TERM="dumb"; x2gocmdexitmessage localguy-154-1509815156_stDXFCE_dp32; echo "X2GODATAEND:9d651d45-a0a2-433e-b23a-4fc47df29eb9";'"

x2go-DEBUG-../src/onmainwindow.cpp:6355> Finished proxy.

x2go-DEBUG-../src/sshmasterconnection.cpp:2159> New exec channel created.

x2go-DEBUG-../src/sshmasterconnection.cpp:2208> EOF on channel 0x7fc04a7772f0; SshProcess object: 3

x2go-DEBUG-../src/sshmasterconnection.cpp:2331> EOF sent.

x2go-DEBUG-../src/sshmasterconnection.cpp:2335> Channel closed.

x2go-DEBUG-../src/sshprocess.cpp:526> SSH finished: raw output (stdout): "X2GODATABEGIN:9d651d45-a0a2-433e-b23a-4fc47df29eb9

X2GODATAEND:9d651d45-a0a2-433e-b23a-4fc47df29eb9

"

x2go-DEBUG-../src/sshprocess.cpp:537> SSH finished: true - "" (3).

x2go-DEBUG-../src/onmainwindow.cpp:9749> "Command message: "

x2go-DEBUG-../src/sshmasterconnection.cpp:793> SshMasterConnection, instance SshMasterConnection(0x7fc04a4f8fe0)  waiting for thread to finish. 

x2go-DEBUG-../src/sshmasterconnection.cpp:1953> Disconnecting ...

x2go-DEBUG-../src/sshmasterconnection.cpp:1964> Deleting channel connections.

x2go-DEBUG-../src/sshmasterconnection.cpp:1972> Disconnecting session.

x2go-DEBUG-../src/sshmasterconnection.cpp:1978> Deleting sockets.

x2go-DEBUG-../src/sshmasterconnection.cpp:1985> All channels closed and session disconnected. Quitting session loop.

x2go-DEBUG-../src/sshmasterconnection.cpp:797> SshMasterConnection, instance SshMasterConnection(0x7fc04a4f8fe0)  thread finished. 

x2go-DEBUG-../src/sshprocess.cpp:52> SshProcess destructor called.

x2go-DEBUG-../src/sshprocess.cpp:52> SshProcess destructor called.

x2go-DEBUG-../src/sshprocess.cpp:52> SshProcess destructor called.

x2go-DEBUG-../src/sshprocess.cpp:52> SshProcess destructor called.

x2go-DEBUG-../src/sshmasterconnection.cpp:804> SshMasterConnection, instance SshMasterConnection(0x7fc04a4f8fe0)  finished destructor. 

x2go-DEBUG-../src/onmainwindow.cpp:6532> Setting focus.