Automatic install and setup VNC server on Ubuntu

I use a script to automaticly install and setup VNC on many computers in my network.

Its easy.

sudo nano vncinstall

Paste this into it:

#!/bin/sh
apt-get -y remove --purge vino
apt-get -y install x11vnc
mkdir /etc/x11vnc
chmod 755 /etc/x11vnc
x11vnc -storepasswd yourvncpassword /etc/x11vnc/passwd
chmod 644 /etc/x11vnc/passwd
cat > /etc/init/x11vnc.conf <<_EOF
start on login-session-start
script
x11vnc -xkb -bg \
 -noxrecord \
 -noxfixes \
 -noxdamage \
 -display :0 \
 -auth /var/run/lightdm/root/:0 \
 -rfbauth /etc/x11vnc/passwd \
 -forever \
 -o /var/log/x11vnc.log
end script
_EOF

Then just:
sudo chmod +x vncinstall
sudo sh vncinstall

Your VNC server will be available on port 5900 and You will be able to interact with user.

No comments:

Post a Comment

pyenv+virtualenv on High Sierra

Install pyenv on Macos High Sierra brew update brew install pyenv brew install pyenv-virtualenv Install required python version: ...