QR codes

General support questions
Post Reply
MartinR
Posts: 714
Joined: 2015/05/11 07:53:27
Location: UK

QR codes

Post by MartinR » 2021/04/22 11:00:53

Is there an application that will scan QR codes and send the embedded URLs to Firefox?

User avatar
jlehtone
Posts: 4523
Joined: 2007/12/11 08:17:33
Location: Finland

Re: QR codes

Post by jlehtone » 2021/04/22 11:21:52

No idea how to scan.

https://linuxcommando.blogspot.com/2020 ... de-on.html
Base has qrencode and python-qrcode for writing images.
EPEL has zbar for reading images.

You can $ firefox URL, which either starts firefox or adds tab to already running instance with that URL.

MartinR
Posts: 714
Joined: 2015/05/11 07:53:27
Location: UK

Re: QR codes

Post by MartinR » 2021/04/22 11:59:39

Thanks for the pointer jlehtone
I've install zbar from EPEL and the following command brings up a new Firefox instance with the encoded URL:

Code: Select all

$ firefox $( zbarcam --raw /dev/video0 )
It's not adding it as a tab, but that's no problem for me.

Without the --raw it prefixes the URL with QR-Code: which Firefox doesn't like.

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: QR codes

Post by TrevorH » 2021/04/22 13:04:15

--new-tab $url

(from `firefox --help`)
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

MartinR
Posts: 714
Joined: 2015/05/11 07:53:27
Location: UK

[solved] Re: QR codes

Post by MartinR » 2021/04/22 13:38:58

Thanks Trevor, that works a treat.

For archival purposes:

Code: Select all

# yum install zbar

Code: Select all

$ firefox --new-tab $( zbarcam --raw /dev/video0 )

Post Reply