{"id":13771385,"url":"https://github.com/rM-self-serve/webinterface-onboot","last_synced_at":"2025-05-11T04:30:40.493Z","repository":{"id":209119207,"uuid":"589349737","full_name":"rM-self-serve/webinterface-onboot","owner":"rM-self-serve","description":"Enable the web interface on boot. For the ReMarkable Tablet.","archived":false,"fork":false,"pushed_at":"2024-08-18T07:00:31.000Z","size":39,"stargazers_count":32,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-13T18:55:00.482Z","etag":null,"topics":["boot","hack","interface","no-cord","remarkable","remarkable-2","remarkable-tablet","web","webinterface"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rM-self-serve.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-15T21:52:13.000Z","updated_at":"2024-11-11T15:36:14.000Z","dependencies_parsed_at":"2023-11-25T08:20:19.812Z","dependency_job_id":"c40a1d27-f105-41b2-8116-feccc254ada1","html_url":"https://github.com/rM-self-serve/webinterface-onboot","commit_stats":null,"previous_names":["rm-self-serve/webinterface-onboot"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rM-self-serve%2Fwebinterface-onboot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rM-self-serve%2Fwebinterface-onboot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rM-self-serve%2Fwebinterface-onboot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rM-self-serve%2Fwebinterface-onboot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rM-self-serve","download_url":"https://codeload.github.com/rM-self-serve/webinterface-onboot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253518941,"owners_count":21921074,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["boot","hack","interface","no-cord","remarkable","remarkable-2","remarkable-tablet","web","webinterface"],"created_at":"2024-08-03T17:00:50.877Z","updated_at":"2025-05-11T04:30:40.220Z","avatar_url":"https://github.com/rM-self-serve.png","language":"Shell","readme":"![Static Badge](https://img.shields.io/badge/reMarkable-v3.13-green)\n[![rm1](https://img.shields.io/badge/rM1-supported-green)](https://remarkable.com/store/remarkable)\n[![rm2](https://img.shields.io/badge/rM2-supported-green)](https://remarkable.com/store/remarkable-2)\n[![opkg](https://img.shields.io/badge/OPKG-webinterface--onboot-blue)](https://toltec-dev.org/)\n[![Discord](https://img.shields.io/discord/385916768696139794.svg?label=reMarkable\u0026logo=discord\u0026logoColor=ffffff\u0026color=7389D8\u0026labelColor=6A7EC2)](https://discord.gg/ATqQGfu)\n\n# WebInterface-OnBoot\n\nThis program will convince the ReMarkable Tablet to start the \n[USB Web Interface](https://remarkable.guide/tech/usb-web-interface.html) after booting without the usb cable being plugged in.\nEliminates the need to switch on the web interface setting after connecting the usb cable.\nAlso useful for clients that leverage the USB Web Interface for file operations,\nnamely access over [wifi](https://github.com/rM-self-serve/webinterface-wifi).\n\n![demo](https://github.com/rM-self-serve/webinterface-onboot/assets/122753594/89d49258-01b9-42ff-b611-1144ce02621e)\n\n\n## ReMarkable Software Version Compatibility\n\n- ✅ \u003c= v2.14\n- ✅ \u003e= v2.15 - Requires simple binary hack\n---\n\n### Type the following commands after ssh'ing into the ReMarkable Tablet\n\n\n**It is recommended to install via the [toltec package manager](https://toltec-dev.org/).**\n\n### With toltec\n\n```\n$ opkg update\n$ opkg install webinterface-onboot\n$ opkg remove webinterface-onboot\n```\n\n### No toltec\n\n### Install\n\n`$ wget -q https://github.com/rM-self-serve/webinterface-onboot/releases/latest/download/install-webint-ob.sh \u0026\u0026 bash install-webint-ob.sh`\n\n### Remove\n\n`$ wget -q https://github.com/rM-self-serve/webinterface-onboot/releases/latest/download/install-webint-ob.sh \u0026\u0026 bash install-webint-ob.sh remove`\n\n## Binary Hack for Software Versions \u003e= v2.15\n\nIf applying other binary modifications such as [rM-hacks](https://github.com/mb1986/rm-hacks)\nor [ddvk's hacks](https://github.com/ddvk/remarkable-hacks), they will fail if webinterface-onboot has been applied.\nThus, it is necessary to apply webinterface-onboot after applying the other modifications.\nIf reverting other binary modifications after webinterface-onboot has been applied,\nit is necessary to revert webinterface-onboot before reverting these modifications.\n\n## Usage\n\n### To use webinterface-onboot, run:\n\n`$ systemctl enable webinterface-onboot`\n\nThen restart the device.\n\n### To stop using webinterface-onboot, run:\n\n`$ systemctl disable --now webinterface-onboot`\n\n### Status\n`$ webinterface-onboot --status`\n\n![demo](https://github.com/rM-self-serve/webinterface-onboot/assets/122753594/1decf76a-a03a-4ba9-b5ac-352d04d3d345)\n\n### Tailscale\nTo serve the USB Web Interface over tailscale after webinterface-onboot is working, use 'webinterface-localhost' from Toltec. \n\n## How Does It Work?\n\n### Definitions\n\n**USB Web Interface:** the server/website that runs on 10.11.99.1:80 and allows file uploads/downloads\n\n**usb0/usb1 network interface:** the device within the tablet that handles the ethernet connection\n\n**xochitl:** the ReMarkable ereader/ewriter executable binary file at /usr/bin/xochitl \n\n### Webinterface-Onboot\n\nUpon startup, Xochitl checks if 'WebInterfaceEnabled' is set to 'true' in /home/root/.config/remarkable/xochitl.conf.\nIf it is, the program then looks for an IP address on the usb0 network interface and,\nif found, starts the USB Web Interface using that address.\n\nThus, before xochitl starts:\n- set WebInterfaceEnabled=true in /home/root/.config/remarkable/xochitl.conf\n- give the usb0 network interface the ip address 10.11.99.1/32\n\n**This was true for versions \u003c= 2.14**\n\nAs of v2.15, the software introduces the possibility for another network interface, usb1.\nThis change adds the requirement that the usb0 network interface is also connected to the computer, so we need the...\n\n### Binary Hack\n\nWithout the hack, xochitl checks if the primary network interface *usb0*\nhas an IP address and is connected to a computer to start the USB Web Interface.\nIf not, it falls back to *usb1*, which only needs an IP address.\n\nTo make *usb0* the fallback interface, we modify the binary by changing the string *usb1* to *usb0*.\nThis way, xochitl will always fall back to *usb0* if it can't find the primary interface.\nWe also change the primary interface from the string *usb0* to *usbF* to prevent xochitl\nfrom finding it and make the hack easier to verify and revert.\n\n\u003e The strings 'usb0' and 'usb1' only occur once in the binary and appear only to be used within the\nfunction that decides on which network interface the web interface website should be started on. \n\n### Psudeo Code\n\n#### Before\n```\nif conf.WebInterfaceEnabled == true:\n\n    primary_interface = QNetworkInterface::interfaceFromName('usb0')\n    fallback_interface = QNetworkInterface::interfaceFromName('usb1')\n\n    if primary_interface.has_ip() and primary_interface.is_connected():\n        start_web_interface( primary_interface.ip )\n    \n    else if fallback_interface.has_ip():\n        start_web_interface( fallback_interface.ip )\n```\n\n#### After\n```\nif conf.WebInterfaceEnabled == true:\n\n    primary_interface = QNetworkInterface::interfaceFromName('usbF')\n    fallback_interface = QNetworkInterface::interfaceFromName('usb0')\n\n    if primary_interface.has_ip() and primary_interface.is_connected():\n        start_web_interface( primary_interface.ip )\n\n    else if fallback_interface.has_ip():\n        start_web_interface( fallback_interface.ip )\n```\n\n## How Does Persist Ip Work?\n\nThe IP address will be removed from usb0 when the cable is removed.\nIn order to restore the IP address, we modify an existing\nscript that runs every time the cord disconnects:\n\n```/etc/ifplugd/ifplugd.action```\n\n\n#### Before\n```\n...\n\nif [ \"$2\" = \"down\" ]\nthen\n    systemctl stop \"busybox-udhcpd@$1.service\"\nfi\n```\n\n#### After\n```\n...\n\nif [ \"$2\" = \"down\" ]\nthen\n    systemctl stop \"busybox-udhcpd@$1.service\"\n    ip addr change 10.11.99.1/32 dev usb0\nfi\n```\n","funding_links":[],"categories":["Interface Customization"],"sub_categories":["Template Builders"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FrM-self-serve%2Fwebinterface-onboot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FrM-self-serve%2Fwebinterface-onboot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FrM-self-serve%2Fwebinterface-onboot/lists"}