Autostart X11VNC Server Session On Archlinux Booting
Steps For XFCE:
1: Forward port #5900 to your server computer from your router
2: Install x11vnc : pacman -S x11vnc
3: Set Password :
x11vnc -storepasswd
Note: This can point to another location if you choose, but the default setting will automatically choose /home/your_user_name/.vnc/passwd and that is what I’ll use for this guide.
4: Create A Log File
Manually create an x11vnc.log file in: /home/your_user_name/.vnc/x11vnc.log
5: Command To Execute To Start (change your_user_name to your user name!)
x11vnc -nap -wait 50 -noxdamage -rfbauth /home/your_user_name/.vnc/passwd -display :0 -nocursor -forever -o /home/your_user_name/.vnc/x11vnc.log -bg
Notes: the rfbauth & log commands differ from Arch Wiki. The -nocursor command uses the host computer’s mouse pointer instead of the default weird “arrow” that x11vnc uses.
Autostart Method By Script (Do not use in conjunction with systemd method)
Create a file called x11vnc.sh 2 anywhere you want to save a script and add this to the file:
#!bin/bash
x11vnc -nap -wait 50 -noxdamage -rfbauth /home/your_user_name/.vnc/passwd -display :0 -nocursor -forever -o /home/your_user_name/.vnc/x11vnc.log -bg
Now right click the file, go to properties/permissions and check off “allow this file to run as a program”. Add the file to your autostart applications by making a custom entry in settings/session and startup/application autostart and point the entry to where you saved the x11vnc.sh 2 file. Name the startup entry whatever you want.
( source : https://forum.manjaro.org/t/guide-how-to-set-up-x11vnc-server-for-access-to-the-current-running-session/32525 )