45 lines
1.7 KiB
Markdown
45 lines
1.7 KiB
Markdown
# WebOS TV — luna-send via SSH
|
|
|
|
TV IP: `192.168.1.75`, user: `root`
|
|
|
|
## Проблема
|
|
`luna-send` пишет вывод в tty, не в stdout. Через SSH без PTY — пусто.
|
|
|
|
## Решение — через `script`
|
|
```bash
|
|
ssh root@192.168.1.75 "script -q -c \"luna-send -n 1 -f luna://...\" /tmp/o.txt; cat /tmp/o.txt"
|
|
```
|
|
|
|
## Методы
|
|
|
|
### Список запущенных приложений
|
|
```bash
|
|
ssh root@192.168.1.75 "script -q -c \"luna-send -n 1 -f luna://com.webos.service.applicationmanager/running '{}'\" /tmp/o.txt; cat /tmp/o.txt"
|
|
```
|
|
|
|
### Закрыть приложение
|
|
```bash
|
|
ssh root@192.168.1.75 "script -q -c \"luna-send -n 1 -f luna://com.webos.service.applicationmanager/closeByAppId '{\"id\":\"APP_ID\"}'\" /tmp/o.txt; cat /tmp/o.txt"
|
|
```
|
|
|
|
### Удалить приложение (dev)
|
|
```bash
|
|
ssh root@192.168.1.75 "script -q -c \"luna-send -n 1 -f luna://com.webos.appInstallService/dev/remove '{\"id\":\"APP_ID\"}'\" /tmp/o.txt; cat /tmp/o.txt"
|
|
```
|
|
|
|
### Установить ipk
|
|
```bash
|
|
scp app.ipk root@192.168.1.75:/tmp/
|
|
ssh root@192.168.1.75 "script -q -c \"luna-send -n 1 -f luna://com.webos.appInstallService/dev/install '{\"id\":\"APP_ID\",\"ipkUrl\":\"/tmp/app.ipk\",\"subscribe\":true}'\" /tmp/o.txt; cat /tmp/o.txt"
|
|
```
|
|
|
|
### Запустить приложение
|
|
```bash
|
|
ssh root@192.168.1.75 "script -q -c \"luna-send -n 1 -f luna://com.webos.applicationManager/launch '{\"id\":\"APP_ID\"}'\" /tmp/o.txt; cat /tmp/o.txt"
|
|
```
|
|
|
|
## Не работает
|
|
- `ares-install/ares-launch` — требует dev mode (порт 9922)
|
|
- `listRunningApps` — нет метода, правильно: `running`
|
|
- `applicationManager/remove` — нет, правильно: `appInstallService/dev/remove`
|