Want to ship a hyperlink out of your Linux PC to your cellular machine? Strive producing a QR code on the Linux desktop! It’s fast, versatile and is suitable with nearly each cellular working system! One of the best ways to generate QR codes on Linux is with the command-line utility Qrencode. Why? It’s scriptable, has many alternative output choices, and may be very lightweight in total dimension.

Set up Qrencode

To put in the Qrencode utility on your Linux PC, open up a terminal window by urgent Ctrl + Alt + T or Ctrl + Shift + T on the keyboard. As soon as the terminal window is open, comply with the command-line directions beneath to get the appliance up and working on your Linux PC.

Ubuntu

The Qrencode app is within the “Ubuntu Universe” PPA. In case you’re utilizing Ubuntu, it’s potential to set up this system with the Apt command beneath.

sudo apt set up qrencode

Debian

Qrencode is within the “Debian Main” software program repository, and accessible to all Debian Linux customers utilizing 10, 9. 8 and Sid. To get the app working, use the next Apt-get command.

sudo apt-get set up qrencode

Arch Linux

On Arch Linux, Qrencode is within the “Extras” software program repository. Allow “Extra” in your Pacman configuration file. Then, as soon as “Extra” is about up, use the Pacman command beneath to get Qrencode working.

sudo pacman -S qrencode

Fedora

Fedora Linux customers can get the Qrencode utility put in from the first Fedora bundle sources. To set it up on your Fedora system, use the next Dnf command.

sudo dnf set up qrencode

OpenSUSE

Qrencode is in OpenSUSE’s “Oss all” software program repository. To put in it on your OpenSUSE Linux system, use the next Zypper code.

sudo zypper set up qrencode

Generic Linux

The Qrencode utility is accessible for all Linux distributions by way of supply code. In case you’re utilizing a Linux working system that doesn’t have the app in its software program sources, head over to this web site here to obtain the supply code. The code web page additionally has directions on how to compile all the things, and what dependencies it requires.

Generate QR codes – Qrencode

Qrencode could make QR codes straight by means of the terminal to an EPS file, or PNG file. On this information, we’ll focus on utilizing PNG because the output, as it’s extra versatile. To generate a customized QR code, open up a terminal window and enter the command qrencode with “qrcode.png” because the output filename.

2Q==

qrencode -m 10 -o qrcode.png 'your-link-here'

Substitute the ‘your-link-here’ with a hyperlink you’d like to embed into the QR code. The “qrcode.png” file will save within the residence listing (~). To entry the code, double-click on the picture file, and it’ll open within the default picture viewer on your Linux PC. You may then scan the QR code with a cellular machine.

Create a QR code script

The qrencode command makes making a QR code on Linux fairly straightforward. Nevertheless, in the event you routinely generate QR codes to scan on your cellular machine and need to use Qrencode to do it, you’ll in all probability need a sooner method. The quickest method is to create a bash script that you would be able to run any time to create new QR codes on Linux.

Step one within the bash script is to create the file. Utilizing the contact command, make an empty file with the title of “qrcode” in your house listing.

contact ~/qrcode

Open up the “qrcode” file within the Nano textual content editor with the command beneath.

nano -w ~/qrcode

As soon as the qrcode file is open in Nano, write within the shebang on the prime of the file. The shebang will inform your terminal how to deal with the script, and the way to run it.

#!/bin/bash

Press House to create a brand new line in Nano. Then, copy and paste the code beneath into the editor. To stick in Nano, press Ctrl + Shift + V.

echo Paste your message or hyperlink to generate a QR code:
learn code

qrencode -m 10 -o qrcode.png $code

sleep 1

echo "QR Code has been generated as ~/qrcode.png. Launching with Feh."

feh ~/qrcode.png

Save the edits to the “qrcode” file within the Nano textual content editor by urgent Ctrl + O on the keyboard.

After creating the script, you need to set up the “Feh” utility, because the script makes use of it to show the QR code on the display robotically. To put in Feh on your Linux PC, enter one of many instructions beneath.

Ubuntu

sudo apt set up feh

Debian

sudo apt-get set up feh

Arch Linux

sudo pacman -S feh

Fedora

sudo dnf set up feh

OpenSUSE

sudo zypper set up feh

Now that Feh is put in, the script making course of is completed. Enter the instructions beneath to set up the script to your Linux PC.

sudo chmod +x ~/qrcode
sudo mv ~/qrcode /usr/bin/

To run the script, write the next command in terminal.

qrcode

Paste your hyperlink within the immediate, and a QR code will pop-up on the display when it’s finished!



Source link

Share.
Leave A Reply

Exit mobile version