Linux qr code generator

QR Code Generator – Windows, Linux, MacOS

A QR code generator is an application which creates and stores different types of data in a QR code image file.

A qrencode is a free command line tool for encoding string data in the QR code and saving it as a PNG or an EPS image.

In this note i will show how to install and and how to use (with examples) the qrencode on Windows, Linux and MacOS from the command line.

Cool Tip: How to open a File Explorer from a Windows command prompt (CMD) or PowerShell ! Read more →

QR Code Generator

Install on Window

The qrencode for Windows doesn’t actually require installation – simply download the latest version of the QR code generator, extract the qrencode.exe and open a command prompt in that folder.

To open the command prompt, press the ⊞ Win + R shortcut to open the “Run” dialog, type in cmd and click “OK”, then navigate to the folder with the qrencode.exe , e.g.:

C:\Users\MyName> cd Downloads\QREncode-4.1.1_Win32 C:\Users\MyName\Downloads\QREncode-4.1.1_Win32> qrencode -V qrencode version 4.1.1 Copyright (C) 2006-2017 Kentaro Fukuchi 

Cool Tip: How to open a Windows command prompt (CMD) or PowerShell withing the current folder from a File Explorer! Read more →

Install on Linux & MacOS

To install the qrencode on Linux or MacOS:

# Linux $ sudo apt install qrencode # MacOS $ brew install qrencode

Basic Usage of QR Code Generator

To generate a QR code from a command line use the following format:

$ qrencode -o filename> "data>" - example - $ qrencode -o qrcode.png "Some text"

By default, qrencode saves the generated QR code in a PNG format, but you can specify the type of the generated image using the -t or —type= options, e.g:

$ qrencode -t EPS -o qrcode.eps "Some text" $ qrencode --type=ASCII -o qrcode.txt "Some text"
PNG (default), PNG32, EPS, SVG, XPM, ANSI, ANSI256, ASCII, ASCIIi, UTF8, ANSIUTF8

You can also play with a size, width of the boarders and error tolerance of the QR code. e.g:

$ qrencode -s 3 -l L -m 4 -o qrcode.png "Some text"
Option Description
-s NUMBER , —size=NUMBER Specify module size in dots (pixels). Default 3 .
-l , —level=

Specify error correction level from L (lowest) to H (highest). Default L .
-m NUMBER , —margin=NUMBER Specify the width of the margins. Default 4 .

To change a foreground/background color of the generated QR code, set them in a hexadecimal notation using the correspondent options:

$ qrencode --foreground color:#4285F4;">4285F4" --background background-color:#FFFFFF;">FFFFFF" -o qrcode.png 'Some text'

QR Code Generation Examples

You can generate QR codes that will trigger different actions when scanned by a smartphone, for example:

# Display a text $ qrencode -o qrcode.png "Some text" # Open a location on a map $ qrencode -o qrcode.png "geo:37.234332396,-115.80666344" # Make a phone call $ qrencode -o qrcode.png "tel:0123456789" # Open an URL $ qrencode -o qrcode.png "https://www.shellhacks.com" # Send an email $ qrencode -o qrcode.png "mailto:no_reply@shellhacks.com?subject=Hey&body=What's up?" # Send an SMS message $ qrencode -o qrcode.png "smsto:0123456789,The text of the SMS message." # Connect to a Wi-Fi network $ qrencode -o qrcode.png "WIFI:T:WPA2;S:box-12345;P:pa$$w0rd;;"

Cool Tip: How to open a File Manager from a terminal in Linux! Read more →

To add a contact using the QR code, create a file called contact.txt with a vCard data:

BEGIN:VCARD VERSION:4.0 UID:urn:uuid:4fbe8971-0bc3-424c-9c26-36c3e1eff6b1 FN;PID=1.1:J. Doe N:Doe;J.;;; EMAIL;PID=1.1:jdoe@example.com CLIENTPIDMAP:1;urn:uuid:53e374d9-337e-4727-8803-a1e9c14e0556 END:VCARD

… and pass this file to the QR code generator as follows:

To trigger a creation of the event in a calendar, use the similar method, i.e. create a file called event.txt with a vEvent data:

BEGIN:VCALENDAR VERSION:2.0 PRODID:-//hacksw/handcal//NONSGML v1.0//EN BEGIN:VEVENT UID:19970610T172345Z-AF23B2@example.com DTSTAMP:19970610T172345Z DTSTART:19970714T170000Z DTEND:19970715T040000Z SUMMARY:Bastille Day Party END:VEVENT END:VCALENDAR

. and redirect this file to the QR code generator:

Источник

The 5 Best QR Code Generator Apps for Linux

These QR code generator apps come in handy when you want to quickly create QR codes on Linux.

several qr codes on a screen

Readers like you help support MUO. When you make a purchase using links on our site, we may earn an affiliate commission. Read More.

Originally developed for the automotive industry, QR codes are gradually gaining popularity in other sectors, thanks to their high readability and the capacity to store more data.

As a result, you’ll find QR codes in action across various applications today. Be it sharing vCards and Wi-Fi passwords or facilitating wireless payments, sharing app download links, or redirecting people to websites, QR codes can do just about anything.

To get a QR code to do any of these, however, you need a QR code generator: a tool that can add information to QR codes. Here are some of the best QR code generators for Linux.

1. qrencode

qrencode code generator

qrencode is a CLI-based QR code generator for Linux. It uses the libqrencode library to encode data into QR code symbols as a bitmap array. Once a code is generated, it’s saved as a PNG image file, which you can then share or use as required.

​​​​​Using qrencode is pretty easy. All you got to do to generate QR codes using it is run a few simple commands in the terminal. But since qrencode offers so many options: error correction level, size, file type, etc., and there’s a lot you can do using it, getting your head around all these options can be daunting. For such times, you can use the qrencode —help command to look up all the available options and their usage.

What strikes out about qrencode, compared to most other QR code generators, is that it offers several advanced features, which let you use it to generate not only basic text QR codes but also QR codes for SMS prompts, WhatsApp prompts, vCard, and much more.

qrencode Installation

Follow the installation instructions below to get qrencode on your Linux machine.

sudo apt install qrencode 
sudo dnf install qrencode 

2. QR Code Generator

qr code generator desktop

QR Code Generator (by Studio La Cosa Nostra) is a simple QR generator software at its core. It’s entirely GUI-based and pretty easy to use. One of the things that strike out about this software is the live preview feature, which changes the structure of the QR code as you input text into it.

But that said, QR Code Generator is pretty basic and ideal for only text-based QR code generation. Unlike most other tools, it offers just two additional options: the ability to select the width of the QR code and a quick save button to save your QR code as a PNG file, which, in some sense, limits its scope of use.

Install QR Code Generator on Linux

QR Code Generator is available as an AppImage as well as a Snap package on Linux. If you have Snap present on your machine, you can get QR Code Generator on it by running the following command in a terminal:

sudo snap install qr-code-generator-desktop 

Alternatively, if you don’t have Snap, you can first install it using our Snap guide or download the AppImage for QR Code Generator.

After this, go to the folder where you’ve downloaded it and right-click on the AppImage. Select Properties, and on the Properties window, click the Permissions tab.

Finally, check off the box next to Allow executing file as a program if you’re using a Nautilus-based file manager. On Dolphin, tick the Is executable option and change the Execute dropdown to Anyone on PCManFM.

Finally, double-tap the AppImage to run it.

3. Decoder

decoder

Decoder is an advanced QR code generating software for Linux. Similar to QR Code Generator, it also gives you a live preview of the QR code when you type in your desired text. Once you’ve generated a QR code, you can either save it or export it. All your saved codes are listed under the History tab and can be accessed anytime.

However, what differentiates Decoder from QR Code Generator is its built-in Wi-Fi QR code generator functionality that takes input in the form of a network name, password, and encryption and generates a QR code out of it.

Not just that, Decoder can also scan QR codes, so you don’t need to download another tool on your computer for it. To do this, Decoder relies on your webcam as well as screenshots. So when you go into the Scan tab on the app, Decoder asks you to pick a method, after which you need to perform the appropriate steps to scan the QR code.

Decoder Installation

Decode is available as a flatpak. To install it, you first need to install Flatpak on your Linux machine.

Once Flatpak is installed, open the terminal and run the following command to install Decoder:

flatpak install flathub com.belmoussaoui.Decoder 

4. QtQR

qtqr qr code generator

QtQR is a Qt-based software for generating and decoding QR codes on Linux. It’s the most advanced GUI-based QR code generator on this list that offers you the ability to generate QR codes for different data types, ranging from text and URL to SMS, Wi-Fi, geolocation, and many more.

Similarly, QtQR also allows you to modify various QR code parameters, like pixel size, margin size, and the error correction level, before generating a QR code. And, it even includes a built-in decoder to help you scan QR codes.

Regarding scanning, QtQR gives you two options: Decode from File and Decode from Webcam, which you can pick accordingly to decode any QR code. Once QtQR decodes the code, it outputs its contents, with a few relevant action options, on the main window, which you can use as required.

How to Install QtQR on Linux

QtQR is pretty old software, and therefore, you can find it on most package managers. So open the package manager on your Linux machine, look up QtQR, and install it.

Alternatively, you can head over to Launchpad to find a QtQR release, download it, and install it via the command line.

5. Zint

zint

Zint is yet another CLI-based QR code scanner for Linux. However, if you’re using a Qt-based distro on your machine, you can also access its GUI, in case you prefer that. Do note that you’ll need to install Qt libraries on your system should you wish to use Zint in the GUI mode.

Of all the QR code generators on this list, Zint is probably the only tool that offers so many features and options while being both CLI and GUI friendly. Be it setting the appearance of the code or inputting different kinds of data, Zint can handle almost all kinds of operations.

What adds to Zint’s advantage further is its support for over 50 different symbologies, which lets you use it for more than just QR code generation.

How to Install Zint on Linux

Zint is available as a TAR package. So first, download the archive on your machine.

Next, head into the Downloads directory and extract the file. Open the terminal and navigate to the extracted Zint directory using the cd command and the ls command. Now, enter the following commands to install it:

mkdir build
cd build
cmake ..
make
make install

If you get any error codes upon running these commands, make sure you have cmake, libpng, and libpng-devel packages installed on your system before trying again.

Generate QR Codes Effortlessly on Linux

We’ve already established how useful QR codes can be. On Linux, it’s easy to find the right QR code generator for your requirements, and you can use multiple utilities to generate QR codes on your Linux machine effortlessly.

If some of these tools seem very basic to you while others come across as intimidating, you could also try an online QR code generator instead.

Источник

Читайте также:  Exports file in linux
Оцените статью
Adblock
detector