I’ve recently bought a reMarkable 2 and am happy with it. Since teaching is still happening online for the most part at the moment, I was curious whether I could use it as a drawing tablet, share the screen with my machine, and then pick that up in e.g. OBS Studio to share it to viewers.
Luckily, the reMarkable 2, like its predecessor, is hacker-friendly, and someone has already made a tool to do exactly this.
I’m working with Windows on my teaching machine, however, and wanted to avoid having to install Git BASH or MSYS2. Luckily, you can get the setup to work in a very portable fashion.
We’re going to follow more or less the installation instructions over at https://github.com/rien/reStream. First, we need to generate a SSH key pair on our machine:
C:\Users\Seppe> ssh-keygen -t rsa -C Your public key has been saved in C:\Users\Seppe/.ssh/id_rsa.pub.
This will save a public key in
C:\Users\Seppe/.ssh/id_rsa.pub (replace my username with yours). For the reMarkable 2, we need to use
Next, we need to add the identity using the ssh-agent:
C:\Users\Seppe> ssh-agent -s unable to start ssh-agent service, error :1058
If you get this error, head to services and enable/start the OpenSSH Authentication Agent:
C:\Users\Seppe> ssh-agent -s C:\Users\Seppe> ssh-add C:\Users\Seppe/.ssh/id_rsa Identity added: C:\Users\Seppe/.ssh/id_rsa (C:\Users\Seppe/.ssh/id_rsa)
Next, find the root password and IP address of your reMarkable (go to Settings, Help, Copyrights and licenses and scroll down). Then connect to it:
C:\Users\Seppe> ssh email@example.com # If it doesn't exist already reMarkable: ~/ mkdir .ssh
And then, in another Windows terminal, copy over the public key:
C:\Users\Seppe> type %HOMEPATH%\.ssh\id_rsa.pub | ssh firstname.lastname@example.org "cat > .ssh/authorized_keys"
Finally, back in the SSH session, don’t forget to set the permissions correctly:
reMarkable: ~/ chmod -R og-rwx /home/root/.ssh reMarkable: ~/ exit
ssh email@example.com again. It should not ask for a password.
Finally, copy over the binary over to the reMarkable and make it executable:
C:\Users\Seppe> scp restream.arm.static firstname.lastname@example.org:/home/root/restream C:\Users\Seppe> ssh email@example.com 'chmod +x /home/root/restream'
ssh firstname.lastname@example.org -o ConnectTimeout=1 "./restream" | lz4 -d | ffplay -window_title Restream -vcodec rawvideo -loglevel info -f rawvideo -pixel_format gray8 -video_size 1872,1404 -i - -vf "transpose=2,transpose=1,setpts=(RTCTIME-RTCSTART)/(TB*1000000)"
And there we go:
transpose=1 can be replaced with
transpose=0 for portrait mode.