Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to configure VNC connection in raspberry pie

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces how to configure VNC connection in Raspberry Pi. The article is very detailed and has certain reference value. Interested friends must read it!

There are two parts, server-side configuration and client configuration.

I. Server configuration

1. Open the SSH server of the Raspberry Pi

Method 1: Execute the following command at the command line terminal

sudo raspi-config

Select enable in ssh.

Method 2: Execute directly on the command line

sudo /etc/init.d/ssh star

2. Install ssh client on big computer and connect raspberry pi

For Mac or Linux machines, you can run the following command (change IP to your own):

ssh 192.168.2.57 -l pi

3. Configure server-side parameters through ssh on the client side, install and run VNC server on the Raspberry Pi, tightvnc is recommended

The following commands can be run remotely via ssh.

First update the system, then install tightvnc, command as follows:

sudo apt-get update

sudo apt-get install tightvncserver

After installation, run tightvnc server as follows:

vncserver :1

Or set a specific screen resolution:

vncserver :1 -geometry 1440x900

Client Configuration (Mac)

The client is configured with Chicken-2.2b2 software.

as follows

Client (Mac), configure parameters with chicken

Click connect, the final effect is as follows

Connect Raspberry Pi via VNC

Command Line Parameter Description:

1:1, specify the number of the console.

Without this parameter tightvncserver will automatically look for the next free console starting with 1.

This parameter forces the specified console to be used, or an error is reported if the console is already started. Adding this parameter effectively prevents unintentional multiple launches of programs (which would launch multiple consoles) from wasting system resources.

II. Special console 0

Console 0 is the desktop that connects to the real monitor that actually outputs the image.

For VNC client, do not enter port number login, default login to console 0, convenient.

However, because No. 0 is a real desktop, there are conflicts with booting the desktop environment or using the startx command yourself.

III. Terminate VNC console:

tightvncserver -kill :1

View the list of running consoles:

ps ax | grep Xtightvnc | grep -v grep

The above is "How to configure VNC connection in Raspberry Pi" all the contents of this article, thank you for reading! Hope to share the content to help everyone, more relevant knowledge, welcome to pay attention to the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report