By default, RealVNC Viewer and RealVNC Server record basic information about connection activity. As of version 6.7.0 of RealVNC Server and version 6.20.113 of RealVNC Viewer, logging is automatically enabled to event logs or syslog (depending on the operating system) along with logging to a file. The file used for logging can be changed using parameters.
Default log destinations
The following table lists the default destinations for log output from RealVNC Server and RealVNC Viewer, determined by the Log parameter:
RealVNC Server
Mode | Windows | Mac | Linux |
---|---|---|---|
Service Mode |
Event Log, (see note 3) C:\ProgramData\RealVNC-Service\vncserver.log |
syslog /Library/Logs/vncserver.log |
syslog, to the USER facility (see note 5) /var/log/vncserver-x11.log |
User Mode |
%localappdata%\RealVNC\vncserver.log (see note 4) |
~/Library/Logs/vnc/vncserver.log | ~/.vnc/vncserver-x11.log |
Virtual Mode | Standard Error (see note 6) | ||
Virtual Mode daemon | syslog, to the DAEMON facility (see note 7) |
RealVNC Viewer
Windows | Mac | Linux |
---|---|---|
stderr | stderr | stderr |
%localappdata%\RealVNC\vncviewer.log | ~/Library/Logs/vnc/vncviewer.log | ~/.vnc/vncviewer.log |
The following notes apply to the tables above:
- Logging to file is determined by the LogDir and LogFile parameters. Please note that the destination file and directory must have writable permissions for a standard user account and must not require administrative privileges to view / write to.
- The destination files contents are overwritten each time the program is restarted. To preserve information, choose a different destination, f. For example, “Standard Error.”. You could still redirect this to file using the command below.
vncserver-x11 -Log=*:stderr:100 2>> filename
-
RealVNC Server and RealVNC Viewer require Windows Event Log Service to be running, and that Event Viewer > Windows Logs > Application > Properties is set to overwrite as needed.
If the service is not running or the event log is full, connections cannot be established. - This is the location for Windows 7. Please note AppData may be hidden by default and the location may vary depending on your version of Windows.
- Using Linux, RealVNC Server running in Service mode. can be configured to log to different facilities using the SyslogFacility parameter.
-
Using Linux, the default destination for RealVNC Server in Virtual mode is Standard error. However, vncserver-virtual (or the vncserver symlink) automatically redirects this to file at:
~/.vnc/<computer>:<display-number>.log
Please note that the output of the x server session is included.
- Using Linux each time a user connects to the RealVNC Server using the virtual mode daemon, a new instance of RealVNC Server in virtual mode is immediately started. Its log output automatically redirects to file.
- From version 6.7.0 of RealVNC Server, default logging to event logs / syslog defaults to level 10. Logging to file across all supported operating systems now defaults to level 30 from version 6.7.0 of RealVNC Server. The same applies to version 6.20.113 of RealVNC Viewer.
Under Linux or Mac, RealVNC Server also automatically logs connections authenticated using system authentication or single sign-on schemes to the syslog AUTHPRIV facility. This is typically located at /var/log/auth.log and /var/log/secure/log respectively.
Generating debug logs
You may be eligible to contact Support if you encounter a problem or require assistance.
The Support team rely on comprehensive debug log files to troubleshoot problems. For more information please see How do I generate debug logs in RealVNC Connect?
Recording information about other programs and sub-processes
The Log, LogFile and LogDir parameters can be used to record information about RealVNC Connect programs – excluding RealVNC Viewer and RealVNC Server – along with its sub-processes. This may be useful if RealVNC's Support team requests that you dig deeper into any problems you may encounter.
Windows
You can apply the above parameters to the following programs and sub-processes by creating keys in the Windows Registry or for other programs via the command line.
Program or sub-process | Registry key | Parameters can be applied... | Registry hive | |
---|---|---|---|---|
RealVNC Server | Service Mode user interface | vncserverui-service | Registry | HKEY_CURRENT_USER |
User Mode user interface | vncserverui-user | |||
Licensing | At the command line | vnclicense | Registry or command line | |
Using the Licensing Wizard | vnclicensewiz |
For example, to create a log file for the RealVNC Server in Service Mode user interface:
- Using Registry Editor, navigate to
HKEY_CURRENT_USER\Software\RealVNC
. - Select New > Key from the shortcut menu, and create
vncserverui-service
. - Select New > String Value from the shortcut menu, and create
Log
. - Select Modify from the shortcut menu, and specify appropriate Value data, for example
*:file:100
.
Repeat steps 3 and 4 for the LogFile
and LogDir
parameters, if necessary. Restart the program to create the new log file.
To create a log file for a program at the command line, apply parameters before any command, for example:
vnclicense.exe -Log=*:file:100 -LogFile=license.log -add <offline license>
Mac
You can apply the logging parameters to the following programs when run from the command line:
vnclicense
vnclicensewiz
Do so before any command, for example:
/Library/vnc/VNC\ Server\ Licensing.app/Contents/MacOS/vnclicensewiz -Log=*:file:100
*Two files are created for the RealVNC Server Licensing Wizard: ~/Library/Logs/vnc/vnclicensewiz.log
and /Library/Logs/vnclicensewiz_helper.log
.
MacOS Catalina (and later) requires you change the shell to bash before running this command.
Linux
You can apply parameters to the following programs when run from the command line:
vnclicense
vnclicensewiz
Do so before any command, for example:
vnclicense -Log=*:file:100 -LogDir=/home/dev/logs -add <offline license>
Comments
Article is closed for comments.