Transfer your computers clipboard to a camera-enable mobile device via QR code
A useful tip showed up for me today on Twitter:
Transfer your PC clipboard to a nearby mobile device:
xclip -o -s c | qrencode -o - | feh --force-aliasing -ZF -
I didn’t have feh
installed, but that was quickly fixed (once I’d read up on what feh
was):
sudo apt install feh -y
(I already had qrencode
installed.)
I was not sure if it would work in Wayland, but it does.
xclip -o -s c | qrencode -o - | feh --force-aliasing -ZF -
Pop it into your ~/.bashrc file, to give it a handy alias:
qrclip () {
xclip -o -s c | qrencode -o - | feh --force-aliasing -ZF -
}
then reload your ~/.bashrc file (or else log out and back in again):
source ~/.bashrc
And, whenever you want to transfer the text on your clipboard to another device with a camera, jumping across a network air gap, you just need to run qrclip
on your computer, and then take a photo with / use a QR code scanner on the device with a camera.
You may also like:
- Fixing 'tee: command not found' on Debian 11 Bullseye
- GNOME display fractional scaling
- Installing Debian 11 on a Microsoft Surface Go: secure boot, mokutil, Wi-Fi, and libinih1
- PinePhone: WireGuard, dns-over-https, and other thoughts
- Setting up a Ledger Nano X with Debian 11
- CCTV or IP cameras outside your home, and the (UK) GDPR. Its easier than you think
- Quick Image Montages
- RSS feeds for Internet tech, policy, and legal stuff (and some other bits)
- Working front and rear cameras on Debian 11 on a Surface Pro 6, SurfaceBook 2, and Surface Go
- Virtualising an existing macOS installation for VirtualBox on Debian 11