X11vnc Vs Tigervnc

  1. X11vnc Vs Vnc Server
  2. X11vnc Vs Tigervnc Mini
  3. Free Vnc Server Linux
  4. X11vnc Vs Tigervnc Pro

The creation of TigerVNC software was initiated by Red Hat with the goal of improving on TightVNC. TigerVNC development started from a snapshot of TightVNC code and has expanded support to include Linux and Mac as well as Windows, plus various performance and security enhancements. VNC Comparison and Review: TightVNC vs UltraVNC vs RealVNC. Virtual Network Computing (VNC) requires a client (viewer) to connect to the remote computer. There are mainly three popular candidates for clients: RealVNC, TightVNC, and UltraVNC. We’ll do a simple comparison here and choose the best one.

x11vnc is a VNC server, it allows one to view remotely and interact with real X displays (i.e. a display corresponding to a physical monitor, keyboard, and mouse) with any VNC viewer. While it is not developed any longer by its original author Karl Runge, LibVNC and the GitHub community have taken over the development.

x11vnc does not create an extra display (or X desktop) for remote control. Instead, it shows in real time the existing X11 display, unlike Xvnc, part of TigerVNC, which is an alternatives VNC server available in the official repositories.

Also note that x11vnc is not shipped with a client viewer. Any VNC viewer should do the job and be compatible with the x11vnc server while not necessarily using all its functionalities. TigerVNC's vncviewer is a recommended client.

Setting up x11vnc

Installation

Install x11vnc from the official repositories.

Starting

First, start X either by startx or through a display manager. You may need to set up X to run headless too.

Then, run the following command, all available options are explained in x11vnc(1).

Another option is to place the x11vnc command line in a script which is called at login, for example:

Note: The password 'PASSWORD' above is not secured; anyone who can run ps on the machine will see it. Also note that /var/log/x11vnc.log needs to be created manually and its ownership needs to match that of the user who will run it.

Setting X authority

You may set an X authority file for the VNC server. This is accomplished by using the -auth argument followed by the appropriate file, which will depend on how your X server was started. Generally, assigning an X authority file requires running x11vnc as root.

Start X

If that fails, you may have to run instead (as root):

Where user is the username of the user who is running the X server.

Running from xinetd

X11vnc can be run using a xinetd service, which only starts X11vnc once a user connects.

Create an xinetd service entry for x11vnc, for example:

After reloading xinetd.service, X11vnc will start once a client connects to port 5900.

Systemd

To run x11vnc when system boots, create the override with systemctl edit x11vnc.service. The content should be like the following

Replace the second ExecStart with the command you run interactively. Run systemctl enable x11vnc.service if you need.

GDM
Note: Newer GDM packages ship with Xwayland as the default display server backend. The following instructions, however, only apply when using Xorg (else .Xauthority is not created, and x11vnc fails to start). You are therefore advised to uncomment #WaylandEnable=false setting in /etc/gdm/custom.conf in order to proceed.

Newer versions of GDM uses /run/user. Example for user 120 (gdm), used for login screen.

or see Troubleshooting section below

Lightdm

Running from the bash:

LXDM
SDDM

SDDM uses an unpredictable UUID for the auth file [1] therefore one needs to:

Embedding this into a systemd .service file will require a trick to evaluate the find command as shown here [2].

SLIM
Warning: This will set up VNC with NO PASSWORD. This means that ANYBODY who has access to the network the computer is on CAN SEE YOUR XSERVER. It is a fairly simple matter to tunnel your VNC connection through SSH to avoid this. Or, simply set a password, as described below.
Note: The password will only encrypt the login process itself. The transmission is still unencrypted[3].

Setting a password

Running:

uses the password found in ~/.vnc/passwd, where the password is obscured with a fixed key in a VNC compatible format, or alternatively in ~/.vnc/passwdfile, where the first line of the file contains the password.If none of these files can be located, it prompts the user for a password which is saved in ~/.vnc/passwd and is used right away.

The VNC viewer should then prompt for a password when connecting.

Running constantly

X11vnc Vs Vnc Server

By default, x11vnc will accept the first VNC session and shutdown when the session disconnects.In order to avoid that, start x11vnc with either the -many or the -forever argument, like this:

It is also possible to use the following command :

this will restart the server once the session is finished

Accessing

Get a VNC client on another computer, and type in the IP address of the computer running x11vnc. Hit connect, and you should be set.

If you are attempting to access a VNC server / computer (running x11vnc) from outside of its network then you will need to ensure that it has port 5900 forwarded.

SSH Tunnel

You need to have SSH installed and configured.

Use the -localhost flag with x11vnc for it to bind to the local interface. Once that is done, you can use SSH to tunnel the port; then, connect to VNC through SSH.

Simple example (from http://www.karlrunge.com/x11vnc/index.html#tunnelling ):

(You will likely have to provide passwords/passphrases to login from your current location into your remote_host Unix account; we assume you have a login account on remote_host and it is running the SSH server)

And then in another terminal window on your current machine run the command:

Troubleshooting

1. You can check your ip address and make sure port 5900 is forwarded by visiting this[dead link 2020-04-03 ⓘ] website.

The factual accuracy of this article or section is disputed.

Reason:please use the first argument of the template to provide a brief explanation. (Discuss in Talk:X11vnc#)

2. Tested only on GNOME + GDM

If you cannot start the tunnel, and get error like XOpenDisplay(':0') failed,Check if you have a ~/.Xauthority directory.If that does not exist, You can create one easily (Actually a symlink to actual one) by running command given below as normal user NOT ROOT OR USING Sudo as below:

then try above tunneling example and it should work fine.Further if you want this to be automatically done each time Xorg is restarted, create the xprofile file & make is executable as below

3. GNOME 3 and x11vnc

If you are using GNOME 3 and x11vnc and you get the following errors

Try running x11vnc like

Please update if this works / not works for any other display manager or desktop environment.

Screensaver problem

If screensaver starts every 1-2 second, start x11vnc with -nodpms key.

IPv6 port different from IPv4 port

The default behavior for the command:

X11vnc

is for the server to listen to TCP port 5908 and TCP6 port 5900.For the server to listen to the same TCP6 port, also use the -rfbportv6 option to force the IPv6 listening port.For example:

Copying and Pasting

If copying and pasting does not work as expected, particularly if pasting to theremote side is not working or clipboard behaviour is not as expected, try adding-xkb:

Although the documentation does not indicate -xkb specifically forclipboard problems, it resolved an issue where vim complained that there wasnothing in the * register.

Tips and tricks

This article or section needs language, wiki syntax or style improvements. See Help:Style for reference.

Reason: Use Template:ic. (Discuss in Talk:X11vnc#)

Run x11vnc 'system-wide' in (GDM and GNOME Shell)

Note: This instructions will work only if you are using GDM and GNOME shell in Xorg

If you want to run x11vnc in GDM to login and then you want to run x11vnc in a GNOME shell user session for a 'system-wide' x11vnc you can acomplish that with the following steps

First we need to create a systemd service to launch a x11vnc server in GDM

This will start a x11vnc server protected by the password stored at USER_HOME/.vnc/passwd that shows the GDM to any connected VNC client, however as you may notice, if you click in any of the users, as soon as you login all the VNC clients will show a black screen

To fix this we need to create another systemd service that will start another x11vnc server in the GNOME Shell session as soon as you login

Now, you need to keep in mind 3 things

First, as you may notice in the 'ExecStart' part of the systemd service the command that executes can be separated in two tasks, first it stops the x11vnc-gdm.service (killing the gdm x11vnc server) and then it starts the x11vnc server for the user in the GNOME shell session, this was done like this because if you keep running the GDM x11vnc server in the background, the new x11vnc server for the user, is going to use the next available port, and you would need to change your client connection settings to connect either to the GDM x11vnc server or for your user specific x11vnc server, a setup like this is usefull because the GDM x11vnc server stops as soon as you login into your account.

Second, you need to create a service like this for each user that you want to have this functionallity, dont forget to replace the 'YOUR_USER' and 'USER_HOME' with your actual username.

Third, you need to keep in mind that you might need to change the '-display :X' part of the command to match your system setings, you can view your current display executing the following command.

use the output of the command to match the systemd service.

Now, as you might notice, the x11vnc-gnome-shell systemd service is executed as your (probably) unprivigiled user, this presents a problem if we want to stop the x11vnc-gdm.service so we need to allow the user to stop the GDM service, this is acomplished using sudo, but we need to allow the execution of only that specific command without a password, we can do that with the following steps

execute visudo as root

at the end of the file add the following line and save your changes

Now you now simply need to enable both systemd services as root

When you restart your computer both of them will start running and you can connect to your GDM and GNOME Shell using VNC

Run x11vnc 'system-wide' in (SDDM and PLASMA)

To run x11vnc when system boots into SDDM, if the aformentioned methods dont't work for you, just systemctl edit x11vnc.service like this:

Remember to change 'YOUR_USER' in the path, or use the preferred auth method. Disable the old x11vnc.service and execute systemctl daemon-reload, followed by systemctl enable x11vnc.service

Change x11vnc password in each boot

A setup like this could be useful is if you need to share your desktop with several people that you dont trust and you dont want to manually change the password every time, a setup like this would generate boot-unique passwords so if you share your password with someone, you only need to reboot your computer (or re-run the systemd service) and the password would change

The new generated password will be stored as PLAIN TEXT in the /home/$USER/.vnc/autovncpass so it can be accesed simply by using

Keep in mind that storing the password as plain text could represent a security threat, USE THIS AT YOUR OWN RISK.

Anyway, if you want to acomplish this, complete the following steps:

First install expect from the official repositories.

Then, create the following script anywhere in your home directory

Now we need to create a systemd unit file that will execute the script at boot time

Finally you just need to start/enable the systemd service using systemctl and the password will change

you can access the current password by using

See also

Retrieved from 'https://wiki.archlinux.org/index.php?title=X11vnc&oldid=662912'
X11vnc Vs Tigervnc

A previous article mentioned using a keyboard shortcut to launch vnc, something I gained experience with while using the Raspberry Pi. VNC is a method of remote computer access, but why use two servers? The answer is that one attaches to an actual display “:0” and the other, a virtual “:1”.

Using an actual display is essentially screen-sharing, where multiple users can manipulate the physical display simultaneously. To that end, a local user must be logged in and ready to share their desktop.

A virtual display is useful when one is using Linux in a “headless” configuration, where there is no local user involved.

For my purposes I did a “sudo apt-get install openssh-server x11vnc ssvnc tightvncserver” from the terminal.

While one could use the “/home/user/.vnc” folder to store configuration for both servers, I chose to make a separate one for x11vnc with commands:

mkdir ~/.x11vnc

x11vnc -storepasswd /home/user/.x11vnc/passwd

X11vnc Vs Tigervnc Mini

vncpasswd (and let is store its password in .vnc)

Setup the service from the instructions How to Install and Configure VNC on Ubuntu 16.04 | DigitalOcean.

After numerous attempts, I gave up on using SSL for the VNC security layer and opted for the more traditional SSH tunnel approach.

To connect to x11vnc I tunnel with command:

ssh -L 5902:localhost:5900 -N -f -l <user> <host>

While it’s this one for the tightvnc server:

ssh -L 5902:localhost:5901 -N -f -l <user> <host>

The command is saying map localhost port 5902 to remote port 590x. There is a relationship between the “port” and “VNC Host:Display” which is input in the form “host:display:port”. Display “0” is equivalent to port “5900” and display “1”, “5901”.

The display is essentially the last digit of the default VNC port number 590x. Using something like “192.168.0.2:1:5902” probably wouldn’t work since it’s like saying “192.168.0.2:1″ and 192.168.0.2:2” or “192.168.0.2::5901” and “192.168.0.2:1::5902”.

In some situations, “192.168.0.2:1” will work with the VNC client, and others “192.168.0.2::5901”. Just keep in mind the relationship and try things different ways.

Note that it isn’t necessary to use SSH or SSL. The purpose of both is to encrypt passwords so they aren’t transmitted across the network in “plain-text”. If using SSVNC with the tunneling commands, I mentioned earlier, be sure to set the “VNC Host:Display” to “localhost:2” and change the default encryption mechanism from “SSL” to “None”. The program will complain but it doesn’t know we’ve already handled the situation externally.

Free Vnc Server Linux

Now that there’s a vnc server running at boot on your Linux machine, you should be able to turn it on and just connect, even when it’s sitting at the login screen, right? Not necessarily. On Ubuntu variants using “network-manager”, check your network adapter settings “Network Tray Icon > Edit Connections > Ethernet/Wi-Fi subheading (your connection) > General”. Ensure that it is “Available to all users”. This seems to be the default on Ethernet but not Wi-Fi connections. If it isn’t available to all users, the network won’t connect before login.

X11vnc Vs Tigervnc Pro

Additionally, it might be worthwhile to check your router/DSL modem/Cable modem/etc. settings for a “DHCP Reservation” option. It’s a nifty way to associate a MAC address to an I.P. so that you don’t have to touch any settings on the client computer and yet it is always assigned the same network address. Makes using VNC easier if you have trouble connecting to it by host-name.