systemd & vnc - how to properly handle /etc/sysconfig/vncservers
Adam Tkac
atkac at redhat.com
Wed Jul 20 09:48:44 UTC 2011
Hello all,
I'm trying to package systemd service file for tigervnc server and to
find a solution how to make it backward-compatible with current format
of the /etc/sysconfig/vncservers.
Current /etc/sysconfig/vncservers has following options (example):
VNCSERVERS="1:user1 2:user2"
VNCSERVERARGS[1]="-arg1 -arg2"
VNCSERVERARGS[2]="-arg3 -arg4"
With arguments above traditional SysV initscript starts Xvnc instances
for displays :1 and :2 which run under appropriate user (user1 and user2
in this example) and passes arguments to Xvnc.
If I understand systemd correctly it's a bad idea to try start multiple
instances of the Xvnc via one systemd service file - I'm fine with this,
admin will have to create multiple service files for multiple Xvnc
instances.
However is there any way how to extract correct bits from the sysconfig
file? I think it's easy with the VNCSERVERARGS[num] variable but I don't
have any idea how to extract proper user from the VNCSERVERS variable.
Does systemd support some kind of regex matching for the $<name>
variables got from sysconfig files?
Any idea how to handle the VNCSERVERS argument in backward-compatible
way is welcomed, otherwise I will simply drop sysconfig support at all
in the service file and admin will have to create /etc/systemd/system/
service files with appropriate params.
Thanks in advance for your comments.
Regards, Adam
More information about the devel
mailing list