Skip to content

Instantly share code, notes, and snippets.

@breiting
Created March 19, 2021 15:57
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save breiting/6cd7d55f829bcfc88d2c46eb3a089d14 to your computer and use it in GitHub Desktop.
Save breiting/6cd7d55f829bcfc88d2c46eb3a089d14 to your computer and use it in GitHub Desktop.
Single script for starting a screen share session with reMarkable
#!/bin/sh
#
# Share the content of the reMarkable on the desktop.
# Requires: https://github.com/owulveryck/goMarkableStream
# Install the remote binary on the reMarkable in the $HOME folder and
# the local client under your $PATH (e.g. /usr/local/bin).
RM_IP=192.168.1.148
# needs to be in your $PATH
CLIENT_EXE=goMarkableClient
RM_PORT=2000
export RK_SERVER_ADDR=${RM_IP}:${RM_PORT}
# Start rM service
ssh root@remarkable './goMarkableStreamServer.arm /proc/$(pidof xochitl)/mem' &
RM_PID=$!
echo "Started rM with PID ${RM_PID}"
# let the rM settle
sleep 2
${CLIENT_EXE} &
CLI_PID=$!
echo "Started local service with PID ${CLI_PID}"
sleep 1
# Start viewer
mpv "http://localhost:8080/video" --video-rotate=270 --profile=low-latency
kill ${CLI_PID}
kill ${RM_PID}
@manueliglesias
Copy link

Thank you!

My two cents: In the mpv command, --no-osc --no-input-default-bindings to hide the on screen controls and disable input bindings (I was accidentally pausing the video by right-clicking on the mpv window)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment