понедельник, 25 июня 2018 г.

QR code: show in Linux

Well, in case you ever wanted to quickly (3 sec) pass a string to your phone, here is how:


  1. run the script qr-show.sh I list below
  2. feed the string to it
  3. scan the QR code with the Barcode Scanner with your phone (get from F-Droid or Play Store)
  4. easy!
The script:

 #!/bin/bash -e

TEXT=`yad --entry --entry-label='Enter string to encode'`

qrencode -o $TMP/qr.png "$TEXT" &&
        eog -ng $TMP/qr.png &
You can see a few tools used which of course can be replaced by alternatives:
  1. yad with zenity/gdialog/xdialog/dialog
  2. eog with geeqie/any other image viewing
  3. Barcode Scanner with any barcode scanner ))

Комментариев нет:

Отправить комментарий