Raspberry Pi RemoteAccess over VNC

We have two ways to get access to a R-Pi over VNC:

1 – Direct to the Main and Active Session 0

2 – Access to Second and additional Sessions and without Active Session 0 on the Connected Monitor.

for Option 1 we need simply to install x11vnc and the to run:
x11vnc -noxdamage -display :0 -safer -nopw -once -xrandr

you will need to check the options because it is depend on your requirements to run x11vnc

Pro: you have direct access to the primary Desktop Session

Contra: you have no fixed desktop-size, if the monitor is not connected then the desktop is by to small resolution

The second option is to install a real vncserver, in our case I took:

sudo apt-get install tightvncserver

and configure it by :

 pi@PIHost ~ $vncserver

You will require a password to access your desktops.

Password:******
Warning: password truncated to the length of 8.
Verify:******
Would you like to enter a view-only password (y/n)? n

New 'X' desktop is PIHost:1

Creating default startup script /home/pi/.vnc/xstartup
Starting applications specified in /home/pi/.vnc/xstartup
Log file is /home/pi/.vnc/PIHost:1.log
pi@PIHost ~ $

to automate the Service you will need this File, /etc/init.d/vncserver, in this you can define the option how to run VNCServer

sudo chmod a+x /etc/init.d/vncserver

Then you can Manage the VNCService with following commands:

sudo service vnsserver start
sudo service vncserver stop

With following commands you can activate or deactivate the autostart of vncservice at boot:

sudo insserv vncserver
sudo insserv -r vncserver

that’s all!

Speichere in deinen Favoriten diesen permalink.

Kommentare sind geschlossen.