Providing for all who want a perhaps simpler, explanatory “cookbook” for setting up VNC “Remote Administration” on openSUSE (all current supported versions).
Setting up the Server
By definition, the “Server” is the machine you’re remoting into which has the resources the Client wants to access.
The “Client” (section below) is the machine connecting to Server.
On any currently supported openSUSE,
-
Open YAST > Network Services > Remote Administration(VNC)
-
Click the radio button “Allow Remote Administration”
If in the future you want to disable VNC access, you can re-run this applet and select the “Do not allow…” radio button.
-
Click on the radio button to open the appropriate firewall ports.
-
Click on the “OK” button to start the installation. You will probably also be prompted to authorize installation of an x11 server, do so.
-
Reboot.
At this point, this machine should be set up to accept VNC connections.
The VNC Server service is actually called “xinetd.service” which will be configured to start automatically on boot. You can verify it’s running with the following command
systemctl status xinetd..service
Besides re-running the YAST Remote Administration applet, you can also control VNC server behavior with standard sytemd commands,
If you don’t want the VNC Server to be started on boot, you can run the following so that the VNC Server needs to be started manually(You can re-enable start on boot with “enable” instead of “disable”)
systemctl disable xinetd.service
If you want to start/stop/restart the VNC Server, you can use these standard systemd commands
systemctl start|stop|restart xinetd.service
Inspecting and configuring VNC displays
A VNC Server installed using the YAST applet automatically sets a default configuration for vncserver client apps and another for java applets (typically running in a web browser) so it’s not absolutely necessary to look at this when first installed and testing but you may want to look at this as soon as you want something different than default. Additional displays are available but are disabled. You can also create additional custom displays by simply adding your own stanzas to the configuration file.
The vnc displays configuration file
/etc/xinetd.d/vnc
You are recommended to open this file in your favorite text editor (requires elevated permissions if you wish to edit).
You will notice that each display not only specifies a display number (This is how the client specifies the configuration), but also the resolution and color depth. Mix and match or create to suit your specific need.
You can enable any of the disabled configurations by simply changing the line “disabled=yes” to “disabled=no”
If you make changes to this configuration file (/etc/xinetd.d/vnc) then you will need to reload the service. Instead of the command in the official documentation I recommend the following command which reloads all services on the system.
Don’t forget, the following is required if you change configuration files (actually applies to any and all systemd services)
systemctl daemon-reload
The VNC Client
Nearly every default openSUSE automatically includes the VNC client, you can test by running a command like the following
vncviewer --help
if for some odd reason the above command fails, then you can install the tigervnc package
zypper in tigervnc
By default, no password is required when connecting to a remote VNC server.
The following should launch the vnc client, and by not specifying a display number will use the default (display 1)
Substitute “remote_machine” with an IP address or a resolvable name
vncviewer* remote_machine*
The VNC Java Applet viewer
The java applet is typically used in a web browser, of course this means that Iced Tea or some other Java plugin must be installed and enabled in the web browser. Depending on the security restrictions, nowadays, you may be prompted a number of times to authorize access before you will be successfully connected.
To use the Java applet in a web browser, you will need to specify a port number that corresponds with an enabled VNC Server java configuration (see above “Inspecting and configuring VNC displays”).
The following should immediately work without special configuration connecting to an openSUSE VNC server by specifying port 5801. You can access other enabled displays by specifying a different port (eg 5802, 5803, etc). Substitute “server_machine” with an IP address or resolvable name.
https://*server_machine*:5801
OK, I think that pretty much covers the basics for anyone setting up VNC and Remote Administration for the first time.
I don’t think I’ve described anything differently than what is in the openSUSE docs, only differently with some slight modifications replacing sytemd commands in place of SysVinit commands.
If people think that anything in this might improve what is in the original docs, you can let the openSUSE docs people know, they seem to be OK with feedback.
Based largely on the original community openSUSE documentation on VNC and Remote Administration at
https://doc.opensuse.org/documentation/leap/reference/html/book.opensuse.reference/cha.vnc.html
Any questions or need for clarity, just post.
HTH,
TSU