Description of problem: Currently, the recommended method of setting up a VNC server to autostart involves copying the unit file from /lib/systemd/system/vncserver@.service to /etc/systemd/system/vncserver@:<DISPLAY>.service and editting the new file to set the user, etc. This is fairly ugly, and it also causes any updates to the file in /lib/systemd/system (such as the new macros in F18) to be ineffective. I suggest using per-server configuration files. For example: /etc/sysconfig/vncserver-:10 USER=ipilcher GEOMETRY=1600x900 OPTIONS="-localhost -nolisten tcp" /etc/systemd/system/vncserver@.service [Unit] Description=Remote desktop service (VNC) - display %I After=syslog.target network.target [Service] Type=forking EnvironmentFile=/etc/sysconfig/vncserver-%i # 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 -geometry ${GEOMETRY} ${OPTIONS}" ExecStop=/sbin/runuser -l $USER -c "/usr/bin/vncserver -kill %i" [Install] WantedBy=multi-user.target (I'm not particularly suggesting those file locations, etc. Just trying to convey the general concept.) With this scheme, setting up a new VNC server is a matter of creating the appropriate display-specific config file and using systemctl start/enable with the right display after the '@' symbol.
In the matter of this issue, recently I talked on systemd-devel list about how to edit vnc*.service file for a correct launch of this service. In particular, both on Fedora 17 ARM or Fedora 18, the instructions on the same original '/lib/systemd/system/vncserver@.service' seems misleading. According to the mails on systemd-devel list: >1. syslog.target is old and not needed in recent systemd's > >2. No need to shell out and ignore the return value of the Pre command. >Use the - after the equals to ignore the return value of the command. >It's output will be logged in the journal but that's fine IMO. > >3. User=/Group= is a built in way to set the user and group. You should >drop runuser completely as it's totally unneeded - systemd has this >built in as documented in the manual. You can read the discussion here: http://lists.freedesktop.org/archives/systemd-devel/2013-January/008349.html
This package has changed ownership in the Fedora Package Database. Reassigning to the new owner of this component.
I prefer Ian's suggestion better than the way it is now. Unit file for VNC Servers should be read only and flexible enough to support externally-configured servers. (In reply to Ian Pilcher from comment #0) > Description of problem: > Currently, the recommended method of setting up a VNC server to autostart > involves copying the unit file from /lib/systemd/system/vncserver@.service > to /etc/systemd/system/vncserver@:<DISPLAY>.service and editting the new > file to set the user, etc. This is fairly ugly, and it also causes any > updates to the file in /lib/systemd/system (such as the new macros in F18) > to be ineffective.