macos remote desktop connected to raspberry pi raspberry OS

General Shuiyu is here again to make up for his troubles!

Let’s start with getting a fully functional Raspberry Pi...

First, use the raspberry pi imager app to burn a system for our raspberry pi. Use this app to allow ssh login from the beginning.

Make sure the Raspberry Pi and Mac are in a LAN and both have access to the Internet.

After the system is burned and the mac can ssh to the Raspberry Pi, log in. Then sudo raspi-config, find interface options, mainly check enable vnc. Here the Raspberry Pi will need to be restarted to update settings.

Next, log on to the Raspberry Pi again and sudo apt-get install realvnc-vnc-server realvnc-vnc-viewer. After installing these two software, there will be many more directories mainly distributed in /etc/vnc and /root/.vnc. Here we only need to find the file /root/.vnc/config.d/vncserver-x11 and modify it.

The first three lines are mainly added, and the rest are generated by the system itself, so you don’t need to read them. The password is filled in after hashing. There is a shortcut command that can generate a password and its corresponding hash string. vncpasswd -print. This command will ask you to enter a clear text password, and then it will give you a hash string, which can be copied to the file above.

Next, restart the vnc service, sudo systemctl restart vncserver-x11-serviced.

When you come to the mac side,  directly look for the screen sharing that comes with the system or call it screen sharing. Enter the IP of the Raspberry Pi. As expected, it will pop up a dialog box asking you to enter the password. At this time, enter the clear text password to log in to the Raspberry Pi. Pie desktop.

Finally, a friendly reminder, for students who don’t like to log in to the desktop and prefer to use the command line, you can usually turn off vnc.

Guess you like

Origin blog.csdn.net/u011410413/article/details/129700557