93 lines
1.6 KiB
Markdown
93 lines
1.6 KiB
Markdown
# wayviewer
|
|
|
|
A small Wayland-friendly VNC viewer written in C++.
|
|
|
|
## Build
|
|
|
|
Dependencies:
|
|
|
|
- CMake 3.16+
|
|
- C++17 compiler
|
|
- SDL2 development files
|
|
- libvncclient development files
|
|
- pkg-config
|
|
|
|
## Install
|
|
|
|
```sh
|
|
./install.sh
|
|
```
|
|
|
|
Uninstall:
|
|
|
|
```sh
|
|
./install.sh uninstall
|
|
```
|
|
|
|
System install:
|
|
|
|
```sh
|
|
./install.sh --system
|
|
```
|
|
|
|
Custom prefix:
|
|
|
|
```sh
|
|
./install.sh --prefix /path/to/prefix
|
|
```
|
|
|
|
## Build Manually
|
|
|
|
```sh
|
|
cmake --preset default
|
|
cmake --build --preset default
|
|
```
|
|
|
|
For a debug build:
|
|
|
|
```sh
|
|
cmake --preset debug
|
|
cmake --build --preset debug
|
|
```
|
|
|
|
## Run
|
|
|
|
```sh
|
|
./build/wayviewer HOST:5900
|
|
```
|
|
|
|
Use `./build/wayviewer --help` for all options.
|
|
|
|
## Launcher
|
|
|
|
Launching `wayviewer` without arguments from wofi opens a small floating-friendly window with one column of fields:
|
|
|
|
- Host
|
|
- Username
|
|
- Password
|
|
- Quality
|
|
|
|
Use `Tab` or the arrow keys to move between fields, `Enter` to connect, and `Escape`, `Ctrl+Q`, the window close button, or `Quit` to exit.
|
|
|
|
Install the binary and desktop entry into your user prefix:
|
|
|
|
```sh
|
|
cmake --install build
|
|
```
|
|
|
|
Then open wofi in `drun` mode and choose `wayviewer`.
|
|
|
|
## Source Layout
|
|
|
|
- `src/main.cpp`: process entry point
|
|
- `src/options.*`: command-line parsing and terminal prompts
|
|
- `src/ui_prompt.*`: graphical connection form
|
|
- `src/vnc_client.*`: VNC client setup and callbacks
|
|
- `src/viewer_state.*`: framebuffer state and dirty rectangles
|
|
- `src/input.*`: SDL input translation
|
|
- `src/sdl_app.*`: SDL window, rendering, and event loop
|
|
|
|
## Why?
|
|
|
|
Because I needed a VNC viewer that didnt suck and so here it is. Provided with no warranty to anyone who wants to build off of this hunk of complete trash
|