Bug 2193384

Summary: Update Tigervnc documentation in Fedora docs
Product: [Fedora] Fedora Reporter: Aki Ketolainen <akik>
Component: fedora-docsAssignee: Karsten Wade <quaid>
Status: CLOSED EOL QA Contact: Tammy Fox <tammy.c.fox>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 38CC: cpanceac, jgrulich, vonsch
Target Milestone: ---Keywords: Desktop, Documentation, Reopened
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-05-22 10:54:44 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Aki Ketolainen 2023-05-05 13:20:02 UTC
I followed this Fedora guide for installing vnc server to my Fedora 36 setup.

https://docs.fedoraproject.org/en-US/fedora/latest/system-administrators-guide/infrastructure-services/TigerVNC/

After "dnf install tigervnc-server", using "systemctl enable --now vncserver@:1.service" fails.

The error is "May 05 14:01:51 ac vncsession-restore[285028]: No user configured for display :1"

This can be fixed by adding ":1=username" into /etc/tigervnc/vncserver.users and running:

"systemctl enable --now vncserver@:1.service" again.

Another problem is that the Xvnc process dies after only one connection.

This can be fixed by adding "Restart=always" to (/etc/systemd/system/)vncserver@.service file's [Service] definition and running "systemctl daemon-reload" and "systemctl restart vncserver@:1.service"


Reproducible: Always

Steps to Reproduce:
1. dnf install tigervnc-server
2. systemctl enable --now vncserver@:1.service

Actual Results:  
"May 05 14:01:51 ac vncsession-restore[285028]: No user configured for display :1"

Expected Results:  
vnc server should startup

Comment 1 Aki Ketolainen 2023-05-05 13:33:46 UTC
I forgot to add that the string "USER" is not found in (/etc/systemd/system/)vncserver@.service file and
also that the ExecStart= command has changed to "/usr/libexec/vncsession-start %i".

Comment 2 Jan Grulich 2023-05-08 07:34:24 UTC
This is all expected and documented here: https://github.com/TigerVNC/tigervnc/blob/master/unix/vncserver/HOWTO.md.

Comment 3 Aki Ketolainen 2023-05-08 09:23:42 UTC
Jan Grulich: Let's get this straight; you mean that it's expected that the installation of tigervnc-server creates a non-working config and the user needs to find that wiki page by themselves?

Comment 4 Jan Grulich 2023-05-08 09:27:32 UTC
(In reply to Aki Ketolainen from comment #3)
> Jan Grulich: Let's get this straight; you mean that it's expected that the
> installation of tigervnc-server creates a non-working config and the user
> needs to find that wiki page by themselves?

Yes, it's what comes from upstream now and user is supposed to modify it according to their needs. It cannot be done from our side as each configuration/users are different. We also install this documentation with our Tigervnc package so you can find it on your system as well.

It's not a non-working config, it's just a template basically, you need to configure it yourself. I know what in the past we shipped a service file that worked out of the box, but it was constantly broken and for that reason Tigervnc upstream decided to implement a proper systemd support and this is the result.

Comment 5 Aki Ketolainen 2023-05-08 09:56:32 UTC
Jan Grulich: The Fedora install guide just needs to include these extra steps in the section "Configuring VNC Server":

- /etc/tigervnc/vncserver.users:

  :display_number=username

- /etc/systemd/system/vncserver@.service:

  [Service]
  Restart=always

Comment 6 Jan Grulich 2023-05-08 12:16:22 UTC
The documentation here could use some update https://gitlab.com/fedora/docs/fedora-linux-documentation/fedora-linux-sysadmin-guide/-/blob/f38/modules/system-administrators-guide/pages/infrastructure-services/TigerVNC.adoc.

Here is upstream documentation for the workflow: https://github.com/TigerVNC/tigervnc/blob/master/unix/vncserver/HOWTO.md.

I might get to it eventually, but it would be a perfect task for junior job.

Comment 7 cornel panceac 2023-05-09 11:25:25 UTC
One option would be to redirect the reader to their documentation on the top of the page, and later document anything Fedora-specific.

Comment 8 Aki Ketolainen 2023-05-13 03:21:54 UTC
I'm not sure about the syntax for "Connecting to VNC Server Using SSH" either.

The -via example "vncviewer -via user@host:display_number" doesn't work for me.

I get the error "Failed to connect to "localhost:59929, unable to connect to socket:
Connection refused (111)"

I have vncserver@:1.service configured.

But this syntax works for me: "vncviewer -via user@host".

$ vncviewer -via user@host

TigerVNC Viewer v1.13.1
Built on: 2023-03-30 00:00
Copyright (C) 1999-2022 TigerVNC Team and many others (see README.rst)
See https://www.tigervnc.org for information on TigerVNC.

Sat May 13 06:20:27 2023
 DecodeManager: Detected 4 CPU core(s)
 DecodeManager: Creating 4 decoder thread(s)
 CConn:       Connected to host localhost port 33669
 CConnection: Server supports RFB protocol version 3.8
 CConnection: Using RFB protocol version 3.8
 CConnection: Choosing security type VeNCrypt(19)
 CVeNCrypt:   Choosing security type TLSVnc (258)

Sat May 13 06:20:32 2023
 DesktopWindow: Reducing window size to fit on current monitor
 CConn:       Using pixel format depth 24 (32bpp) little-endian rgb888
 CConnection: Enabling continuous updates

Comment 9 Aki Ketolainen 2023-05-13 04:56:34 UTC
When the small vncviewer window opens, I enter "host:1" in it, press enter, then enter my password and
the VNC session opens. I can see in "ss -tulpan | grep 33669" that the connection goes over ssh.

Comment 10 Aoife Moloney 2024-05-21 14:55:44 UTC
Fedora Linux 38 entered end-of-life (EOL) status on 2024-05-21.

Fedora Linux 38 is no longer maintained, which means that it
will not receive any further security or bug fix updates. As a result we
are closing this bug.

If you can reproduce this bug against a currently maintained version of Fedora Linux
please feel free to reopen this bug against that version. Note that the version
field may be hidden. Click the "Show advanced fields" button if you do not see
the version field.

If you are unable to reopen this bug, please file a new report against an
active release.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 11 Aki Ketolainen 2024-05-21 19:18:07 UTC
Let me get this straight:

- I create a bug report with a solution to fix the problem
- You ignore it for a year
- You close the bug report asking me to test it again on a current release, possibly resulting in you ignoring it again
- 4REAL ?

Comment 12 Aoife Moloney 2024-05-22 10:54:44 UTC
Fedora Linux 38 entered end-of-life (EOL) status on 2024-05-21.

Fedora Linux 38 is no longer maintained, which means that it
will not receive any further security or bug fix updates. As a result we
are closing this bug.

If you can reproduce this bug against a currently maintained version of Fedora Linux
please feel free to reopen this bug against that version. Note that the version
field may be hidden. Click the "Show advanced fields" button if you do not see
the version field.

If you are unable to reopen this bug, please file a new report against an
active release.

Thank you for reporting this bug and we are sorry it could not be fixed.