On Thu, 2014-02-20 at 18:44 -0700, Michal Jaegermann wrote:
On Thu, Feb 20, 2014 at 10:13:28PM +0100, Robert M. Albrecht wrote:
>
> But is there any official way to enable VNC on a headless server ?
>
> I can ssh to this machines, but how do I access this machine via VNC ?
>
> I can enable VNC in the Gnome Control Center if I connect a monitor,
> but how do I enable this via ssh ?
If you install tigervnc-server it comes with
/usr/lib/systemd/system/vncserver@.service
This has a header comment which starts like that:
# The vncserver service unit file
#
# Quick HowTo:
# 1. Copy this file to /etc/systemd/system/vncserver@.service
# 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`
#
.....
(and quite a bit more of relevant informations). I did not try that
myself but I do not see why this should not work.
> /etc/sysconfig/vncserver seems to be gone since F19 ?
Yeah; systemd actually allows to pass various configuration details via
"enviroment files" but a general tendency and apparently heavily
encouraged is to make this "copy and edit". Personally I am finding
that quite idiotic and detrimental to a long run maintenance. With an
every update you should check now if something did not change you need
to take care of. Multiply that by a number of such "hand configured"
services and here you are. An alternative is configure such a thing
once, forget it, and try to guess what is happening when in the future
something goes screwy.
The *point* of the copy-and-edit system is so the 'stock' configuration
can be updated and you don't wind up with .rpmnews all over the place.
If we ship it as /etc/systemd/system/vncserver@.service and you edit it,
it's never going to be 'magically' reconciled on update, you'll just get
a .rpmnew file. That's not any better.
Things could still change behind your back and make your /etc/sysconfig
file not work any more in the old system...
--
Adam Williamson
Fedora QA Community Monkey
IRC: adamw | Twitter: AdamW_Fedora | XMPP: adamw AT happyassassin . net
http://www.happyassassin.net