# OpenVT with WayVNC / existing Wayland session

This setup should use the already-running sway/Wayland session instead of fake headless rendering.

## What we found

- sway is running
- a Wayland socket exists at `/run/user/1000/wayland-1`
- current shell is not inside that graphical environment by default
- `wayvnc.service` is currently inactive and had previously exited when the compositor went away

## Launch strategy

Run OpenVT inside the existing Wayland session environment:

```bash
devenv shell -- ./scripts/openvt-wayland-launch.sh
```

The launcher defaults to:

- `XDG_RUNTIME_DIR=/run/user/$(id -u)`
- `WAYLAND_DISPLAY=wayland-1`

Override if needed:

```bash
XDG_RUNTIME_DIR=/run/user/1000 WAYLAND_DISPLAY=wayland-1 devenv shell -- ./scripts/openvt-wayland-launch.sh
```

## Notes

- This is not true graphics-headless. It uses the existing remote Wayland desktop session.
- If OpenVT starts but a plugin complains, the remaining likely issue is the optional keylogger plugin.
- If the project window appears over WayVNC, we are on the right path.

## Current addon state

Built:

- `addons/gd_cubism/bin/linux/x86_64/libgd_cubism.linux.debug.x86_64.so`
- `addons/gd_cubism/bin/linux/x86_64/libLive2DCubismCore.so`
- `addons/gd-virtualcamera/linux/libgd-virtualcamera.linux.template_debug.x86_64.so`

Not fully built:

- `addons/keylogger` native library

That means global hotkeys may not work yet, but model rendering may still be usable.
