ddvk / remarkable2-framebuffer

remarkable2 framebuffer reversing
MIT License
272 stars 22 forks source link

Open shm only if server is working & signal to systemd #87

Closed matteodelabre closed 2 years ago

matteodelabre commented 2 years ago

This changeset is aimed at giving more information to external processes as to whether the rm2fb server is running or not, in two ways:

 [Unit]
 Description=reMarkable 2 Framebuffer Server
 Before=xochitl.service launcher.service remarkable-reboot.service remarkable-shutdown.service
 After=opt.mount
 StartLimitInterval=30
 StartLimitBurst=5
 Conflicts=
 ConditionFileNotEmpty=/opt/lib/librm2fb_server.so.1

 [Service]
+Type=notify
 ExecStart=/usr/bin/xochitl
 Restart=on-failure
 RestartSec=5
 Environment="HOME=/home/root"
 Environment="LD_PRELOAD=/home/root/librm2fb_server.so.1.0.1"

 [Install]
 WantedBy=multi-user.target

To test, replace both librm2fb_server and librm2fb_client, update the rm2fb service definition as above, then:

matteodelabre commented 2 years ago

Thank you for testing!