Lately since I upgraded Xorg 6.9 to Xorg 7.0, I haven't been able to connect to my remote Debian desktop.
I did some search and found this FAQ useful.
Basically, you can control various logging settings:
NX_LOG_LEVEL controls the verbosity of the server-wide log, and writes into $NX_LOGFILE (/var/log/nxserver.log).
SESSION_LOG_CLEAN controls logging per session.
For my case, I'm interested in the file that looks like $HOME/.nx/C-flitwick-1000-0EA46F7909B37E30229E34D2444139DE/session.
Examing that file I found this fatal error:
Fatal server error:
could not open default font 'fixed'
You can either use the solution on that FAQ I cited, or use my solution:
AGENT_FONT_SERVER="unix/:7100"
Some other useful tips:
1. Set NODE_AUTOSTART to run executable.
2. /usr/lib/nxagent always looks for XKB and RGB information under the directory /usr/X11R6/lib/X11/, which has moved since Xorg 7.
This path can't be reconfigured, so I had to copy files from /usr/share/X11/.
3. Make sure no errors occur after you change "node.conf", by running "/usr/lib/nx/nxloadconfig --check".
4. Always select network connection as MODEM, to maximize compression.