rien / reStream

Stream your reMarkable screen over SSH.
MIT License
734 stars 56 forks source link

Misleading tip in README #38

Closed jacek-gorgon closed 3 years ago

jacek-gorgon commented 3 years ago

Point 3 in README.md links to https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent#generating-a-new-ssh-key which works great for github, but the main flow described there uses the Ed25519 scheme, which is silently not supported on the distro used for RM2 (at least), which in turn makes your script ask for password (which seems fine) and later fail cryptically.

The fix is to use the default RSA algorithm. Took me a few hours to figure this out.

Otherwise - truly remarkable script, even works on Windows without too much hassle. Thanks a lot!

rien commented 3 years ago

Aha, I didn't know GitHub recommended ed25519 keys and rM2 doesn't support those keys.

I think the solution here is to only allow reStream.sh to use key authentication, so the ssh command fails instead of prompting for a password. I will draft a fix soon.

@jacek-gorgon you mention getting reStream working on Windows. Would you mind writing out the steps you had to take to do this? I've had some questions about it recently and I would like to add a section for it to the README.

jacek-gorgon commented 3 years ago

Steps that made it work on Windows, roughly (half of the tools I already had):

  1. Get git for windows, which includes git-bash or get another windows-compatible bash.
  2. Get a win ffmpeg build (https://www.gyan.dev/ffmpeg/builds/ffmpeg-release-essentials.zip) and extract somewhere.
  3. Get lz4 (https://github.com/lz4/lz4/releases) and extract somewhere.
  4. Add the ffmpeg (bin) and lz4 folders to the Path environment variable (https://www.google.com/search?q=add+to+path+on+windows)
  5. Open/restart bash (to have new Path applied)
  6. Generate ssh key using ssh-keygen (no arguments, should create ~/.ssh/id_rsa)
  7. Send the public key to a cable-connected reMarkable2 using ssh-copy-id -i id_rsa root@10.11.99.1
  8. Try out ssh root@10.11.99.1 - should NOT ask for password.
  9. That's it, run ./reStream.sh and observe.

Feel free to reach out.

What I'm now trying to put together is have ffmpeg apply ESRGAN or similar state-of-the-art filters to smooth out the jagged output from reMarkable for better experience while screen-sharing. Manual experiments on captured frames with waifu2x show significant improvement, image seems properly anti-aliased when scaled up with noise reduction. Will let you know if I get some working results.