QtQR | Encode and Decode QR Codes on Linux

A QR (Quick Response) code is a two-dimensional grid of dark and light dots that can hold a maximum of 7,089 characters. These now ubiquitous codes are often used for URL sharing, WiFi settings, email addresses, contact information, ticketing for airplane passes, geolocation, and other special purposes of passing data through a simple scan.

Creating QR Codes on Linux has been very easy to do with the help of a terminal tool that I have previously reviewed. Or you can use any number of website options as well. Although I could easily scan a code with my phone, I came upon an issue where I needed to turn that QR code back into text, not on a mobile with its camera but on my Linux desktop. Doing a little searching for the right solution, I found this post that has a number of great solutions.

https://www.baeldung.com/linux/read-qr-codes

There are a lot of tools listed there but what I wanted was something I could quickly use with a low or preferably low learning curve. I have found that particular application that works great for me and my Plasma Desktop environment and it’s called QtQR.

QtQR Installation

Using OPI with openSUSE to find the package was the quick and easy way for me to get the software I wanted.

opi qtqr

This application is not in the main openSUSE Repos and will require you to add a community repository. If you are willing to take the risk of an unofficial repository, proceed. I was unsuccessful in locating a Flatpak for this application.

If you are on a Debian based distribution, you may have good results with:

sudo apt install qtqr

The application will pull in a small number of dependencies and you will be ready to go.

Usage

There are a number of ways that you can use this application. In fact, one such way completely negates the QR Encode in the Terminal method, unless you have other purposes for it. What is fantastic is that QtQR not only reads codes but you can also make the codes and see the real-time updates but, before I get ahead of myself, I’ll first explain the decode usage then go into the encoding capability.

Decode

Many years ago, I looked for such an application and did not find one but today, this might be the coolest decoding application I have ever used. There are two options for decoding QR codes, using the webcam or importing an image.

Webcam

Much like you would expect, you select to use the webcam then you have to select specific webcam. I will say that I have experienced a bit of a bug here and that there are two webcams being reported that when I only have one as I used this but there are two entries that from the description are identical. The trick here is, one will cause the application to crash and the second on the list does not.

When you do select a proper webcam, your webcam will be activated and ZBar scan client will open. When a QR Code is recognized, it will exit and pass the values of that QR code to QtQR.

The dialog box will report its contents and give you the option to say Ok or Edit. Ok will close the dialog box and leave you with no further actions. Edit will allow you take the information from the QR code and make edits to it which can be reviewed in real-time.

Import Image

The other option to decode QR codes is to import an image that has a proper QR code. This will provide the same sort of interaction as with the Webcam ZBar scan, options to edit or just acknowledge and move on.

Something that I do appreciate is that you can easily go to a URL if that is what is detected. This doesn’t work for WiFi, as in, it won’t automatically connect you (future feature?) but it does give you the option to edit where you can manually pass the information over to Network Manager.

Just as an experiment, I thought I’d see what would happen if I put two QR codes in one image file. The the example below, it picked up the QR code to the right which is “Quick Brown Fox…” and ignored the other one. I didn’t test more than this to see if what exactly would cause one to be scanned over the other, but it’s something that could be played with, given enough time.

My whole purpose for installing this application was with the intent of decoding QR codes and making the data easily available to manipulate, archive or do whatever tasks are required in relation to QR codes. The ability to edit and generate new codes is an absolute bonus but it makes sense that it is easily available.

Encode

The bonus feature, that basically wipes out the QR Encode article I have previously written, (except for scripting and writing applications based on the thing) is phenomenal. There are 12 encoding format options:

  • Text
  • URL
  • Bookmark
  • E-Mail
  • Telephone Number
  • Contact Information
  • SMS
  • MMS
  • Geolocalization
  • WiFi Network
  • SEPA Single Payment
  • Bitcoin Address

I am not going to go through all of them in their totality but I will cover a couple of them. They are all pretty self-explanatory.

Text

Text is just that, a field of text. It’s a free-form method of embedding information in a QR Code. Most of what I have used QR codes for have been this feature.

URL

Probably the second most useful purpose of a QR Code is to send a prospective scanner of this to a particular site. Though, one should be careful about the sites they visit as there are a lot of bad actors out there.

E-Mail

Also, very useful is being able to share an email address. You may see these used at conventions or display tables along with URLs.

WiFi Network

Another great use, and quite possibly one of the best uses of a QR Code is to provide a convenient way to share a public WiFi for your patrons or visitors. Point them to the guest network with a simple code for them to scan.

Financial Options Note

Anything to do with payment or Bitcoin is not something I intend on using this for… like ever. I don’t know that I like the idea of leaving such information easily scanned but you do what you think is best for you on this matter.

Additional Notes

There are parameters you can adjust with the QR code to change the Pixel Size, Error Correction and Margin Size. Coincidentally, or maybe not, these are the same parameters that can be defined for QR Encode so I did a little digging and QtQR does depend on QRencode. Therefore, QtQR is a fantastic graphical front end for QRencode!

Final Thoughts

There are a ton of really cool tools and utilities that can make other tasks in your life a little easier. QtQR has not only given me the ability to decode QR codes but also make using QRencode a little easier. QRencode made generating QR Codes a little more convenient for work. All this supports the idea that the more I learn, explore and use the tools that others have worked so hard upon, the more productive I am able to be day in and day out.

Thank you to all those that have taken the time to share their creations with the world through their open source ventures! I truly appreciate it.

References

https://github.com/ralgozino/qtqr
https://www.baeldung.com/linux/read-qr-codes
QRencode | Generate QR Codes in the Terminal
OPI | OBS Package Installer


Discover more from CubicleNate.com

Subscribe to get the latest posts sent to your email.


Comments

Leave a Reply

Discover more from CubicleNate.com

Subscribe now to keep reading and get access to the full archive.

Continue reading