Installing the Mac service
ecran-agent is a small service that runs in your user session: it connects to the screen, describes your keys to it, and carries out your presses. One binary, one config file, one command.
Every command is typed in your Mac's Terminal, under your own account: nothing needs sudo. In the examples, the screen's address is 192.168.1.50 — replace it in full with your screen's —, and your home folder is /Users/me.
1Download and verify
Apple silicon or Intel? This command answers arm64 for the first, x86_64 for the second:
uname -m
Fetch the matching binary and the checksum file, then check one against the other.
curl -fLO https://marquee.yg-devworks.com/telechargements/v1.2.0/ecran-agent-darwin-arm64
curl -fLO https://marquee.yg-devworks.com/telechargements/v1.2.0/SHA256SUMS
shasum -a 256 -c SHA256SUMS --ignore-missing
curl -fLO https://marquee.yg-devworks.com/telechargements/v1.2.0/ecran-agent-darwin-amd64
curl -fLO https://marquee.yg-devworks.com/telechargements/v1.2.0/SHA256SUMS
shasum -a 256 -c SHA256SUMS --ignore-missing
The last command must answer ecran-agent-darwin-arm64: OK (or amd64). If it says anything else, stop right there: the file isn't the one that was published.
2Install the binary
Install it where it's going to stay: the service will remember this path.
mkdir -p ~/bin
install -m 755 ecran-agent-darwin-arm64 ~/bin/ecran-agent
mkdir -p ~/bin
install -m 755 ecran-agent-darwin-amd64 ~/bin/ecran-agent
3The quarantine
Downloaded with curl, as above, the binary isn't quarantined: skip to the next step.
Downloaded with a browser, it is: macOS flags the file, and refuses to run a program that isn't signed with a Developer ID, which is the case of ecran-agent. Once the checksum is verified, remove the flag:
xattr -d com.apple.quarantine ~/bin/ecran-agent
The flag follows the file when install copies it: that's why you remove it from ~/bin/ecran-agent. On a file that doesn't carry it, the command answers No such xattr: nothing to worry about.
4The config
The config lives in ~/Library/Application Support/ecran-agent/config.json, with permissions 600: readable by you alone. The token is in it; if anyone else can read it, the service refuses to start, just like ssh.
mkdir -p ~/Library/Application\ Support/ecran-agent
touch ~/Library/Application\ Support/ecran-agent/config.json
chmod 600 ~/Library/Application\ Support/ecran-agent/config.json
Then, in your code editor, write into it:
{
"ecran": "192.168.1.50:8098",
"machine": "MacBook Pro",
"jeton": "<the same as in JETONS_MACHINES>",
"touches": [
{ "id": "terminal", "libelle": "Terminal", "application": "com.apple.Terminal" }
]
}
ecran- The host machine's address, and port
8098. machine- This Mac's name, exactly as it appears in
JETONS_MACHINESon the screen. jeton- The token you generated in the Installing the screen chapter, the same on both sides.
touches- Your keys: a first one here, all the others in the Creating your keys chapter.
The file is reread as soon as it changes. A typo in a field name is an error, not a field quietly ignored: the service then keeps the previous config, and the screen shows the error.
5The background service
~/bin/ecran-agent installer
It writes ~/Library/LaunchAgents/com.yg-devworks.ecran-agent.plist and loads it: the service starts straight away, then every time you log in, and comes back if it falls over. The LaunchAgent picks up your login shell's PATH: without it, launchd only hands out a minimal one, and a command installed with Homebrew would be nowhere to be found. The command answers:
installé : /Users/me/Library/LaunchAgents/com.yg-devworks.ecran-agent.plist — journal : /Users/me/Library/Logs/ecran-agent.log
6The “Local Network” prompt
Started by launchd, the service doesn't inherit Terminal's permissions. On its first launch, macOS asks whether it may access the local network, and keeps refusing it until you click Allow.
Missed the dialog, or said no? It can all be put right in System Settings → Privacy & Security → Local Network, by switching on ecran-agent.
Until you do, the log keeps repeating no route to host, even though the screen answers from Terminal. This check is only for that case: if the log says connecté, there's nothing to check here. The address is the one in the ecran key of your config.json, without its :8098:
nc -vz 192.168.1.50 8098
If this command says succeeded!, it isn't the network: it's the permission. Observed on the first deployment, on 2026-09-25: after the binary was replaced, one refused attempt, then a reconnection a second later, with no new prompt.
If it stays silent for a minute, then says Operation timed out, no machine answers at that address: it's wrong, or the screen is off. Compare it with the ecran key in your config.json.
7The log
tail -f ~/Library/Logs/ecran-agent.log
Once connected, it writes a line like this one, and the Keys page appears on the screen:
2026/09/25 21:42:03 écran 192.168.1.50:8098 : connecté comme "MacBook Pro"
Every change to config.json leaves a config relue : 3 touches (config reread: 3 keys) there, or the error that got it rejected.
Don't run ecran-agent by hand while the service is running. Two instances under the same name keep replacing each other on the screen, endlessly: each connection closes the previous one, which comes back a second later. To try it by hand, stop the service first (see Uninstalling, first command).
8YouTube Music
Optional. Do you listen to YouTube Music in Chrome on this Mac? The screen can show the track and control it: play/pause, next, previous. A Chrome extension reads the YouTube Music page and relays it to ecran-agent, which passes it on to the screen. What the screen shows of it is in the Music chapter.
The extension is downloaded alongside the agent, from the Download page: marquee-extension.zip, next to the checksum file SHA256SUMS. Check one against the other as in step 1: the command must answer marquee-extension.zip: OK. Then unzip the archive into a folder that's going to stay put: Chrome reloads the extension from it every time it starts, and loses it if the folder goes away.
shasum -a 256 -c SHA256SUMS --ignore-missing
unzip marquee-extension.zip -d ~/marquee-extension
From a clone of Marquee's repository, its extension folder works too.
- In Chrome, open
chrome://extensionsand turn on Developer mode. - Click Load unpacked, and pick the unzipped folder,
~/marquee-extension. - Reload the YouTube Music tab or window that's already open: the extension only gets into a page loaded after it.
Load the extension in a single Chrome profile. Two profiles that carry it keep replacing each other at the agent, endlessly: each connection closes the previous one, which comes back a second later.
The extension talks to the agent on this same Mac, at 127.0.0.1:8097: nothing leaves the Mac through it, and the agent only answers a Chrome extension, never a website. Once it's connected, the log says so:
2026/09/26 18:04:11 lecture : extension connectée
With several YouTube Music tabs open, the screen follows the one that started playing last: a paused tab never takes over from a tab that's playing.
Port 8097 already taken on your Mac? The log says so, and the keys carry on without YouTube Music. Pick another one with the lecture key in config.json, replacing 8097:
"lecture": "127.0.0.1:8097"
- A loopback address
127.0.0.1and a port, nothing else: the agent never listens on the network. With any other value, it doesn't listen at all, and the screen shows this error: config.json: “lecture” must be a loopback IP address with its port (127.0.0.1:8097).- The same port on both sides
- It's also written at the top of
service.js, in the extension's folder:const PORT = 8097;. Change both, reload the extension inchrome://extensions, then the YouTube Music tab. - An up-to-date agent
- Version 1.1.0 of the agent, and earlier ones, reject this field like any typo: update the agent before you add the key.
The key is only read when the agent starts, not when config.json is reread: after changing it, restart the service.
launchctl kickstart -k gui/$(id -u)/com.yg-devworks.ecran-agent
9Updating
Download and verify the new version as in step 1, install it as in step 2: install replaces the old binary. Then restart the service, so it picks up the new one:
launchctl kickstart -k gui/$(id -u)/com.yg-devworks.ecran-agent
The YouTube Music extension, if you loaded it: download the new marquee-extension.zip along with SHA256SUMS, verify it, and unzip it over the old one, into the same folder; -o replaces the files without asking.
shasum -a 256 -c SHA256SUMS --ignore-missing
unzip -o marquee-extension.zip -d ~/marquee-extension
In chrome://extensions, reload the extension (↻ on its card), then reload the YouTube Music tab or window: otherwise the old script stays in the page, cut off from the extension, and the screen loses the track. Same move after any change to the extension.
10Uninstalling
Stop the service, then remove it along with the binary:
launchctl bootout gui/$(id -u) ~/Library/LaunchAgents/com.yg-devworks.ecran-agent.plist
rm ~/Library/LaunchAgents/com.yg-devworks.ecran-agent.plist ~/bin/ecran-agent
The config and the log stay where they are. To delete them too:
rm -r ~/Library/Application\ Support/ecran-agent ~/Library/Logs/ecran-agent.log
The YouTube Music extension, if you loaded it, is removed in chrome://extensions, then its folder, ~/marquee-extension, goes to the Trash.
On the screen, remove this Mac from JETONS_MACHINES and restart the service: its token is now worth nothing.