Bug 819865

Summary: vncserver is not starting automatically on server boot
Product: [Fedora] Fedora Reporter: Avi Alkalay <avibrazil>
Component: tigervncAssignee: Adam Tkac <atkac>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 16CC: atkac, ovasik
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-05-08 08:40:55 EDT Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Description Flags
The output of 'systemctl show vncserver@:5.service'
Simple documentation patch on how to enable the service on boot none

Description Avi Alkalay 2012-05-08 08:26:17 EDT
I followed the instruction on /lib/systemd/system/vncserver@.service copying the file to /etc/systemd/system/vncserver@:5.service and changing the <USER> but the server wont start automatically on boot. I need to login on a terminal and do a 'service vncserver:@5 start' to run the server. And from there everything works OK.

I'm attaching the output of 'systemctl show vncserver@:5.service'. Maybe this problem is related -- I don't know -- to the "UnitFileState=disabled".

This is tigervnc-server-1.1.0-3.fc16.x86_64.

This looks like a bug. If I'm just doing something wrong, please I need some advice on how to do it correctly.
Comment 1 Avi Alkalay 2012-05-08 08:28:10 EDT
Created attachment 582975 [details]
The output of 'systemctl show vncserver@:5.service'
Comment 2 Avi Alkalay 2012-05-08 08:40:55 EDT
Simply opening bugs leads to further investigation that leads to solving the "bug".

I found that a simple 'systemctl enable vncserver@:5.service' will setup proper links which makes the service startable on boot. I think this could be documented on the service file so I'll attach a patch.

Thank you and closing the bug.
Comment 3 Avi Alkalay 2012-05-08 08:46:02 EDT
Created attachment 582981 [details]
Simple documentation patch on how to enable the service on boot

The patch is so simple I'll paste it here too so people can see it without dettaching the file:

# diff /lib/systemd/system/vncserver@.service.old /lib/systemd/system/vncserver@.service
> # 4. Run `systemctl enable vncserver@:<display>.service`
fortal:~# diff -Naur /lib/systemd/system/vncserver@.service.old /lib/systemd/system/vncserver@.service
--- /lib/systemd/system/vncserver@.service.old  2012-05-08 09:41:51.145989789 -0300
+++ /lib/systemd/system/vncserver@.service      2012-05-08 09:42:47.473698069 -0300
@@ -5,6 +5,7 @@
 # 2. Edit <USER> and vncserver parameters appropriately
 #   ("runuser -l <USER> -c /usr/bin/vncserver %i -arg1 -arg2")
 # 3. Run `systemctl daemon-reload`
+# 4. Run `systemctl enable vncserver@:<display>.service`
 # DO NOT RUN THIS SERVICE if your local area network is
 # untrusted!  For a secure way of using VNC, you should