This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
wiki:development:debugging [2012/09/13 11:02] sunweaver [X2Go Debugging] |
wiki:development:debugging [2024/07/01 17:36] (current) uli42 [Debugging x2goclient on Windows] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== | + | ====== Debugging |
+ | ===== Log File Watching ===== | ||
- | ===== X2Go Server Debugging ===== | + | If you want to track down problems with the server-side components of X2Go, it is possible to enable output of debug information into the systems syslog facility (normally ''/ |
- | + | ||
- | If you want to track down problems with the '' | + | |
The default log levels for '' | The default log levels for '' | ||
- | ===== Log File Watching ===== | + | While testing |
- | + | ||
- | While testing your X2Go server, you can open another terminal on the server and watch the '' | + | |
< | < | ||
Line 16: | Line 13: | ||
</ | </ | ||
- | ===== Debugging x2goserver | + | Other logging locations apart from the system' |
+ | |||
+ | * X2Go Server: ''/ | ||
+ | * X2Go Client: stderr (use '' | ||
+ | * PyHoca-GUI: stderr (use '' | ||
+ | * Xsession itself: '' | ||
+ | * NX (server-side): | ||
+ | * NX (client-side): | ||
+ | |||
+ | ===== Enable Debug Output | ||
+ | |||
+ | ==== Debugging X2Go Server | ||
The '' | The '' | ||
Line 24: | Line 32: | ||
</ | </ | ||
- | ===== Debugging cups-x2go | + | ==== Debugging cups-x2go ==== |
For debugging cups-x2go there are two files to look at: | For debugging cups-x2go there are two files to look at: | ||
Line 40: | Line 48: | ||
< | < | ||
- | root@x2goserver:~$ editor / | + | root@printserver:~$ editor / |
</ | </ | ||
+ | |||
+ | ==== Debugging X2Go Session Broker ==== | ||
+ | |||
+ | The '' | ||
+ | |||
+ | < | ||
+ | root@broker: | ||
+ | </ | ||
+ | |||
+ | The log files normally get written to ''/ | ||
+ | |||
+ | You can also run | ||
+ | < | ||
+ | root@broker: | ||
+ | </ | ||
+ | |||
+ | as user '' | ||
+ | ==== Python X2Go / PyHoca Debugging ==== | ||
+ | |||
+ | The PyHoca clients both have a '' | ||
===== Customizing Debug Messages ===== | ===== 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. | + | 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.\ |
- | ==== Logging in X2Go Perl Scripts ==== | + | Here is a little howto that explains how to add extra log output to X2go server scripts: |
- | Whereever you want to write a line to syslog from an X2Go Perl script, place this command: | + | ==== Logging in X2Go Server' |
+ | |||
+ | Whereever you want to write a line to syslog from an X2Go Server' | ||
< | < | ||
Line 56: | Line 86: | ||
- | ==== Logging in X2go Shell/Bash Scripts ==== | + | ==== Logging in X2Go Server' |
Whereever you want to write a line to syslog from an X2Go Shell/Bash script, place this command: | Whereever you want to write a line to syslog from an X2Go Shell/Bash script, place this command: | ||
Line 64: | Line 94: | ||
</ | </ | ||
- | ====== Python X2Go / PyHoca Debugging ====== | ||
- | The PyHoca clients both have a '' | + | ==== Logging in X2Go Session Broker' |
+ | |||
+ | Whereever you want to write a line to '' | ||
+ | |||
+ | < | ||
+ | # at the top of the module file: | ||
+ | from x2gobroker.loggers import logger_broker | ||
+ | # [...] then further below, wherever needed: | ||
+ | logger_broker.debug('<your message>') | ||
+ | </ | ||
+ | |||
+ | |||
+ | ==== Debugging x2goclient on Windows ==== | ||
+ | |||
+ | This is a bit tricky. You need to run the debug version of x2goclient in a cmd window. The debug version is part of the xgoclient installation package for Windows and is called | ||
+ | Run ''< | ||
+ | Run '' | ||
+ | <note important> |