What is Nostr?
Luxferre
npub163g…40f6
2024-03-09 07:49:35

Luxferre on Nostr: The simplest and most reliable way of dropping some short text from PC to Android (as ...

The simplest and most reliable way of dropping some short text from PC to Android (as long as they are in the same LAN) is:
1) Run Termux and note your current IP with ifconfig.
2) Run nc -l -p [someport] on the Termux side.
3) Run echo 'yourtext' | nc [android_ip] [thatport] on the PC side.
4) Quit nc on the Termux side and copy whatever you received from the terminal window.

Of course, with longer texts, you can just redirect the output to a file and use cat instead of echo on the PC side. You can also install Termux:API Android package (and termux-api from Termux itself) to leverage termux-clipboard-set command to automate the last step.
Author Public Key
npub163gcvh4dwwqm4yp2y7355tu9s7e6pzmqlcl3p78m7vm52fq7ej9s0g40f6