Back to all articles
• 5 min read •
#linux #macos #remmina #vnc #sysadmin

Remmina VNC: Connect from Linux to macOS (Screen Sharing Guide)

A comprehensive guide on connecting from Linux to macOS Screen Sharing using Remmina via VNC, resolving authentication loops, and bypassing Apple's proprietary encryption traps.

Table of Contents Tap to toggle

Overview

Connecting to a macOS machine from a Linux workstation using VNC (Virtual Network Computing) should theoretically be seamless. However, macOS includes proprietary extensions on top of the standard Remote Frame Buffer (RFB) protocol. This often leads to immediate disconnects, authentication failures, or black screens when using open-source clients like Remmina.

This guide covers the end-to-end setup to establish a reliable VNC connection from Linux to macOS, explains the two-stage authentication model, and details the critical setting needed to prevent Apple’s proprietary security handshake from dropping your session.


Prerequisites

  • A Linux desktop running Remmina with the VNC plugin installed (remmina-plugin-vnc).
  • A target Mac connected to the same local network (or accessible via VPN).
  • Administrative privileges on the Mac to enable Screen Sharing.

1. Configure macOS Screen Sharing

By default, macOS Screen Sharing prioritizes Apple’s native Remote Desktop protocol. To allow standard VNC clients to connect, you must explicitly enable password-based VNC access.

  1. On the Mac, open System Settings and navigate to General → Sharing.
  2. Toggle Screen Sharing (or Remote Management) to ON.
  3. Click the Info (i) or Computer Settings button next to Screen Sharing.
  4. Check the box: “VNC viewers may control screen with password”.
  5. Set a dedicated VNC password.
⚠️ Crucial: 8-Character Password Limit

Traditional VNC authentication uses DES challenge-response encryption, which enforces a strict limit of 8 characters. Keep your VNC password between 6 and 8 characters to avoid silent truncation or authentication mismatches.

  1. Under Allow access for, ensure your macOS user account is permitted to access the screen.
  2. Identify the Mac’s IP address by running the following in Terminal on the Mac:
ipconfig getifaddr en0

(If connected via Wi-Fi, replace en0 with en1). Example IP: 192.168.1.100.


2. Understanding Two-Stage Authentication

ℹ️ Two Separate Credentials Required

A common point of confusion when accessing macOS over VNC is the requirement for two separate credentials at distinct layers of the connection:

  1. Stage 1 — The VNC Handshake Password:
    The password defined in macOS under “VNC viewers may control screen with password”. Remmina uses this password during the initial protocol handshake on TCP port 5900 to establish the display stream.
  2. Stage 2 — The macOS User Account Credentials:
    Once the display stream connects, macOS presents the graphical lock screen / login window. You enter your standard macOS username and account password into the remote display to unlock the desktop session.

3. Verify Network Connectivity

From your Linux terminal, verify that TCP port 5900 on the Mac is open and reachable:

nc -zv 192.168.1.100 5900

Expected output:

Connection to 192.168.1.100 5900 port [tcp/rfb] succeeded!

4. Configure Remmina Connection Profile

  1. Open Remmina on your Linux machine.
  2. Click New Connection Profile (+ icon).
  3. Under the Basic tab, configure the following:
FieldValueNotes
NameMac RemoteFriendly profile name
ProtocolVNC - VNC PluginEnsure the VNC plugin is selected
Server192.168.1.100:5900Replace with your Mac’s IP address
Usernameyour_mac_usernameYour short macOS username
Passwordyour_vnc_passwordThe VNC password set in Step 1 (max 8 chars)
Color depthTrue color (32 bpp)Prevents display artifacts and blank windows
QualityGood or BestAdjust based on your local network speed

5. The Critical Fix: Disable Encryption

When Remmina negotiates security schemes with macOS, the Mac offers several options:

  • Security Type 30 / 33: Apple Remote Desktop (ARD) Diffie-Hellman encryption.
  • Security Type 2: Standard VNC Authentication.

By default, Remmina attempts to negotiate Apple’s proprietary Type 30, which open-source libvncclient cannot complete, causing an immediate disconnect or timeout.

⚠️ The Apple ARD Type 30 Trap

To resolve immediate dropouts, force Remmina to negotiate standard Security Type 2 by checking Disable encryption.

To apply the fix in Remmina:

  1. In the Remmina profile editor, click the Advanced tab.
  2. Check the option: Disable encryption.
  3. Click Save and Connect.

6. Configuration File Reference (.remmina)

If you prefer managing Remmina profiles programmatically or via text configuration, connection files are stored in ~/.local/share/remmina/:

[remmina]
name=Mac Remote
protocol=VNC
server=192.168.1.100:5900
colordepth=32
quality=9
viewonly=0
disableclipboard=0
disableserverinput=0
disableencryption=1
username=your_mac_username
password=.

(Note: password=. indicates the password is stored securely in your system keyring via glibsecret).


7. Connect and Log In

✅ Desktop Stream Established

Following the steps below completes the end-to-end handshake and opens your remote macOS session.

  1. Launch the connection in Remmina.
  2. Remmina will complete the VNC handshake using the VNC password.
  3. The remote desktop window will open displaying the macOS lock screen.
  4. Click into the window and enter your macOS account password to unlock your desktop.

8. Troubleshooting Checklist

  • Authentication Failed / Immediate Disconnect:
    Verify Disable encryption is checked in the Advanced tab. If disabled, Remmina falls into an unsupported Apple ARD handshake.
  • Password Rejected on Handshake:
    Verify the VNC password set on the Mac does not exceed 8 characters.
  • Black Screen:
    Ensure Color depth is set to 32 bpp (or Client default) rather than lower color modes.
  • Debug Protocol Negotiation:
    Run Remmina in debug mode from terminal to view the handshake:
G_MESSAGES_DEBUG=remmina remmina -c ~/.local/share/remmina/<profile_name>.remmina

A successful connection will confirm:

Selecting security type 2
Selected Security Scheme 2
VNC authentication succeeded