Bug 819865 - vncserver is not starting automatically on server boot
vncserver is not starting automatically on server boot
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: tigervnc (Show other bugs)
16
All Linux
unspecified Severity medium
: ---
: ---
Assigned To: Adam Tkac
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-08 08:26 EDT by Avi Alkalay
Modified: 2013-04-30 19:51 EDT (History)
2 users (show)

See Also:
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: ---


Attachments (Terms of Use)
The output of 'systemctl show vncserver@:5.service' (2.77 KB, text/plain)
2012-05-08 08:28 EDT, Avi Alkalay
no flags Details
Simple documentation patch on how to enable the service on boot (510 bytes, patch)
2012-05-08 08:46 EDT, Avi Alkalay
no flags Details | Diff

  None (edit)
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
7a8
> # 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

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