summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitrii Morozov <snoopdesigns@gmail.com>2025-11-23 16:11:19 +0100
committerDmitrii Morozov <snoopdesigns@gmail.com>2025-11-23 16:11:19 +0100
commitc9083542f68faaa6329f71bfaf90ee44d7b1ae39 (patch)
tree401e90a1af4db0ca5c0bdf03594a9c3db6f139a4
parent07a8a4baa32aba7cf664715095e82742d1476cd9 (diff)
Update README and adjust to new WebOS CLI
-rw-r--r--README.md27
-rwxr-xr-xsystemd/magic4linux-start12
-rw-r--r--systemd/magic4linux.service1
3 files changed, 23 insertions, 17 deletions
diff --git a/README.md b/README.md
index 0ba6fa6..eeb88cf 100644
--- a/README.md
+++ b/README.md
@@ -1,17 +1,13 @@
# magic4linux
+A snoopdesigns's fork of [mafredi/magic4linux](https://github.com/mafredri/magic4linux).
+
Allows you to use the magic remote on your webOS LG TV as a keyboard/mouse for your ~~PC~~ Linux machine.
This is a Linux implementation of the [Wouterdek/magic4pc](https://github.com/Wouterdek/magic4pc) client.
A virtual keyboard and mouse is created via the `/dev/uinput` interface, as provided by the [bendahl/uinput](https://github.com/bendahl/uinput) library. For non-root usage, please add udev rules as instructed in the [`uinput`](https://github.com/bendahl/uinput#uinput-----) documentation.
-## Installation
-
-```shell
-go install github.com/mafredri/magic4linux/cmd/magic4linux
-```
-
## Usage
There are no options yet.
@@ -20,10 +16,21 @@ There are no options yet.
magic4linux
```
-## Building for other platforms
+## Building
```shell
-git clone https://github.com/mafredri/magic4linux
-cd magic4linux/cmd/magic4linux
-GOOS=linux GOARCH=arm64 go build
+GOOS=linux go build
```
+
+Built executable placed in $(/usr/bin/go env GOPATH)/bin
+
+## Some tips from snoopdesigns
+WebOS CLI install:
+```shell
+npm install -g @webos-tools/cli
+```
+Some usefull CLI commands:
+```shell
+ares-setup-device - username 'prisoner' port 9922
+ares-device -i - device info
+``` \ No newline at end of file
diff --git a/systemd/magic4linux-start b/systemd/magic4linux-start
index 058080d..587205b 100755
--- a/systemd/magic4linux-start
+++ b/systemd/magic4linux-start
@@ -1,18 +1,18 @@
#! /usr/bin/bash
-ARES_DEVICE_INFO_CMD="$WEBOS_CLI_TV/ares-device-info"
-ARES_LAUNCH_CMD="$WEBOS_CLI_TV/ares-launch"
-ARES_INSTALL_CMD="$WEBOS_CLI_TV/ares-install"
+ARES_CHECK_CMD="ares -v"
+ARES_DEVICE_INFO_CMD="ares-device -i"
+ARES_LAUNCH_CMD="ares-launch"
+ARES_INSTALL_CMD="ares-install"
GOPATH=$(/usr/bin/go env GOPATH)
echo "Using variables:"
-echo "WEBOS_CLI_TV=$WEBOS_CLI_TV"
echo "MAGIC4PC_DIST=$MAGIC4PC_DIST"
function ares_available() {
- if ! command -v $ARES_DEVICE_INFO_CMD &> /dev/null
+ if ! command -v $ARES_CHECK_CMD &> /dev/null
then
- echo "$ARES_DEVICE_INFO_CMD could not be found"
+ echo "$ARES_CHECK_CMD could not be found"
exit 1
fi
}
diff --git a/systemd/magic4linux.service b/systemd/magic4linux.service
index fcaea03..a0ecad3 100644
--- a/systemd/magic4linux.service
+++ b/systemd/magic4linux.service
@@ -8,7 +8,6 @@ Type=simple
Restart=always
RestartSec=1
User=dimka
-Environment=WEBOS_CLI_TV=/home/dimka/SOFT/CLI/bin
Environment=MAGIC4PC_DIST=/home/dimka/PROJECTS/magic4pc/webos/me.wouterdek.magic4pc_1.0.0_all.ipk
ExecStart=/home/dimka/PROJECTS/magic4linux/systemd/magic4linux-start