Opened 15 months ago

Closed 15 months ago

Last modified 15 months ago

#67939 closed defect (fixed)

tigervnc @1.13.1: VNC session only fills bottom left quarter of window on Retina display when launched using vncviewer symlink

Reported by: martin-petermann (Martin Petermann) Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: tigervnc

Description (last modified by martin-petermann (Martin Petermann))

If I use the tigervnc client on an external display it's all fine. If I use it on the Retina display of my Macbook about a quarter of the available screen is only used.

screen output: screen output

Attachments (3)

screen.png (970.5 KB) - added by martin-petermann (Martin Petermann) 15 months ago.
screen output
screen_smaller.png (639.2 KB) - added by martin-petermann (Martin Petermann) 15 months ago.
screen output
screen_small.png (138.9 KB) - added by martin-petermann (Martin Petermann) 15 months ago.
screen output

Download all attachments as: .zip

Change History (13)

Changed 15 months ago by martin-petermann (Martin Petermann)

Attachment: screen.png added

screen output

comment:1 Changed 15 months ago by martin-petermann (Martin Petermann)

See the following screen output: screen output

Last edited 15 months ago by martin-petermann (Martin Petermann) (previous) (diff)

Changed 15 months ago by martin-petermann (Martin Petermann)

Attachment: screen_smaller.png added

screen output

Changed 15 months ago by martin-petermann (Martin Petermann)

Attachment: screen_small.png added

screen output

comment:2 Changed 15 months ago by martin-petermann (Martin Petermann)

Description: modified (diff)

comment:3 Changed 15 months ago by ryandesign (Ryan Carsten Schmidt)

Owner: set to ryandesign
Status: newassigned

What version of tigervnc? Installed with what version of MacPorts? On what version of macOS? On what type of processor?

It is known that this will happen if NSHighResolutionCapable is set to True in the Info.plist, which is why MacPorts sets it to False. Did you change it to True?

comment:4 Changed 15 months ago by martin-petermann (Martin Petermann)

Some more information:

> port info tigervnc
tigervnc @1.13.1 (x11, vnc)
Variants:             debug, universal

Description:          TigerVNC is an advanced VNC implementation. It is based on the fourth generation of VNC. TigerVNC also includes features from the TightVNC and TurboVNC projects. This includes accelerated JPEG compression. TigerVNC supports the latest X.Org X server.
Homepage:             https://tigervnc.org

Build Dependencies:   cmake, gettext
Library Dependencies: gettext-runtime, gnutls, fltk, libjpeg-turbo, libiconv, libpixman, zlib
Conflicts with:       vnc, tightvnc
Platforms:            darwin
License:              GPL-2+
Maintainers:          Email: ryandesign@macports.org, GitHub: ryandesign
                      Policy: openmaintainer
> uname -a
Darwin Helensburgh 22.5.0 Darwin Kernel Version 22.5.0: Thu Jun  8 22:22:20 PDT 2023; root:xnu-8796.121.3~7/RELEASE_ARM64_T6000 arm64
> cat Info.plist 
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>CFBundleDevelopmentRegion</key>
	<string>English</string>
	<key>CFBundleDisplayName</key>
	<string>TigerVNC Viewer</string>
	<key>CFBundleExecutable</key>
	<string>TigerVNC Viewer</string>
	<key>NSHighResolutionCapable</key>
	<string>False</string>
	<key>CFBundleGetInfoString</key>
	<string>1.13.1, Copyright © 1998-2022 [many holders]</string>
	<key>CFBundleIconFile</key>
	<string>tigervnc.icns</string>
	<key>CFBundleIdentifier</key>
	<string>com.tigervnc.tigervnc</string>
	<key>CFBundleInfoDictionaryVersion</key>
	<string>6.0</string>
	<key>CFBundleLongVersionString</key>
	<string>TigerVNC Viewer 1.13.1</string>
	<key>CFBundleName</key>
	<string>TigerVNC Viewer</string>
	<key>CFBundlePackageType</key>
	<string>APPL</string>
	<key>CFBundleShortVersionString</key>
	<string>1.13.1</string>
	<key>CFBundleVersion</key>
	<string>1.13.1f</string>
	<key>LSRequiresCarbon</key>
	<true/>
	<key>NSHumanReadableCopyright</key>
	<string>Copyright © 1998-2022 [many holders]</string>
</dict>
</plist>
Last edited 15 months ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:5 Changed 15 months ago by ryandesign (Ryan Carsten Schmidt)

Keywords: ventura arm64 added
Summary: tigervnc does not use full screen on Retina displaytigervnc @1.13.1: does not use full screen on Retina display

Ok, macOS 13.4.x on arm64.

Note that port info tells you what is available, not what is installed. port installed tells you what is installed. But from the Info.plist contents, I agree you've installed 1.13.1.

TigerVNC isn't compatible with high-DPI mode, and the symptom you're reporting is consistent with the program running in high-DPI mode. I'm not sure why it would be doing that since NSHighResolutionCapable is set to false.

Seeing the Info.plist again, I do notice a mistake, which is that NSHighResolutionCapable should be set to <false/> not <string>False</string>. You could try making that change.

I have not been able to reproduce the problem on macOS 12 or 13, both on Intel MacBooks Pro with Retina displays, when NSHighResolutionCapable is set to <false/> or <string>False</string>. I can reproduce the problem if I change NSHighResolutionCapable to <true/> or <string>True</string>.

I don't have an Apple Silicon Mac with a Retina display available to test with. I know some things are different between Apple Silicon and Intel Macs and I don't know if this is one of them.

I found several user complaints online about the "Open in Low Resolution" checkbox, which used to be in an application's Get Info window in the Finder, having been removed by Apple as of macOS 12. Other users have responded advising that setting NSHighResolutionCapable to <false/> in the application's Info.plist was a usable workaround at the time. It's possible that Apple has gone further in macOS 13 in restricting or removing the ability to open apps in low resolution mode. If so, options would be to downgrade to macOS 12 or earlier, help the developers of TigerVNC implement support for high-DPI mode, use a low-DPI display or switch your Retina display to low-DPI mode, or use a different VNC client; personally, I use the one built into macOS (/System/Library/CoreServices/Applications/Screen Sharing.app).

comment:6 Changed 15 months ago by martin-petermann (Martin Petermann)

It tried that without a change.

Thanks for letting me know about using the built in VNC client. Unfortunately I cannot use that because of some security features that probably prevent it to work for me.

On the other hand I usually work with an external display where I do not have any issue. There are only rare cases when I want to show something on my MacBook. I can live with that for the moment.

Last edited 15 months ago by martin-petermann (Martin Petermann) (previous) (diff)

comment:7 Changed 15 months ago by martin-petermann (Martin Petermann)

The whole issue was on my side. I created an app to start vncviewer executable. I assume the settings in Info.plist are not the default ones and therefore these are not applied. Sorry for inconvenience.

comment:8 Changed 15 months ago by ryandesign (Ryan Carsten Schmidt)

Keywords: ventura arm64 removed
Status: assignedaccepted
Summary: tigervnc @1.13.1: does not use full screen on Retina displaytigervnc @1.13.1: VNC session only fills bottom left quarter of window on Retina display when launched using vncviewer symlink

I understand now! Running /opt/local/bin/vncviewer bypasses the Info.plist, launching the app in high-DPI mode. I can reproduce that on macOS Monterey x86_64.

If you run /Applications/MacPorts/TigerVNC Viewer.app/Contents/MacOS/TigerVNC Viewer instead this problem does not occur.

In MacPorts in tigervnc @1.13.1_0 and earlier, /opt/local/bin/vncviewer is a symlink to /Applications/MacPorts/TigerVNC Viewer.app/Contents/MacOS/TigerVNC Viewer. You'd think the OS would be smart enough to follow the symlink and realize that the executable is part of an application bundle and use its Info.plist when started through the symlink, but apparently it is not.

As shipped from the developer, /opt/local/bin/vncviewer is a separate copy of the executable, so there would be no way for the OS to know that it is supposed to be part of an application bundle, aside from which installing two identical copies of the same executable is a waste of space, which is why I changed it to be a symlink in MacPorts, but I was not aware at the time that this would not use the Info.plist.

The solution appears to be to change /opt/local/bin/vncviewer to be a wrapper script which executes /Applications/MacPorts/TigerVNC Viewer.app/Contents/MacOS/TigerVNC Viewer. This works for me, launching it in low-DPI mode. I'll commit this change shortly. If this doesn't work for you, please let us know and reopen the ticket!

comment:9 Changed 15 months ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: acceptedclosed

In 3a3e0b095d31773980f1ed8b852f0fd76cce99ed/macports-ports (master):

tigervnc: Make vncviewer open in low-DPI mode

TigerVNC Viewer is not compatible with high-DPI mode and its Info.plist
says so but if the application is launched via the vncviewer symlink
this bypasses the Info.plist and the app opens in high-DPI mode which
doesn't work right. Change the symlink to a wrapper script that runs the
real executable; this seems to allow the OS to use the Info.plist file
and open in low-DPI mode.

Closes: #67939

comment:10 Changed 15 months ago by martin-petermann (Martin Petermann)

Thanks, that would solve my issue.

Note: See TracTickets for help on using tickets.