QR codes

General support questions
Post Reply
MartinR
Posts: 672
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: 3473
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: 672
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
Forum Moderator
Posts: 30665
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`)
CentOS 6 died in November 2020 - migrate to a new version!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

MartinR
Posts: 672
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

Return to “CentOS 7 - General Support”