Rabu, 16 November 2016

Tentang VNC di Raspberry PI


By default, VNC® Server from RealVNC® gives you remote access to your Raspberry Pi's graphical desktop, as if you were sitting in front of it.
However, you can also use VNC Server to gain visual remote access to your Pi if it headless or not running a graphical desktop, via a virtual desktop. See Creating a virtual desktop below.

ENABLING VNC SERVER

Although VNC Server is included on the Raspberry Pi by default, you will need to enable it yourself. VNC Server will then start automatically whenever your Raspberry Pi is powered on.
You can enable VNC Server graphically or via the command line:

ENABLING VNC SERVER GRAPHICALLY

  • On your Raspberry Pi, boot into the desktop.
  • Select Menu > Preferences > Raspberry Pi Configuration > Interfaces.
  • Ensure VNC is Enabled.

ENABLING VNC SERVER AT THE COMMAND LINE

You can enable VNC Server at the command line using raspi-config:
sudo raspi-config
Now, enable VNC Server by doing the following:
  • Navigate to Advanced Options.
  • Scroll down and select VNC > Yes.

CONNECTING TO YOUR RASPBERRY PI WITH VNC VIEWER

  • On your Raspberry Pi (using Terminal or via SSH) use these instructions or run ifconfig to discover your private IP address.
    If you have graphical access, you can alternatively double-click the VNC icon on your taskbar to open the VNC Server dialog:

  • On the device you'll use to take control, download VNC Viewer. For best results, use the compatible app from RealVNC.
  • Enter your Pi’s private IP address into VNC Viewer.
    Note: Extra steps are required if you are connecting over the Internet.
  • Take control of your Pi, as if you were sitting in front of it.

PLAYING MINECRAFT AND OTHER DIRECTLY RENDERED APPS REMOTELY

You can remotely access apps which use a directly rendered overlay, such as Minecraft, the text console, the Pi camera module, and more.

Note: Direct screen capture is an experimental feature. If you encounter problems, please let RealVNC know.
To turn this feature on:
  • On your Raspberry Pi, open the VNC Server dialog.
  • Navigate to More > Options > Troubleshooting and select Enable experimental direct capture method.
  • On the device you'll use to take control, run VNC Viewer and connect.
    Note: Existing connections must be restarted in order for these changes to take effect.
If you are connecting from a desktop computer and experience problems controlling a Raspberry Pi app which uses a directly rendered overlay:
  • On the keyboard of the device running VNC Viewer, press F8. Enable Relative Pointer Motion from the dropdown list.
  • Control the app remotely.
  • Disable Relative Pointer Motion when you have finished using the app.

CREATING A VIRTUAL DESKTOP

If your Raspberry Pi is headless (not plugged into a monitor) or controlling a robot, it is unlikely to be running a graphical desktop.
VNC Server can create a virtual desktop, giving you visual remote access to a Pi running in this way. This virtual desktop exists only in your Pi’s memory.

To create and connect to a virtual desktop:
  • On your Raspberry Pi (using Terminal or via SSH), run vncserver. Make note of the IP Address/display number that VNC Server will print to your Terminal (e.g. 192.167.5.149:1).
  • On the device you will use to connect, enter this information into VNC Viewer.

To destroy a virtual desktop, run the following command:
vncserver -kill :<display-number>
This will also stop any existing connections to this virtual desktop.

Reff: https://www.raspberrypi.org/documentation/remote-access/vnc/

Tidak ada komentar:

Posting Komentar