Red Hat Bugzilla – Bug 741727
tigervnc package scripts reference a non-existent file
Last modified: 2013-04-30 19:50:31 EDT
Description of problem:
Package scripts for tigervnc-server-1.1.0-1.fc17 try to do things like:
/bin/systemctl try-restart vncserver.service
and that always fails because 'systemctl status vncserver.service' responds with:
Loaded: error (Reason: No such file or directory)
Active: inactive (dead)
There is no such file or directory as this package supplies:
Version-Release number of selected component (if applicable):
I would suggest that dropping a spurious '@' from that file name would be a good idea or shell may come with unwanted surprises.
Although the /lib/systemd/system/vncserver@.service file looks wrongly, it is actually correct.
The main reason why we don't ship /lib/systemd/system/vncserver.service is that the vncserver service starts multiple Xvnc sessions. This was previously configured in /etc/sysconfig/vncservers but there is no good mechanism how to use similar way with systemd.
Please read the /lib/systemd/system/vncserver@.service:
# Quick HowTo:
# 1. Copy this file to /etc/systemd/system/vncserver@:<display>.service
# 2. Edit "User" and "ExecStart" variables appropriately
# (ExecStart should be "/usr/bin/vncserver %i -arg1 -arg2")
# 3. Run `systemctl daemon-reload`
This way you can create vncserver@:1.service, vncserver@:2.service etc with proper parameters and you can start this service via `systemctl start vncserver@:1.service`, for example. This allows fine grained configuration of each VNC session and also allows you to control each session (for example you are able to stop only one session, not all VNC sessions).
This is not a bug, this is intentional.
(In reply to comment #1)
> Although the /lib/systemd/system/vncserver@.service file looks wrongly, it is
> actually correct.
The report was not really about what is correct or not but about a discrepancy between what tigervnc supplies and what it is using it its own scripts.
> This is not a bug, this is intentional.
Are you seriously suggesting that spilling error messages from package scripts is intentional? There are various ways to avoid this issue but package scripts need a bit of rewriting.
> there is no good mechanism how to use similar way with systemd.
Apparently you can put that on a banner and carry around.
(In reply to comment #2)
> (In reply to comment #1)
> > Although the /lib/systemd/system/vncserver@.service file looks wrongly, it is
> > actually correct.
> The report was not really about what is correct or not but about a discrepancy
> between what tigervnc supplies and what it is using it its own scripts.
Ah, sorry for misunderstanding, I read original description too quickly and though you talk that `/bin/systemctl try-restart vncserver.service` doesn't work from command line.
You are right the rpm scripts are wrong, I will fix this.
*** This bug has been marked as a duplicate of bug 753216 ***