rien / reStream

Stream your reMarkable screen over SSH.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

restream process not stopping on remarkable when exiting window

Deckweiss opened this issue · comments

I had multiple issues with this script. (rm2 - 2.7.0.51)

  1. The process would not close on my PC.

    The main branch version lacks the kill$$ part at the end of the script

    I tried the stop-on-window-close branch, which didn't work at all. Aparently it changed many things around. So I took it as reference and modified the last block of the main branch script myself.

  2. The process would not close on my RM.

    I noticed this because my RM battery would drain quick after using reStream. I looked into it with htop and saw that there are multiple instances of the restream process running on my RM and chugging the CPU to 100%. After further trial I noticed that one gets added every time I share my screen and it stays active after closing the window.

    I fixed this by adding a trap function and killing the process via ssh. It didn't work in sh, so I changed it to bash as well, no idea if that can be done better.


Here is my full working version of the script that kills both processes on both ends when exiting the window.
https://gist.github.com/Deckweiss/541f85cb2f49dbf138181061130f1850