Bug 891802

Summary: RFE: systemd unit for Xvnc (not vncserver)
Product: [Fedora] Fedora Reporter: Ian Pilcher <ipilcher>
Component: tigervncAssignee: Jan Grulich <jgrulich>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: bphinz, ovasik, rob.verduijn, sergei.litvinenko, stepglenn
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: tigervnc-1.7.1-4.fc26 Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-04-11 13:45:12 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ian Pilcher 2013-01-04 03:24:26 UTC
Description of problem:
tigervnc-server currently contains a systemd unit file for vncserver, but it doesn't really work when one wishes to use VNC with XDMCP.  Instead, something like this is needed:

[Unit]
Description=VNC remote display %I
After=syslog.target

[Service]
Type=simple
EnvironmentFile=-/etc/sysconfig/xvnc@%i
User=nobody
ExecStart=/usr/bin/Xvnc -SecurityTypes None -query 127.0.0.1 $XVNC_OPTIONS %i

[Install]
WantedBy=multi-user.target

It would be nice to have something like this added to the tigervnc-server-minimal package.

Comment 2 Fedora Admin XMLRPC Client 2013-05-13 14:53:35 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 3 Sergei LITVINENKO 2013-07-28 19:33:49 UTC
I found this issue too. According to syslog, server is started and after killed. As workaround, I have commented ExecStop line (only this one) and now it work.

[root@eee901 system]# cat vncserver@:2.service
---
[Unit]
Description=Remote desktop service (VNC)
After=syslog.target network.target

[Service]
Type=forking
ExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'
ExecStart=/sbin/runuser -l sergeil -c "/usr/bin/vncserver %i"
# ExecStop=/sbin/runuser  -l sergeil -c "/usr/bin/vncserver -kill %i"

[Install]
WantedBy=multi-user.target
---

It looks like ExecStop= is not recognized correct. In case, if issue is in systemd, all services with ExecStop= line are affected.

Comment 4 Sergei LITVINENKO 2013-07-28 19:44:10 UTC
It looks like issue is fixed in tigervnc-server-1.3.0-3.fc19.i686

Comment 5 Tim Waugh 2013-07-29 10:53:47 UTC
Sergei: the issue you were seeing is bug #983232. *This* bug is a feature request for a different type of systemd file altogether.

Comment 6 Fedora Admin XMLRPC Client 2015-08-20 08:44:19 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 7 rob.verduijn 2016-10-05 07:11:29 UTC
Hello,

There also should be a socket unit file. (xinetd is a thing of the past)

I've combined this solution :
https://access.redhat.com/solutions/2516
and same story for centos that is not behind a firewall
http://www.itzgeek.com/how-tos/linux/centos-how-tos/remote-login-with-gdm-and-vnc-on-centos-7-rhel-7-configure-vnc-on-xinetd-with-xdmcp-centos-7-rhel-7.html

with this one
https://access.redhat.com/solutions/2681531

ie use a systemd socket and service not xinetd

Then you have a working xdmcp and vnc setup.

Also a readme explaining how to use these two socket files with an adjustment of the /etc/gdm/custom.conf

cat/etc/gdm/custom.conf
# GDM configuration storage

[daemon]

[security]
AllowRemoteRoot=true
DisallowTCP=false

[xdmcp]
Enable=true
MaxSessions=30

[greeter]

[chooser]

[debug]



cat /etc/systemd/system/xvnc.socket
[Unit]                                                                                                                                             
Description=XVNC Server                                                                                                                            
                                                                                                                                                   
[Socket]
ListenStream=5900
Accept=yes

[Install]
WantedBy=sockets.target


cat /etc/systemd/system/xvnc.socket                                                                                                
[Unit]                                                                                                                                             
Description=XVNC Server                                                                                                                            
                                                                                                                                                   
[Socket]
ListenStream=5900
Accept=yes

[Install]
WantedBy=sockets.target


cat /etc/systemd/system/xvnc@.service
[Unit]
Description=XVNC Per-Connection Daemon

[Service]
ExecStart=-/usr/bin/Xvnc -inetd -query localhost -geometry 1024x768 -depth 24 -once -SecurityTypes=None -fp /usr/share/X11/fonts/misc

User=nobody
StandardInput=socket
StandardError=syslog


Rob Verduijn

Comment 8 Fedora Update System 2017-04-06 09:43:05 UTC
tigervnc-1.7.1-4.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-2d0066d567

Comment 9 Fedora Update System 2017-04-06 09:43:16 UTC
tigervnc-1.7.1-4.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-2d0066d567

Comment 10 Fedora Update System 2017-04-06 22:21:35 UTC
tigervnc-1.7.1-4.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-2d0066d567

Comment 11 Fedora Update System 2017-04-11 13:45:12 UTC
tigervnc-1.7.1-4.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.