
A while back, I had made a post about making my own x11vnc service. The service file I made was called /lib/systemd/system/x11vnc.service
[Unit]
Description=x11vnc service
After=display-manager.service network.target syslog.target
[Service]
Type=simple
ExecStart=/usr/bin/x11vnc -forever -create -display :0 -auth <EDITED> -passwd <EDITED>
ExecStop=/usr/bin/killall x11vnc
Restart=on-failure
[Install]
WantedBy=multi-user.target
This actually worked pretty well, but while talking with a friend, he mentioned the heavy network traffic and overall slowness of using vnc, and I pointed out that there are a few things you can do to "speed things up." He was interested in seeing it, so I am posting it here.
To be honest, my homebrew doesn't include much more, here is my file:
[Unit]
Description=x11vnc service
After=display-manager.service network.target syslog.target
[Service]
Type=simple
ExecStart=/usr/bin/x11vnc -noxdamage -forever -create -display :0 -auth <EDITED> -passwd <EDITED>
ExecStop=/usr/bin/killall x11vnc
Restart=on-failure
[Install]
WantedBy=multi-user.target
This adjustment seemed to help me, and perhaps it will help others too. It is really handy if your desktop uses a compositor, with which, if you use -noxdamage, it will probably be a lot smoother.
A common one I see though, is using -ncache and -ncache_cr to cache images on the client side to save on bandwidth. I don't recommend using these, though. When I have tried them in the past, you can get really strange results from different clients. With Remmina, for instance, and these settings, the final display ends up a little teeny tiny screen, no matter how much you try to scale it. On other clients, you sometimes will have "black spots" until you move something accross them to force the server to send the pixels for that part of the screen again. Your mileage may vary, though, and it is worth a try if you can get it to work reliably.
Now, on the client side, you have a lot of options to help out with your bandwidth. Of course, you can always lower screen resolution, but another good one is requesting a lower color depth, but beware, sometimes that will actually crash your client, depending on the server setup.
Hopefully these few thoughts on vnc connections will help the next guy. They seem to work pretty well for me, I have little to no lag on my home network.
Linux - keep it simple.
[1] picoEngine