Hello, the new tigervnc-server is completely broken for me. Since the upgrade to 1.11.0, I can't start it. I originally ran version 1.10 within a jail as an user, which I can't do now. When I try to start it as root with `vncsession <myusername> :1`, I get the following log message: Oct 5 18:02:08 ksol vncsession[68599]: in openpam_parse_chain(): /usr/local/etc/pam.d/tigervnc(3): missing or invalid facility Oct 5 18:02:08 ksol kernel: Oct 5 18:02:08 ksol vncsession[68599]: in openpam_parse_chain(): /usr/local/etc/pam.d/tigervnc(3): missing or invalid facility Oct 5 18:02:08 ksol vncsession[68599]: pam_start failed: 4 Oct 5 18:02:08 ksol kernel: Oct 5 18:02:08 ksol vncsession[68599]: pam_start failed: 4 pam_selinux doesn't exist on unix boxes, and when I comment everything out, except for the pam_unix line that is actually existing, I get the following error message in my log: Oct 5 17:58:35 ksol kernel: Oct 5 17:58:35 ksol vncsession[39275]: in openpam_dispatch(): /usr/lib/pam_unix.so.6: no pam_sm_open_session()
I am rather sure that 1.11 is non-functional on FreeBSD. When trying to start vncsession, first I copied /etc/pam.d/login to /usr/local/etc/pam.d/tigervnc. Then, vncsession does the following: 2162 vncsession CALL open(0x402975,0x120004<O_RDONLY|O_NONBLOCK|O_DIRECTORY|O _CLOEXEC>) 2162 vncsession NAMI "/proc/self/fd" 2162 vncsession RET open -1 errno 2 No such file or directory after which it terminates with error 74 since /proc/self/fd cannot be opened. It seems to be linuxism.
b(In reply to László Károlyi from comment #0) I don't think at least it is COMPLETELY broken because Xvnc works. It's partially broken. vncsession is a PART of tigervnc-server. vncsession is not everything of TigerVNC and not the only way to use TigerVNC server. However, that's true tigervnc-server is broken PARTIALLY. It needs to be addressed. (In reply to Konstantin Belousov from comment #1) Thanks for the investigation.
Ok, for me the working even if temporal solution appears to get the vncserver perl script from tigervnc-1.10.1 and fix exedir. Then I can just run `vncserver' and get session in the same way as with 1.10. No need for root/pam/trying to understand linuxisms in vncsession.
(In reply to Konstantin Belousov from comment #3) Thanks for the information. I'll consider add the vncserver script of former version to 1.11 port as quick workaround. Sorry for the breakage and inconvenience. BTW, I thought changing `/proc/self/fd` to `/dev/fd` (fdescfs needs to be mounted) and tried. I got status=2 error. It looks some more hacks are needed to get bran-new vncsession work. > Oct 9 12:42:40 icepick vncsession[38933]: vncsession: vncserver exited with status=2
Update: https://github.com/TigerVNC/tigervnc/issues/1116 The tigervnc project seems to be unsupportive of FreeBSD. I'll grab the old vnc startup script written in perl and see if it works with that.
(In reply to Koichiro Iwao from comment #4) Hey Iwao, I have a working vncserver perl script, could you please add the following to the package: 1. Download the original vncserver from https://raw.githubusercontent.com/TigerVNC/tigervnc/v1.10.1/unix/vncserver 2: Patch it with this: ======= 30c30 < $exedir = "/usr/local/bin/"; --- > $exedir = ""; 529c529 < if (!bind(S, sockaddr_in(6000 + $n, &INADDR_ANY))) { --- > if (!bind(S, pack('S n x12', $AF_INET, 6000 + $n))) { 537c537 < if (!bind(S, sockaddr_in(5900 + $n, &INADDR_ANY))) { --- > if (!bind(S, pack('S n x12', $AF_INET, 5900 + $n))) { ======= With these changes, the vncserver will start in usermode, within a jail. The patch comes from a previously fixed problem from the perl script trying to bind differently on a BSD interface when probing for available ports, and failing: https://forums.freebsd.org/threads/vnc-server-and-freebsd-7-2-jail.6142/ Best regards, László
(In reply to László Károlyi from comment #6) Yours is what I intended at comment #4.
(In reply to Koichiro Iwao from comment #7) Awesome. Can we get a release, then?
A commit references this bug: Author: meta Date: Wed Oct 28 02:27:12 UTC 2020 New revision: 553522 URL: https://svnweb.freebsd.org/changeset/ports/553522 Log: net/tigervnc-server: add vncserver script of the former version as workaround because bran-new vncsession script is not working on FreeBSD right now. Thanks to kib@ and L?szl? K?rolyi! PR: 250143 Changes: head/net/tigervnc-server/Makefile head/net/tigervnc-server/files/vncserver.ports head/net/tigervnc-server/pkg-plist
(In reply to commit-hook from comment #9) I tested the released vncserver script because the "$exedir = "/usr/local/bin/";" was missing there and I was worried the script wouldn't work. It does work properly, thank you. I got my user run vncserver back.
If there's no problem, I'll ship it to quarterly.
I just installed the tigervnc-server-1.11.0_1 and the vncserver script is identical to the one installed by tigervnc-server-1.11.0.