Skip to content

[BUG] VNC connection to macOS Screen Sharing fails after selecting Apple security type 30 #1015

Description

@mews-se

Title

VNC connection to macOS Screen Sharing fails after selecting Apple security type 30

Platform

Website - Chrome

Server Installation Method

Proxmox (Community Scripts)

Version

2.5.1

Troubleshooting

  • I have examined logs and tried to find the issue
  • I have reviewed opened and closed issues
  • I have tried restarting the application
  • I have checked open issues and ensured this is not a duplicate

The Problem

Description

Termix is unable to establish a VNC connection to a Mac running the built-in macOS Screen Sharing service.

The connection reaches the Mac successfully, and the Mac advertises several supported VNC security types, including standard VNC authentication (type 2). However, the Guacamole VNC client automatically selects Apple authentication (type 30) and the client process exits immediately afterward.

Termix remains stuck on:

Connecting to VNC session...

or eventually reports:

Connection failed
Aborted. See logs.

Environment

  • Termix: 2.5.1
  • guacd: 1.6.0
  • OS: Debian 13 / Proxmox LXC
  • libvncclient1: 0.9.15+dfsg-1+deb13u2
  • libgcrypt20: 1.11.0-7+deb13u1
  • Target: macOS Mac mini using the built-in Screen Sharing service
  • VNC port: 5900

macOS configuration

The following settings are enabled:

  • System Settings → General → Sharing → Screen Sharing
  • Allow access for: All users
  • VNC viewers may control screen with password

Remote Management is disabled.

The issue occurs both:

  • with the macOS account username and password
  • with the separate VNC password and no username

Network connectivity

The VNC server is reachable from the Termix host:

$ nc -vz 10.0.0.11 5900
M-Mac-mini.****se [10.0.0.11] 5900 (?) open

Relevant guacd log

With debug logging enabled:

VNC server supports protocol version 3.889 (viewer 3.8)
We have 5 security types to read
0) Received security type 30
Selecting security type 30 (0/5 in the list)
1) Received security type 33
2) Received security type 36
3) Received security type 2
4) Received security type 35
Selected Security Scheme 30
Connection "$fe091f59-4c01-41ca-a2b8-441e51916690" removed.
Unable to request termination of client process: No such process
All child processes for connection "$fe091f59-4c01-41ca-a2b8-441e51916690" have been terminated.

The important detail is that the Mac advertises standard VNC authentication as security type 2, but the client selects security type 30 instead and exits immediately.

libgcrypt warning

Initially, the following warning was also logged:

Libgcrypt warning: missing initialization - please fix the application

I tested preloading a small library that explicitly initializes libgcrypt before guacd starts. This removed the warning, but the VNC connection still failed at exactly the same point:

Selected Security Scheme 30

Therefore, the missing libgcrypt initialization does not appear to be the underlying cause.

Expected behavior

Termix should successfully connect to macOS Screen Sharing using either:

  • standard VNC password authentication, security type 2, or
  • supported Apple authentication if Guacamole/libvncclient can handle it correctly

Actual behavior

The Guacamole VNC client selects Apple security type 30, after which the VNC child process exits without a useful authentication error.

Suggested fix

Possible approaches:

  1. Allow the user to select or force the VNC security type.
  2. Prefer standard VNC authentication (type 2) when only a VNC password is configured.
  3. Prevent Apple security type 30 from being selected if it is unsupported or unstable in the bundled environment.
  4. Update or patch the bundled Guacamole/libvncclient integration to correctly support macOS Screen Sharing authentication.
  5. Return a more specific error to the Termix UI instead of only Aborted. See logs.

Additional note

SSH and RDP connections from the same Termix installation work correctly. This appears isolated to VNC connections against the built-in macOS Screen Sharing server.

How to Reproduce

See above

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Status
    Bug Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions