ddev-tightvnc
is a DDEV add-on that provides VNC (Virtual Network Computing) capabilities for DDEV projects via tightvncserver. This allows developers to access a graphical desktop environment within their DDEV containers. The primary motivation for this add-on is to enable developers to visually monitor browsers, such as Chrome, being controlled by automation tools like Puppeteer. However, it is versatile enough to be used for any purpose requiring a graphical interface within a DDEV container.
- Monitor Headless Browsers: Ideal for witnessing Chrome being controlled by Puppeteer.
- Graphical Interface: Access a minimal graphical desktop environment.
- Simple Setup: Easy to install and configure within any DDEV project.
To install ddev-tightvnc
, use the following commands:
ddev get thursdaybw/ddev-tightvnc
ddev restart
- Use a VNC client to connect to
localhost:5901
; For examplevncviewer localhost:5901
- Enter 'password' which has been preset during configuration.
- Use a VNC client to connect to
localhost:5901
; For examplevncviewer localhost:5901
- Enter 'password' which has been preset during configuration.
mkdir -p "~/.vnc"
echo "password" | vncpasswd -f > "${VNC_DIR}/passwd
vncviewer -passwd "~/.vnc/passwd" localhost:5901
To visually monitor Puppeteer controlling Chrome, follow these steps:
- Ensure your Puppeteer script is set up to run in a non-headless mode.
- Start your DDEV project and ensure the VNC server is running.
- Connect to the VNC server using a VNC client to watch the automation in action.
To run tests locally, use:
bats ./tests/test.bats
Tests are automatically run on push and pull request events.
If you encounter any issues, check the logs for the VNC server and your DDEV project. Logs can be found in the following locations:
- VNC server logs:
/var/log/supervisor/start-vnc.log
and/var/log/supervisor/start-vnc_err.log
- DDEV project logs: As configured in your DDEV setup
This project is licensed under the MIT License - see the LICENSE file for details.
- Thanks to the DDEV team for their support and contributions.