NoMachine Support

Your questions answered

Knowledge Base

Searching in: Feature Requests
Filter the search results
Target version:
Products:
Status:
Last update:
Searching in: Feature Requests
ID: FR11Q03892
Added on:  2019-11-20
Last update: 2020-11-20
Priority: High
Products: NoMachine Server
Target: 7
Status:  Approved
Moving session log file to users' home directories

Logs of processes running as the user should be moved from the NoMachine's var/log directory to the user's home directory according to the following. Processes running as 'nx' user, 'SYSTEM' (on Windows) 'root' (on Linux/Mac) will continue to log to the NoMachine's var/log directory.

Session logs
NoMachine server, node and webclient processes should write logs related to sessions under the home directory of the session owner in: <userhome>/.nx/nxserver.log
and:
<userhome>/.nx/nxerror.log

The display agent log files should be stored in the correspondent session directory created under the home directory of the session owner, e.g. the user's home/.nx/node/C-display-sessionid directory.

Web sessions logs
The nxwebplayer process on Linux should write log in:
/var/NX/nxhtd/.nx/nxserver.log
/var/NX/nxhtd/.nx/nxerror.log
on macOS in:
/Library/Application Support/NoMachine/var/nxhtd/.nx/nxserver.log
/Library/Application Support/NoMachine/var/nxhtd/.nx/nxerror.log
and on Windows in:
%PROGRAMDATA%\\\\NoMachine\\\\var\\\\log\\\\nxserver.log
%PROGRAMDATA%\\\\NoMachine\\\\var\\\\log\\\\nxerror.log

The nxhtd process (built-in web server running as nxhtd user) on Linux should write logs to:
/usr/NX/var/log/nxhtd-error.log
/usr/NX/var/log/nxhtd-access.log
on Mac:
/Library/Application Support/NoMachine/var/log/nxhtd-error.log
/Library/Application Support/NoMachine/var/log/nxhtd-access.log
and on Windows:
%PROGRAMDATA%\\\\NoMachine\\\\var\\\\log\\\\nxhtd-error.log
%PROGRAMDATA%\\\\NoMachine\\\\var\\\\log\\\\nxhtd-access.log

The nxwebclient process should insted still write logs on Linux in:
/usr/NX/var/log/nxwebclient.log
on macOS in:
/Library/Application Support/NoMachine/var/log/nxwebclient.log
and on Windows in:
%PROGRAMDATA%\\\\NoMachine\\\\var\\\\log\\\\nxwebclient.log

 

As an alternative to writing logs in user's home, a new configuration key, CommonLogDirectory,  in the node.cfg file allows administrators to provide a path where to store log files in a unique place. Path specified in this key needs to be accessible by all users. A node directory will be created to store the display agent log files in the correspondent session directory.

 

Notes:
1)
Processes running as 'nx' user, 'SYSTEM' (on Windows) 'root' (on Linux/Mac) will continue to log to the NoMachine's var/log
directory in the nxserver.log and nxerror.log file. Such files have restricted permission set. If CommonLogDirectory is set, such processes will log to the path specified by that key. 

If preferable, administrators may instead redirect such logs to system logs by enabling the EnableSyslogSupport key in the server.cfg and node.cfg files.

2) It's possible to configure NoMachine to create the .nx directory  (and consequently to store logs) in a place different than the user's home. To do that, use the UserNXDirectoryPath key in the node configuration file (node.cfg). 

3) All the server's operations (e.g. restart and execution of server commands) are by default logged to the server.log and error.log files stored in the <NoMachine installation directory>/var/log directory

4) The SystemLogFile key in server.cfg and node.cfg become obsolete and will be removed during the update procedure.

5) The automatic log collection and log rotate feature need to be updated according to this new implementation (http://www.nomachine.com/FR03R03943 and https://www.nomachine.com/FR03R03959).

 


Description of the new key in the node configuration file:

#
# Specify path to the directory where NoMachine programs have to log.
# The log directory must be writable by all users who connect by
# NoMachine. By default, nxserver and nxerror log files are stored
# in the .nx directory under the home of session owner. When this key
# is set, they are stored to the given path and in a unique log file.
# Session logs are stored in sub-directories reporting the display
# number and session id of the correspondent session.
#
#CommonLogDirectory""


Notify me when the FR is implemented.