{"id":13772154,"url":"https://github.com/pl-semiotics/rM-vnc-server","last_synced_at":"2025-05-11T04:31:10.739Z","repository":{"id":55375131,"uuid":"260651558","full_name":"pl-semiotics/rM-vnc-server","owner":"pl-semiotics","description":"Damage-tracking VNC server for the reMarkable tablet","archived":false,"fork":false,"pushed_at":"2021-07-06T01:51:10.000Z","size":22,"stargazers_count":88,"open_issues_count":9,"forks_count":7,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-05-03T21:32:35.447Z","etag":null,"topics":["remarkable-tablet"],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pl-semiotics.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-02T09:13:13.000Z","updated_at":"2024-11-04T12:30:42.000Z","dependencies_parsed_at":"2022-08-14T22:50:33.045Z","dependency_job_id":null,"html_url":"https://github.com/pl-semiotics/rM-vnc-server","commit_stats":null,"previous_names":["peter-sa/rm-vnc-server"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pl-semiotics%2FrM-vnc-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pl-semiotics%2FrM-vnc-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pl-semiotics%2FrM-vnc-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pl-semiotics%2FrM-vnc-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pl-semiotics","download_url":"https://codeload.github.com/pl-semiotics/rM-vnc-server/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253518941,"owners_count":21921074,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["remarkable-tablet"],"created_at":"2024-08-03T17:01:00.686Z","updated_at":"2025-05-11T04:31:09.780Z","avatar_url":"https://github.com/pl-semiotics.png","language":"C","funding_links":[],"categories":["Screen Sharing/Streaming"],"sub_categories":["Launchers"],"readme":"# Introduction\n\nThe [reMarkable tablets](https://remarkable.com) provide a very good\nexperience for digital writing/drawing. Unfortunately, sharing drawing\nin real-time is difficult, especially on Linux, where the official\nreMarkable cloud streaming does not work.\n\nSince the reMarkable uses an e-paper display, it's possible to extract\nhigh quality damage tracking information from the software responsible\nfor driving the display. This repository uses that information and\n[libvncserver](https://libvnc.github.io) to implement a simple\nwell-performing VNC server. This allows streaming the display contents\noff the device to any VNC/RFB client. Performance is quite good, at\nleast when using the ZRLE compression built into libvncserver; over\nUSB connections, drawing is quite smooth, with negligible latency.\nLarge framebuffer updates, such as opening or closing a notebook, are,\nin fact, frequently displayed on the client before the reMarkable\nscreen has finished refreshing. The code has been less well tested\nover WiFi connections; drawing over an SSH tunnel over a WiFi\nconnection seems to occasionally stutter due to unpredictable latency,\nalthough unencrypted connections still seem to perform well.\n\nDependent projects provide the damage-tracking information that is\nrequired. For the rM1, the required information is extracted from the\nkernel, using\n[mxc_epdc_fb_damage](https://github.com/pl-semiotics/mxc_epdc_fb_damage).\nFor the rM2, the epaper display is driven from userspace software,\nrather than from the integrated e-paper display controller on the\nprocessor (which the rM1 used), and so damage information is\nunfortunately not available outside of the process driving the\ndisplay. Currently, all known deployed drivers for the display (most\nnoticeably `xochitl`, the official interface on the rM), use a\nproprietary library `libqsgepaper.a` to draw to the display. The rM2\nversion of the server therefore uses\n[libqsgepaper-snoop](https://github.com/pl-semiotics/libqsgepaper-snoop),\nwhich injects a damage-reporting stub into processes that use\n`libqsgepaper.a` to control the rM2 framebuffer.\n\n## Input support\n\nThe VNC server also supports injecting input from the VNC clients into\nthe reMarkable's input devices, using\n[rM-input-devices](https://github.com/pl-semiotics/rM-input-devices).\nCursor movements with button 3 active are sent to the tablet as touch\nevents. Cursor movements with button 1 active are sent as wacom stylus\ncontacts at full pressure (allowing rudimentary drawing). Cursor\nmovements with button 2 active are sent as wacom stylus\nmovement-within-proximity-but-without-contact events. Keyboard keys\nleft/up/page up are sent as a left key, which moves back a page in the\ncurrent notebook; right/down/page down similarly are sent as a right\nkey to move forward a page. Home and escape are sent as the home key,\nwhich generally returns to the home page of xochitl.\n\n## Cursor location reporting\n\nIf a VNC client supports the cursor position pseudo-encoding, the\nposition of the wacom stylus is sent to it. Unfortunately, sending pen\nstatus such as in/out-of-proximity/contact events is not easy to do in\nthe current protocol; a protocol extension may be warranted if clients\nwould find such information useful.\n\n# Building\n\nThe supported way to build this is via the\n[Nix](https://nixos.org/nix) package manager, through the\n[nix-remarkable](https://github.com/pl-semiotics/nix-remarkable)\nexpressions. To build just this project via `nix build` from this\nrepo, download it into the `pkgs/` directory of `nix-remarkable`.\n\nThere are four variants that can be built: for either rM1 or rM2, and\nin a \"standalone\" configuration or not. The standalone configuration\nwill statically link against all libraries not installed on the\nreMarkable by default, and will bundle necessary kernel modules and\ntools; it is recommended unless you have a particular need for\nsharing. By default, the Nix expressions will build all variants.\n\nFor other systems, the commands needed to compile and link are given\nin the [Makefile](./Makefile). Build dependencies depend on the\nconfiguraiton being built, but all versions require libvncserver\n(built for the reMarkable) and the reMarkable kernel headers as well\nas the `rM-input-devices.h` from\n[rM-input-devices](https://github.com/pl-semiotics/rM-input-devices).\n\nFor the reMarkable 1, the `mxc_epdc_fb_damage.h` file from\n[mxc_epdc_fb_damage](https://github.com/pl-semiotics/mxc_epdc_fb_damage)\nis also required; for the reMarkable 2, the `libqsgepaper-snoop.h`\nfile from\n[libqsgepaper-snoop](https://github.com/pl-semiotics/libqsgepaper-snoop)\nis needed instead.\n\nFor all versions, the -standalone versions require the standalone\nstatic library versions of the relevant\ndependencies---[rM-input-devices](https://github.com/pl-semiotics/rM-input-devices)\nfor both,\n[mxc_epdc_fb_damage](https://github.com/pl-semiotics/mxc_epdc_fb_damage)\nfor the rM1, and\n[libqsgepaper-snoop](https://github.com/pl-semiotics/libqsgepaper-snoop)\nfor the rM2.\n\nPrebuilt binaries are available in the [Releases\ntab](https://github.com/pl-semiotics/rM-vnc-server/releases).\n\n# Usage\n\nCopy the relevant executable to the device and run it; this will start\na vnc server listening on port 5900. Any VNC client should be able to\nprovide a (view-only) view of the tablet's screen when pointed at the\nreMarkable's IP address and standard VNC port (5900).\n[Vinagre](https://gitlab.gnome.org/GNOME/vinagre),\n[Remmina](remmina.org), and\n[gst-libvncclient-rfbsrc](https://github.com/pl-semiotics/gst-libvncclient-rfbsrc)\nhave been tested.\n\nNote that the server will bind to all available network interfaces by\ndefault, so only run this if the tablet's WiFi is disconnected or\nconnected to a trusted network. iptables rules could be used to\nrestrict traffic.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpl-semiotics%2FrM-vnc-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpl-semiotics%2FrM-vnc-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpl-semiotics%2FrM-vnc-server/lists"}