Bug 819865 - vncserver is not starting automatically on server boot
Summary: vncserver is not starting automatically on server boot
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: tigervnc
Version: 16
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Adam Tkac
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-05-08 12:26 UTC by Avi Alkalay
Modified: 2013-04-30 23:51 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2012-05-08 12:40:55 UTC
Type: Bug
Embargoed:


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

Description Avi Alkalay 2012-05-08 12:26:17 UTC
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 12:28:10 UTC
Created attachment 582975 [details]
The output of 'systemctl show vncserver@:5.service'

Comment 2 Avi Alkalay 2012-05-08 12:40:55 UTC
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 12:46:02 UTC
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.