Although x11vnc does have a simple configuration file, it's generally easier to specify options on the command-line. To start x11vnc, type:
x11vnc -safer
To set x11vnc to request access each time, include the -nopw -accept popup:0 options
To set x11vnc to only listen for the next connection, include the -once option
To set x11vnc to continually listen for connections, include the -forever option
To set a password, include the -usepw option (and remove the -nopw option above)
To put x11vnc in view-only mode, include the -viewonly option
To set x11vnc to only allow local connections, include the -localhost option
For example, if you want x11vnc to grant view-only access to the next local connection after asking your permission, type this on the command-line:
x11vnc -safer -localhost -nopw -accept popup:0 -once -viewonly -display :0
If you use a password, you will first need to create a password file by doing:
x11vnc -storepasswd
Make sure to use a hard-to-guess password
Connecting to your login screen
Because X11vnc is run from the command-line, it can be started while your computer is still showing a login screen. Exactly how to do this depends on which derivative of Ubuntu you use. In Ubuntu (but not Kubuntu or Xubuntu), x11vnc needs superuser access, and needs the -auth /var/lib/gdm/:0.Xauth -display :0 options to be specified on the command-line.
You can run x11vnc before you've logged in by typing something like this:
sudo x11vnc -safer -localhost -once -nopw -auth /var/lib/gdm/:0.Xauth -display :0
Or you can add the following lines to the bottom of your /etc/gdm/Init/Default to have x11vnc start after your gnome login does:
# Start the x11vnc Server
/usr/bin/x11vnc
(Thanks to the x11vnc FAQ for this tip)
# = vnc4server = # # RealVNC server # # This has been commented out, because it's not obvious what benefits Xvnc provides over x11vnc
No comments:
Post a Comment