Skip to content

Commit

Permalink
docs: vnc on raspberry pi
Browse files Browse the repository at this point in the history
  • Loading branch information
soulgalore committed Aug 27, 2024
1 parent 9b4c446 commit 949429f
Showing 1 changed file with 9 additions and 24 deletions.
33 changes: 9 additions & 24 deletions docs/documentation/sitespeed.io/installation/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,36 +204,21 @@ npm install sitespeed.io --location=global

9. (Optional) You need Geckodriver if you want to run tests using Firefox on your phone. The easiest way to get Geckodriver on your Raspberry Pi is to build it on that Pi. You do that by cloning the Geckodriver repo and build the version you want. Checkout how it's done at [https://github.com/jamesmortensen/geckodriver-arm-binaries](https://github.com/jamesmortensen/geckodriver-arm-binaries) and adapt it to your Raspberry.

10. (Optional) If you are using Raspberry Pi OS Desktop you can install scrcpy and vnc. Here's instructions how to use it together with a Mac. First install scrcpy:
~~~bash
sudo apt-get update && sudo apt-get install -y scrcpy
~~~
Then you need to enable vnc server.
~~~bash
sudo systemctl enable vncserver-x11-serviced
~~~
Then generate a password that you will use to connect to VNC from your computer
~~~bash
sudo vncpasswd -service
~~~
Then setup auth by edit the file */etc/vnc/config.d/common.custom*:
~~~bash
sudo nano /etc/vnc/config.d/common.custom
~~~
Add `Authentication=VncAuth` in the file and save and close.
Restart the vnc server:
~~~bash
sudo systemctl restart vncserver-x11-serviced
~~~
As the last step, make sure to export your display number to the environment variable DISPLAY.
10. (Optional) If you are using Raspberry Pi 5 OS Desktop you can install scrcpy. Here's instructions how to use it together with a Mac. First install scrcpy by building it on the Raspberry Pi following the instructions at [https://github.com/Genymobile/scrcpy/blob/master/doc/linux.md#latest-version](https://github.com/Genymobile/scrcpy/blob/master/doc/linux.md#latest-version).

Then you need to enable vnc server. Do it by running:

~~~bash
echo 'export DISPLAY=:0' >> ~/.profile
sudo raspi-config
~~~
Choose option 3. and then 3. again (VNC).

Reboot your device:
~~~bash
sudo reboot
~~~
On your Mac, open "Screen Sharing" and then use *raspberrypi.local* as the hostname and the password you set in the previous step. You will then be able to see the Raspberry PI screen on your Mac. Start **scrcpy** and you will see the phone screen too.

On your Mac, use "VNC Viewer" and then use *raspberrypi.local* as the hostname. You will then be able to see the Raspberry PI screen on your Mac. Start **scrcpy** and you will see the phone screen too.

11. Plugin your phone, "Allow USB debugging" on your phone and run sitespeed.io:
~~~bash
Expand Down

0 comments on commit 949429f

Please sign in to comment.