diff options
| author | Josh Ott <josh@ottmail.me> | 2025-09-07 20:39:37 -0400 |
|---|---|---|
| committer | Josh Ott <josh@ottmail.me> | 2025-09-07 20:39:37 -0400 |
| commit | 4012ed8bc21b54b4a0898e2dfc7ff047582f9a62 (patch) | |
| tree | 07cf428bcde50439a33b62c1107aee2f4b870f07 /remotedraw | |
| parent | 5f61cd3fcc069012becc486b9687d105e7295ef6 (diff) | |
| download | bin-4012ed8bc21b54b4a0898e2dfc7ff047582f9a62.tar.gz bin-4012ed8bc21b54b4a0898e2dfc7ff047582f9a62.zip | |
remotedraw
Diffstat (limited to 'remotedraw')
| -rwxr-xr-x | remotedraw | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/remotedraw b/remotedraw new file mode 100755 index 0000000..bb1af96 --- /dev/null +++ b/remotedraw @@ -0,0 +1,19 @@ +#!/usr/bin/env bash + +# send a xournalpp document to my tablet/laptop (lena) for editing + +tablet=lena +mountpoint="$(ssh $tablet "echo \$HOME/.local/share/remotedraw")" +hostname="$(cat /etc/hostname)" + +echo $mountpoint + +target="$(realpath $1)" +parentdir="$(dirname $target)" +filename="$(basename $target)" + +echo "sshfs $hostname:$parentdir $mountpoint" + +ssh $tablet "sshfs $hostname:$parentdir $mountpoint" +ssh $tablet "DISPLAY=:0 xournalpp $mountpoint/$filename" +ssh $tablet "umount $mountpoint" |