Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
- the unit file shipped with tigervnc-server-1.8.0-1 does not work.
Version-Release number of selected component (if applicable):
- tigervnc-server-1.8.0-1
How reproducible:
- 100%
Steps to Reproduce:
1. Install tigervnc-server-1.8.0-1
2. configure unit file with desired user name and port
3. complete additional vnc configuration (vncpasswd, firewall and whatnot)
4: enable the daemon
5: start the daemon
6: connect to the configured daemon
Actual results:
- Black screen with icons if you use the default ~/.vnc/xstartup file
- totally black screen if you configure the xstartup file to call gnome via dbus-launch
Expected results:
- VNC works normally
Additional info:
- Clobbering the new unit file with a prior version of the unit file fixes the problem. The issue appears to lie with the [Service] section of the file, which is currently:
------------------------------------------------------
[Unit]
Description=Remote desktop service (VNC)
After=syslog.target network.target
[Service]
Type=forking
User=<USER>
# Clean any existing files in /tmp/.X11-unix environment
ExecStartPre=-/usr/bin/vncserver -kill %i
ExecStart=/usr/bin/vncserver %i
PIDFile=/home/<USER>/.vnc/%H%i.pid
ExecStop=-/usr/bin/vncserver -kill %i
[Install]
WantedBy=multi-user.target
-------------------------------------------------------
It should be:
-------------------------------------------------------
[Unit]
Description=Remote desktop service (VNC)
After=syslog.target network.target
[Service]
Type=forking
# Clean any existing files in /tmp/.X11-unix environment
ExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'
ExecStart=/sbin/runuser -l <USER> -c "/usr/bin/vncserver %i"
PIDFile=/home/<USER>/.vnc/%H%i.pid
ExecStop=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'
[Install]
WantedBy=multi-user.target
--------------------------------------------------------
Replacing the unit file resolves the problem in my testing (with obvious replacement of <USER> with my local user on my test system)
The main issue seems to be the changes to the [Service] section in the latest version.
Issue as described with the new unit file is solved by adding
PAMName=login
in the [Service] section. As shipped, the file lacks this and journalctl shows an error being issued by the startup
Jan 13 15:09:48 centos7.trevor.local gnome-session[26311]: gnome-session-binary[26311]: WARNING: Could not get session id for session. Check that logind is properly installed and pam_systemd is getting used at login.
This is because it's defaulting to using a PAM session that doesn't include the pam_systemd.so line.
With tigervnc-server-1.8.0-4.el7.x86_64 in RHEL7.5 Beta I can see screen correctly, except that gnome-shell does not start. The bug 1543073 may be related to it.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHBA-2018:0722