Bug 891802 - RFE: systemd unit for Xvnc (not vncserver)
RFE: systemd unit for Xvnc (not vncserver)
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: tigervnc (Show other bugs)
rawhide
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Jan Grulich
Fedora Extras Quality Assurance
: FutureFeature
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-01-03 22:24 EST by Ian Pilcher
Modified: 2017-04-11 09:45 EDT (History)
5 users (show)

See Also:
Fixed In Version: tigervnc-1.7.1-4.fc26
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-04-11 09:45:12 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ian Pilcher 2013-01-03 22:24:26 EST
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 10:53:35 EDT
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 15:33:49 EDT
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 15:44:10 EDT
It looks like issue is fixed in tigervnc-server-1.3.0-3.fc19.i686
Comment 5 Tim Waugh 2013-07-29 06:53:47 EDT
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 04:44:19 EDT
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 03:11:29 EDT
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 05:43:05 EDT
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 05:43:16 EDT
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 18:21:35 EDT
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 09:45:12 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.