X2Go Server Debugging
If you want to track down problems with the x2goserver or the cups-x2go code, it is possible to enable output of debug information into the systems syslog facility (normally /var/log/syslog).
The default log levels for x2goserver and cups-x2go are set to notice. Available log levels are: emerg, crit, alert, err, warning, notice, info, debug.
Log File Watching
While testing your X2Go server, you can open another terminal on the server and watch the syslog file:
root@x2goserver:~$ tail -f /var/log/syslog | grep x2go
Debugging x2goserver
The x2goserver log level can be set by editing:
root@x2goserver:~$ editor /etc/x2go/x2goserver.conf
Debugging cups-x2go
For debugging cups-x2go there are two files to look at:
/var/log/cups/error_log- in casecups-x2gocode has a bug (e.g. a syntax error) or fails otherhow/var/log/syslog- in case anything goes wrong whilecups-x2gois processing a print job
For setting the log level of your CUPS server, please investigate the cupsd.conf man page:
$ man cupsd.conf
The cups-x2go log level can be set by editing:
root@x2goserver:~$ editor /etc/cups/cups-x2go
Customizing Debug Messages
All X2go server scripts are ready for syslogging, though not all of them actually do log to syslog. If you want to add your own syslog messages for debugging purposes, please take a look at the code of files that already do report to syslog. Here is a little howto that explains how to add extra log output to X2go server scripts:
Logging in X2Go Perl Scripts
Whereever you want to write a line to syslog from an X2Go Perl script, place this command:
syslog('debug', '<My message to syslog...>');
Logging in X2go Shell/Bash Scripts
Whereever you want to write a line to syslog from an X2Go Shell/Bash script, place this command:
$X2GO_LIB_PATH/x2gosyslog "$0" "debug" "<My message to syslog...>"
Python X2Go / PyHoca Debugging
The PyHoca clients both have a –libdebug option. Run pyhoca-gui or pyhoca-cli from the command line with that option enabled and you get blasted with debug output.