[2026-05-29] hermes kraken+eagle+deployment patterns, htpc magic4pc+steam emulators, tv luna-send
This commit is contained in:
@@ -0,0 +1,103 @@
|
||||
---
|
||||
title: WebOS TV — luna-send via SSH
|
||||
created: '2026-05-29'
|
||||
updated: '2026-05-29'
|
||||
type: tech
|
||||
namespace: family
|
||||
tags: [htpc, how-to, pitfalls]
|
||||
sources:
|
||||
- family/how-to/tv-luna-send.md
|
||||
- family/how-to/htpc-webos-luna.md
|
||||
confidence: medium
|
||||
related:
|
||||
- "[[tech/htpc-magic4pc]]"
|
||||
- "[[tech/htpc-kodi-layout]]"
|
||||
---
|
||||
|
||||
# WebOS TV — luna-send via SSH
|
||||
|
||||
`luna-send` on WebOS writes output to the TTY, not stdout. SSH without a
|
||||
PTY produces no output. The `script(1)` workaround captures output via a
|
||||
pseudo-TTY.
|
||||
|
||||
TV IP: `192.168.1.75` (aliases: `root@LGwebOSTV`, `root@tv`).
|
||||
|
||||
## The Problem
|
||||
|
||||
```bash
|
||||
ssh root@192.168.1.75 "luna-send -n 1 -f luna://..." # → silent
|
||||
ssh -t root@192.168.1.75 "luna-send -n 1 -f luna://..." # → still silent
|
||||
```
|
||||
|
||||
Root cause: `luna-send` detects whether its stdout is a TTY and refuses to
|
||||
write to a pipe.
|
||||
|
||||
## The Fix: script(1)
|
||||
|
||||
```bash
|
||||
ssh root@192.168.1.75 \
|
||||
"script -q -c \"luna-send -n 1 -f luna://com.webos.applicationManager/running '{}'\" \
|
||||
/tmp/o.txt; cat /tmp/o.txt"
|
||||
```
|
||||
|
||||
`script(1)` allocates a pseudo-TTY and records output to `/tmp/o.txt`.
|
||||
The wrapper then reads the file, filters the Script header/footer lines,
|
||||
and removes the temp file.
|
||||
|
||||
## Wrapper: tv-luna-send.sh
|
||||
|
||||
Location: `~/Automation/tv-luna-send.sh` on Eagle.
|
||||
|
||||
```bash
|
||||
# Usage (same flags as luna-send)
|
||||
~/Automation/tv-luna-send.sh [luna-send flags] luna://service/method 'json'
|
||||
|
||||
# List running apps
|
||||
~/Automation/tv-luna-send.sh \
|
||||
-n 1 -f luna://com.webos.service.applicationmanager/running '{}'
|
||||
|
||||
# Close an app
|
||||
~/Automation/tv-luna-send.sh \
|
||||
-n 1 -f luna://com.webos.service.applicationmanager/closeByAppId \
|
||||
'{"id":"me.wouterdek.magic4pc"}'
|
||||
|
||||
# Launch an app
|
||||
~/Automation/tv-luna-send.sh \
|
||||
-n 1 -f luna://com.webos.applicationManager/launch \
|
||||
'{"id":"me.wouterdek.magic4pc"}'
|
||||
|
||||
# Query magic4pc service status
|
||||
~/Automation/tv-luna-send.sh \
|
||||
-n 1 -f luna://me.wouterdek.magic4pc.service/query '{}'
|
||||
```
|
||||
|
||||
Set `TV_HOST` env to override the default target (`root@LGwebOSTV`).
|
||||
DNS resolves via home router at `192.168.1.1`.
|
||||
|
||||
## Common Luna URIs
|
||||
|
||||
| URI | Purpose |
|
||||
|-----|---------|
|
||||
| `.../applicationmanager/running` | List running apps |
|
||||
| `.../applicationmanager/closeByAppId` | Close app by ID |
|
||||
| `.../appInstallService/dev/install` | Install IPK (subscribe) |
|
||||
| `.../appInstallService/dev/remove` | Remove app |
|
||||
| `.../applicationManager/launch` | Launch app |
|
||||
| `.../applicationManager/getForegroundAppInfo` | Get active app |
|
||||
| `...magic4pc.service/query` | Magic4pc service status |
|
||||
|
||||
Full service prefix: `com.webos.service.applicationmanager`,
|
||||
`com.webos.appInstallService`, `com.webos.applicationManager`.
|
||||
|
||||
## Limitation: Subscribe Mode (-i)
|
||||
|
||||
`luna-send -i` (infinite subscribe, used for `dev/install`) does **not**
|
||||
work through the wrapper — it never terminates normally. The
|
||||
`magic4pc/webos/deploy.sh` handles install directly via `ssh+script` with
|
||||
inline polling for `"state":"installed"`.
|
||||
|
||||
## Where Used
|
||||
|
||||
`magic4pc/webos/deploy.sh` — close, remove, and launch steps in the deploy
|
||||
pipeline. See [[tech/htpc-magic4pc]] for the full magic4pc build and deploy
|
||||
workflow.
|
||||
Reference in New Issue
Block a user