Skip to content

Repository files navigation

#+title: reView

Live stream and take snapshots of the contents of your [[https://remarkable.com/][reMarkable tablet]].
Based on [[https://github.com/rien/reStream][reStream]].

#+BEGIN_HTML
<p align="center">
    <a href="https://remarkable.com/store/remarkable">
        <img src="https://img.shields.io/badge/reMarkable_1-unsupported-red">
    </a>
    <a href="https://remarkable.com/store/remarkable-2">
        <img src="https://img.shields.io/badge/reMarkable_2-supported-green">
    </a>
    <a href="https://remarkable.com/store/remarkable-paper/pro">
        <img src="https://img.shields.io/badge/reMarkable_Paper_Pro-unsupported-red">
    </a>
</p>
#+END_HTML

Please note that this project is still under heavy development.
The server will open a port (6680 per default) on your reMarkable tablet.
It authorizes incoming connections via SSH.
I am no cybersecurity expert, so please DON'T rely on the correctnes of the implementation.
Also, the content of the connection is NOT encrypted.
Please refer to the SSH section for further details.

#+BEGIN_HTML
<p align="center">
    <a href="https://img.shields.io/badge/Version-v0.2.0-blue">
        <img src="https://img.shields.io/badge/Version-v0.2.0-blue">
    </a>
    <a href="https://github.com/cloudsftp/reView/actions/workflows/compile.yaml">
        <img src="https://github.com/cloudsftp/reView/actions/workflows/compile.yaml/badge.svg">
    </a>
</p>
#+END_HTML

* Prequisites

On the reMarkable you need

- The server installed and running as a service or manually.
  Please refer to the Usage section for setup instructions.
- An authorized public SSH key. Please follow [[https://remarkable.guide/guide/access/ssh.html#ssh-access][this]] manual.

On your PC you need

- Gstreamer
- Gstreamer Plugins Base
- Gstreamer Plugins Good

** Ubuntu

#+begin_src shell
sudo apt install libgstreamer1.0-0 gstreamer1.0-plugins-base gstreamer1.0-plugins-good
#+end_src

** openSUSE

#+begin_src shell
sudo zypper install gstreamer gstreamer-plugins-base gstreamer-plugins-good
#+end_src

* Usage

** Server

The server must be running.

To install it, first build (see later in this document) and then copy it to your reMarkable.

#+begin_src shell
scp review-server.arm.static root@${REMARKABLE_IP}:review-server
#+end_src

And then start it manually.

#+begin_src shell
ssh root@${REMARKABLE_IP}
RUST_LOG=trace ./review-server
#+end_src

Note: server does not exit when you run it as an SSH command directly and then abort it with Control+C.

You can also install it as a service.

#+begin_src shell
scp review.service root@${REMARKABLE_IP}:/etc/systemd/system
ssh root@${REMARKABLE_IP} 'systemctl enable --now review'
#+end_src

** Client

Options for the client can be set as command line options or environment variables.
Command line options override the environment variables.

*** Command Line Options

#+begin_src
Usage: review-client [OPTIONS]

Options:
      --remarkable-ip <remarkable-ip>  IP of the reMarkable tablet (default: 10.11.99.1)
      --tcp-port <tcp-port>            TCP port for video stream (default: 6680)
      --ssh-key <ssh-key>              Private SSH key file path. If not specified, attempting all keys in the SSH directory
      --framerate <framerate>          Framerate (default: 50)
  -h, --help                           Print help
  -V, --version                        Print version
#+end_src

*** Environment Variables

Corresponding keys:
- =REMARKABLE_IP=
- =REMARKABLE_TCP_PORT=
- =REMARKABLE_SSH_KEY_PATH=
- =REMARKABLE_FRAMERATE=
# - =REMARKABLE_DARK_MODE=
# - =REMARKABLE_SHOW_CURSOR=

* Building

** Client

Just build it

#+begin_src shell
cargo build --release --bin review-client
#+end_src

Or with [[https://dagger.io/][dagger]]

#+begin_src shell
dagger call build-client --source . export --path review-client
#+end_src

** Server

With [[https://dagger.io/][dagger]]

#+begin_src shell
dagger call build-server --source . export --path review-server.arm.static
#+end_src

* Development

** Additional Dependencies

*** openSUSE

#+begin_src shell
sudo zypper in gstreamer-devel gstreamer-plugins-base-devel
#+end_src

* SSH

SSH is only used for authorization, not encryption.

** Authentification

1. The server send a randomly generated 256 byte authorization token to the client.
2. The client signs this token with either the explicitly specified private SSH key,
   or all the private SSH keys in the default SSH directory (=~/.ssh=).
   Then it sends the signatures to the server.
3. The server verifies each one of the signatures with each authorized keys in the default authorized keys file (=/home/root/.ssh/authorized_keys=), until one of the authorized keys matches the signature.

You can explicitly set the private SSH key to be used via a command line option or an environment variable.

About

Stream and Screenshot your reMarkable Tablet over TCP

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages