« Back to docs

All about logging

By default, VNC Server and VNC Viewer record basic information about connection activity. You can increase the amount of information recorded, change the type of activity, or alter the destination. In addition, you can start recording information about other VNC Connect programs and sub-processes.

The following table lists the default destinations for VNC Server and VNC Viewer log output, as determined by the Log parameter:

Program Windows Mac Linux
VNC Server Service Mode Event Log
(see note 3)
syslog syslog, to the USER facility (see note 5)
User Mode C:\Users\<user>\AppData\Local\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 also note 7)
VNC Viewer Standard Error Standard Error Standard Error

The following notes apply to the table above:

  1. If the destination is to file, the location is determined by the LogDir and LogFile parameters. Containing directories must be writable.
  2. If the destination is to file, the contents of that file are overwritten each time a program is restarted. To preserve information, choose a different destination, for example Standard Error. (You could still redirect this to file, for example by using a command such as vncserver-x11 -Log=*:stderr:100 2>>myfile.)
  1. Under Windows, you must ensure the Windows Event Log service is 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.
  1. This location is for Windows 7, though note AppData may be hidden by default. The location is slightly different under some other versions of Windows.
  1. Under Linux, VNC Server in Service Mode can be configured to log to different facilities using the SyslogFacility parameter.
  1. Under Linux, the default destination for VNC Server in Virtual Mode is Standard Error, but vncserver-virtual (or the vncserver symlink) automatically redirects this to file at ~/.vnc/<computer>:<display-number>.log. Note the output of the X server session is included.
  1. Under Linux, each time a user connects to the VNC Server in Virtual Mode daemon, a new instance of VNC Server in Virtual Mode is immediately started, and its log output automatically redirected to file as above.

Note

Under Linux or Mac, VNC Server also automatically logs connections authenticated using the system authentication or single sign-on schemes to the syslog AUTHPRIV facility, typically located at /var/log/auth.log and /var/log/secure.log respectively.

Quickly 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, equivalent to setting the VNC Server and VNC Viewer Log parameters to *:file:100.

In order to quickly generate a debug log file for either VNC Server or VNC Viewer:

  1. On the Troubleshooting page of the Options or Properties dialog respectively, choose Create a debug log file, and then OK.
  2. Restart the program.
  3. Recreate the problem, and send the file in the specified location to the Support team.

Recording information about other programs and sub-processes

You can apply the Log, LogFile, and LogDir parameters to VNC Connect programs other than VNC Server and VNC Viewer, and also to VNC Server sub-processes. This may be useful if the Support team requests that you dig deeper into any problems you may encounter.

Windows

You can apply parameters to the following programs and sub-processes by creating special keys in the Windows Registry. Alternatively, for some programs you can apply parameters at the command line.

Program or sub-process Registry key Parameters can be applied... Registry hive
VNC 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 VNC Server in Service Mode user interface:

  1. Using Registry Editor, navigate to HKEY_CURRENT_USER\Software\RealVNC.
  2. Select New > Key from the shortcut menu, and create vncserverui-service.
  3. Select New > String Value from the shortcut menu, and create Log.
  4. 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 <key>

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 <key>

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

Note

Two files are created for the VNC Server Licensing Wizard: ~/Library/Logs/vnc/vnclicensewiz.log and /Library/Logs/vnclicensewiz_helper.log.

×