
Share a Website Address Using a QR Code
- Adam Douglas
No matter what we seem to share there can be issues either in communication or what was shared is recorded with errors. Sharing a website address is no different, however these issues can be resolved by creating a QR Code (quick response code). Think of the QR Code as specialized bar code one sees in a grocery store, only difference here is the bar code when scanned will send the user to a website.
The following steps were done using a Linux terminal that generates a QR Code to share my website address. A graphical interface maybe used on Linux called QtQR (Arch Linux package).
Environment
The following was used to test these instructions.
- Arch Linux x86_64
- Pacman v6.0.1
- qrencode v4.1.1
- ZBar v0.23.1
Install Packages
Arch Linux
# pacman -Syu qrencode zbar
Debian
# apt install qrencode zbar-tools
Generate QR Code Terminal Output
$ qrencode -s 6 -l H -o - -t utf8 "https://www.adamsdesk.com/"
-s Specify the size of the dot (pixel). (default=3)
-l Specify error correction level from L (lowest) to H (highest). (default=L)
-o Write image to FILENAME. If '-' is specified, the result will be output to standard output.
-t Specify the type of the generated image. (default=PNG)

Generate QR Code Output To File
$ qrencode -s 6 -l H -o "website-qrcode.png" "https://www.adamsdesk.com/"
-s Specify the size of the dot (pixel). (default=3)
-l Specify error correction level from L (lowest) to H (highest). (default=L)
-o Write image to FILENAME. If '-' is specified, the result will be output to standard output.

Verify QR Code
By checking the contents of a QR Code one can verify that the QR Code has been generated as desired.
$ zbarimg website-qrcode.png
QR-Code:https://www.adamsdesk.com/
scanned 1 barcode symbols from 1 images in 0.03 seconds
. EAN/UPC (EAN-13, EAN-8, EAN-2, EAN-5, UPC-A, UPC-E, ISBN-10, ISBN-13)
. DataBar, DataBar Expanded
. Code 128
. Code 93
. Code 39
. Codabar
. Interleaved 2 of 5
. QR code
. SQ code
- is the barcode large enough in the image?
- is the barcode mostly in focus?
- is there sufficient contrast/illumination?
- If the symbol is split in several barcodes, are they combined in one image?
- Did you enable the barcode type?
some EAN/UPC codes are disabled by default. To enable all, use:
$ zbarimg -S*.enable <files>
Please also notice that some variants take precedence over others.
Due to that, if you want, for example, ISBN-10, you should do:
$ zbarimg -Sisbn10.enable <files>
This is post 27 of 100, and is round 2 of the 100 Days To Offload challenge.
References
- Arch Linux qrencode package
- Arch Linux ZBar package
- Arch Linux
- Debian qrencode package
- Debian ZBar package
- Debian
- Libqrencode
- Pacman Home Page
- pacman, ArchWiki
- QR Code puzzle, image by Wilfried Pohnke, published Jun 14, 2021, Pixabay
- QR code, Wikipedia
- QR Tools, Launchpad
- qrencode man page, Arch manual pages
- ZBar, GitHub
- zbarimg man page, Arch manual pages
Changelog
-
- change topic
-
- change topic
-
- Change 100DaysToOffload message
-
- add related posts