I want to use the Screen Sharing OSx built-in App to manipulate the actual X session open in my Raspberry PI.
Just to be clear I want to see in my VNC session the same image the Raspberry is sending through the HDMI. So I can move the mouse in my computer and the cursor is also moving in the Raspberry screen.
I have tried several combinations of vnc-servers and configs but neither have worked.
Open the Screen Sharing App and enter your Raspberry Pi's IP Address on your Mac. Click Connect when done. The Screen Sharing App will ask you for a password, enter the password you set for the VNC Server's Standard User. Click Sign In!
Turn on screen sharing on your Mac On your Mac, choose Apple menu > System Preferences, then click Sharing . If Remote Management is selected, deselect it. You can't have both Screen Sharing and Remote Management on at the same time. Select the Screen Sharing checkbox.
Plug one end of your ethernet cable into the ethernet port on the Raspberry Pi, and the other into your computer ethernet port. On your MacBook Air you may need and ethernet cable adapter. Next, power the BrickPi up. You should see the “PWR” LED solid, and the “ACT” LED on the Raspberry Pi begin to blink (not solid).
Make sure all your Mac and Windows PC are connected to the same wi-fi network. Step 1 Open System Preferences - Display on your Mac. Check "Show mirroring options in the menu bar when available". Click blow icon on the top right corner of your Macbook and choose the Windows you want to mirror to from the list.
As I have spent several hours solving this I so answer my self in case someone needs the instructions as I would wanted to find them.
First, the most popular vnc-server (tightvncserver) is not fullfilling my specification that the X-session has to be the same in my VNC client App and in the Raspberry screen.
The vnc-server that does the work is x11vnc
sudo apt-get install x11vnc
Looks like it requires you to set up a password:
x11vnc -storepasswd
You can already start the vnc-server:
x11vnc -forever -usepw -display :0 -ultrafilexfer
Check the service is active and listening
$ sudo netstat -nlp | grep vnc tcp 0 0 0.0.0.0:5900 0.0.0.0:* LISTEN 2575/x11vnc
And connect from your Mac just opening Screen Sharing and introducing the Raspberry's ip:
Config:
# ~/.config/autostart/x11vnc.desktop [Desktop Entry] Encoding=UTF-8 Type=Application Name=X11VNC Comment= Exec=x11vnc -forever -usepw -display :0 -ultrafilexfer StartupNotify=false Terminal=false Hidden=false
Be sure there is not problems to access to this file:
sudo chmod a+r ~/.config/autostart/x11vnc.desktop
sudo apt-get install netatalk sudo apt-get install avahi-daemon sudo update-rc.d avahi-daemon defaults
Config:
# /etc/avahi/services/afpd.service <?xml version="1.0" standalone='no'?><!--*-nxml-*--> <!DOCTYPE service-group SYSTEM "avahi-service.dtd"> <service-group> <name replace-wildcards="yes">%h</name> <service> <type>_afpovertcp._tcp</type> <port>548</port> </service> </service-group>
Config 2:
# /etc/avahi/services/rfb.service <?xml version="1.0" standalone='no'?> <!DOCTYPE service-group SYSTEM "avahi-service.dtd"> <service-group> <name replace-wildcards="yes">%h</name> <service> <type>_rfb._tcp</type> <port>5900</port> </service> </service-group>
Restart service:
sudo /etc/init.d/avahi-daemon restart
Using Finder into the section Shared > All... should be your Raspberry. From there you can click in the button Share Screen...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With