Enabling Remote VNC Administration by Command Line opensuse 13.1

I am writing a shell script to automate installation, update and setup of many opensuse 13.1 features in more than 100 desktops. I have not been able to find any solution in anywhere about how to enable the remote vnc administration from a command line. I do not want to run yast and then select remote vnc administration followed by a manual click on the enable button. I am looking for a command line solution from the super user prompt. Please help.

Edit /etc/xinetd.d/vnc, in particular remove the line “disable = yes” for the wanted service (vnc1 probably).

For an automated installation you could also just replace the whole file with your own edited version.

Thank you for your reply.

Your suggestion will only enable and activate VNC1,2,3 sessions for the yast -> Network Services -> Network Services (xinetd)

What I am looking for is a script that does YasT -> Network services -> Remote Administration (VNC) -> allow Remote Administration

I thought that’s what you wanted to do: Enable Remote VNC Administration.

That is exactly what YasT -> Network services -> Remote Administration (VNC) -> allow Remote Administration does in the end as well.

I originally edited the /etc/xinetd.d/vnc file as you suggested and restarted the xinetd network services. When I visited the “Remote Administration (VNC)” menu from YAST, the “enable button” was not highlighted. I rebooted the machine and the “enable button” was still OFF.
Should I ignore it or something else need to be done?

Sometimes Yast keeps settings in its own data thus change in a target may not reflect back to the control. The question is did the edit work not what the Yast GUI says?

Well, enabling “Remote VNC Administration” means enabling the vnc(1) service. Not more, not less.

If VNC works (which it should, unless you need different options which you can also specify in that file), you can just ignore that.

Probably the YaST module saves some flag somewhere else whether it itself has been used to enable or disable the option.
You could enable/disable it and find out which file(s) got changed on your hard disk.

Or have a look at the module’s source code what it does exactly. As it is written in ruby, the source code is already there on your hard disk:

From a quick glance it detects Remote Administration as enabled if xdm.service is enabled, DISPLAYMANAGER_REMOTE_ACCESS is set to “yes” in /etc/sysconfig/displaymanager, xinetd.service itself is enabled, and the vnc1 (or vnchttp1) service is enabled in xinetd.
So probably you just have to set DISPLAYMANAGER_REMOTE_ACCESS=“yes” as well (which enables XDMCP and is actually unrelated to VNC) to make YaST->“Remote Administration (VNC)” show the option as enabled.

I maintain my mother’s PC in Canada, from here in Europe. She is running openSUSE-12.3 and I am running openSUSE-13.1 . I launch VNC strictly from the command line as documented here:


Clearly one can make it more complex than that.

I think thou, those commands may provide an idea as to a different way to go about writing the script you have in mind.

In fact, about 8 or 9 years ago, Yaloki give me a script to do some of what you had in mind, but I did not use the script (my preferring to instead use the method I noted above (that Yaloki also taught me)) and I long since lost his script. Sorry.

(I use VNC for her PC maintenance so that she can see exactly everything I do on her PC)