Reading QRCode on Linux desktop? [solved]

Issues and / or general discussion relating to Puppy

Moderator: Forum moderators

Post Reply
HerrBert
Posts: 340
Joined: Mon Jul 13, 2020 6:14 pm
Location: Germany, NRW
Has thanked: 17 times
Been thanked: 114 times

Reading QRCode on Linux desktop? [solved]

Post by HerrBert »

Found a topic about qrcodegenerator at viewtopic.php?t=9700 recently.
I was a little shocked about the download size of about 73M, but i tried it anyway.
It works even on a slackware based s15pup64 ;)

So i have thrown together a portable ROX-Application-Directory on afore mentioned s15pup64 using slackware binary and lib and gtk+2.
Looks like this:

quickshot-231010-193108.jpg
quickshot-231010-193108.jpg (28.36 KiB) Viewed 1155 times

Download:

gqrencode-4.1.1-slack15-portable.tar.gz
(40.91 KiB) Downloaded 29 times

md5sum: f58d763d5f8c240274bedcfeebf49f8c

The other question would be if there is a linux desktop application to decode qr-code images :?:
I have read about zbar and qtqr, but compiling zbar-tools or running qtqr fails due to many missing dependencies.

If anybody here is able to read qr-code images on a desktop pc, please let me know...

Last edited by HerrBert on Wed Oct 11, 2023 4:53 pm, edited 1 time in total.
User avatar
Flash
Moderator
Posts: 907
Joined: Tue Dec 03, 2019 3:13 pm
Location: Arizona, U.S.
Has thanked: 47 times
Been thanked: 109 times

Re: Reading QRCode on Linux desktop?

Post by Flash »

The camera app in my iPhone reads QRCode. Maybe one of the camera apps for Linux can do it.

Chaos coordinator :?
HerrBert
Posts: 340
Joined: Mon Jul 13, 2020 6:14 pm
Location: Germany, NRW
Has thanked: 17 times
Been thanked: 114 times

Re: Reading QRCode on Linux desktop?

Post by HerrBert »

My android phone also has an app for scanning qr-code.
I used it to verify my app is working properly.

I can also use an online decoder like https://webqr.com to decode a qr-code image file.

What i am looking for is an app to decode qr-code image files running on my install of s15pup64.

User avatar
mikewalsh
Moderator
Posts: 5662
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 599 times
Been thanked: 1737 times

Re: Reading QRCode on Linux desktop?

Post by mikewalsh »

@HerrBert :-

Err....."snap"!

viewtopic.php?t=9700

This of course 'creates' the things. Obviously, a camera is required for reading them.......unless you want summat that'll 'read' the PNG file, THEN decipher the contents once again.

I haven't yet found anything that does this. All in good time, I guess....

(*shrug...*)

Mike. Image

Puppy "stuff" ~ MORE Puppy "stuff" ~ ....and MORE! :D
_______________________________________________________

Image

Burunduk
Posts: 245
Joined: Thu Jun 16, 2022 6:16 pm
Has thanked: 6 times
Been thanked: 123 times

Re: Reading QRCode on Linux desktop?

Post by Burunduk »

I thought I found a tool but it was for data matrix. So no alternative for zbar so far.

HerrBert wrote: Tue Oct 10, 2023 6:41 pm

The other question would be if there is a linux desktop application to decode qr-code images :?:
I have read about zbar and qtqr, but compiling zbar-tools or running qtqr fails due to many missing dependencies.

On Fossapup64, zbar-tools can be installed from the PPM. I've downloaded it with the deps (imagemagick again) and converted the debs to a sfs (about 2.5 MB in size).
The zbarimg program throws some errors but works - can read codes from png files.

User avatar
greengeek
Posts: 1215
Joined: Thu Jul 16, 2020 11:06 pm
Has thanked: 349 times
Been thanked: 146 times

Re: Reading QRCode on Linux desktop?

Post by greengeek »

mikewalsh wrote: Tue Oct 10, 2023 8:54 pm

Err....."snap"!

viewtopic.php?t=9700

This of course 'creates' the things...

I seem to remember using one of your portable browsers (probably either Opera or Vivaldi) to create QR codes of webpages. It was an inbuilt function of the browser but I dont recall exactly which browser it was, or if it was able to generate QRs from text other than the page url.
(I suspect it was Vivaldi but will post back if I can confirm this)

User avatar
greengeek
Posts: 1215
Joined: Thu Jul 16, 2020 11:06 pm
Has thanked: 349 times
Been thanked: 146 times

Re: Reading QRCode on Linux desktop?

Post by greengeek »

I am currently running Fossa9.5 (Mid) and the PPM shows package "qtqr" for generating and decoding QR codes.
Untested yet but am downloading for trial...

Burunduk
Posts: 245
Joined: Thu Jun 16, 2022 6:16 pm
Has thanked: 6 times
Been thanked: 123 times

Re: Reading QRCode on Linux desktop?

Post by Burunduk »

It's possible to build zbar-0.23.90.tar.gz (from https://github.com/mchehab/zbar/releases) on S15Pup64-22.12 (the one I have is not the latest) - zbarimg works OK.

For the configure script to succeed, I had to install imagemagick-7.1.0_22 (with the dependencies) and fftw-3.3.10 (omitted for some reason) via the PPM.

(By the way, the PPM there is barely usable - it doesn't even show the download/install size.)

HerrBert
Posts: 340
Joined: Mon Jul 13, 2020 6:14 pm
Location: Germany, NRW
Has thanked: 17 times
Been thanked: 114 times

Re: Reading QRCode on Linux desktop?

Post by HerrBert »

Burunduk wrote: Wed Oct 11, 2023 2:21 pm

It's possible to build zbar-0.23.90.tar.gz (from https://github.com/mchehab/zbar/releases) on S15Pup64-22.12 (the one I have is not the latest) - zbarimg works OK.

For the configure script to succeed, I had to install imagemagick-7.1.0_22 (with the dependencies) and fftw-3.3.10 (omitted for some reason) via the PPM.

(By the way, the PPM there is barely usable - it doesn't even show the download/install size.)

I have zbarimg working using ubuntu and slackware packages - a wild mixture of different repos.
Thank you for pointing to the fossapup repos :thumbup2:
Took some two hours to resolve dependencies...
Need to clean up things this weekend and post a "recipe".

The result:

zbarimg.jpg
zbarimg.jpg (44.93 KiB) Viewed 998 times

Note, there is no error at all :thumbup2:
The only error i got was Name Error (Connection ":1.13" is not allowed to own the service "org.linuxtv.Zbar" due to security policies in the configuration file), which seems to be related to dbus.

User avatar
mikewalsh
Moderator
Posts: 5662
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 599 times
Been thanked: 1737 times

Re: Reading QRCode on Linux desktop? [solved]

Post by mikewalsh »

Along the same lines as @Burunduk , I've been messing around most of today building a package for my own use. This uses a combination of zbar-tools, YAD - for file-selection - and gxmessage for displaying the output somewhere other than in the terminal.

This is QRCodeReader-v0.3-amd64

For the first time in a long while, this is packed as an SFS. It's almost impossible to pack anything to do with ImageMagick in portable format, because the darn thing has files all OVER the place.....and what's more, it expects to find them scattered throughout the file-system in all the 'standard' locations. It doesn't want to find them all together in one place, and from past experience, gets incredibly snotty if you try to do this.

Anyways; here are both QRCodeGenerator-portable AND QRCodeReader "in action":-

Works for me.....and does "exactly what it says on the tin". Which is just what we want, no?

So far; built in Tahrpup64. Works perfectly in jrb's 'lite' spin on Barry's old Quirky April 64 - same generation, y'see - and also runs without issue - for ME - under Xenialpup64 & Bionicpup64. Anyway, it'll give the community another option to choose from. If anybody's interested, y'all can find it here:-

https://www.mediafire.com/folder/5zt418 ... CodeReader

Mike. Image

Puppy "stuff" ~ MORE Puppy "stuff" ~ ....and MORE! :D
_______________________________________________________

Image

User avatar
Flash
Moderator
Posts: 907
Joined: Tue Dec 03, 2019 3:13 pm
Location: Arizona, U.S.
Has thanked: 47 times
Been thanked: 109 times

Re: Reading QRCode on Linux desktop?

Post by Flash »

greengeek wrote: Tue Oct 10, 2023 10:55 pm

...It was an inbuilt function of the browser but I don't recall exactly which browser it was...

Firefox. I discovered it in the right-click menu.

Chaos coordinator :?
User avatar
mikewalsh
Moderator
Posts: 5662
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 599 times
Been thanked: 1737 times

Re: Reading QRCode on Linux desktop? [solved]

Post by mikewalsh »

@Flash :-

TBH, Flash, they're all offering the option now. Chromium introduced the capability for QR codes around 2-2½ years ago, shortly followed by most of the 'clones'.....and Firefox added the ability some 12-15 months back. (I don't think the right-click option shows in Firefox unless/until it's been specifically toggled 'on' in about:config, though..?)

Mike. Image

Puppy "stuff" ~ MORE Puppy "stuff" ~ ....and MORE! :D
_______________________________________________________

Image

User avatar
Flash
Moderator
Posts: 907
Joined: Tue Dec 03, 2019 3:13 pm
Location: Arizona, U.S.
Has thanked: 47 times
Been thanked: 109 times

Re: Reading QRCode on Linux desktop? [solved]

Post by Flash »

Yes, I just discovered it in Chromium's right-click menu. I guess it's everywhere now.

Chaos coordinator :?
step
Posts: 516
Joined: Thu Aug 13, 2020 9:55 am
Has thanked: 50 times
Been thanked: 184 times
Contact:

Re: Reading QRCode on Linux desktop?

Post by step »

greengeek wrote: Tue Oct 10, 2023 10:55 pm

I seem to remember using one of your portable browsers (probably either Opera or Vivaldi) to create QR codes of webpages. It was an inbuilt function of the browser but I dont recall exactly which browser it was, or if it was able to generate QRs from text other than the page url.
(I suspect it was Vivaldi but will post back if I can confirm this)

@greengeek Yes, it's Vivaldi and yes it can be used for arbitrary text if you edit the page URL inside the entry box.

Some times I use this method to send text from the browser to my phone. A single QR code can represent a limited number of characters. So I use Vivaldi for short texts, and the attached script for longer ones that need to be spread across multiple images.

The script works in Fatdog64-81x and Fatdog64-90x, untested on others. It requires coreutils, netpbm, and libqrencode. Vivaldi not needed. Script usage: s-qr.sh [FILE...] (stdin supported).

(For Fatdog64 users: coreutils and netpbm are pre-installed; install libqrencode with Gslapt package manager.)

vivaldi-qr-20231013.png
vivaldi-qr-20231013.png (20.4 KiB) Viewed 855 times
Attachments
s-qr.sh.tgz
Delete ".tgz" from the saved file name and make it executable
(616 Bytes) Downloaded 21 times
HerrBert
Posts: 340
Joined: Mon Jul 13, 2020 6:14 pm
Location: Germany, NRW
Has thanked: 17 times
Been thanked: 114 times

Re: Reading QRCode on Linux desktop? [solved]

Post by HerrBert »

Just for the records:

My recipe for zbarimg on s15pup64.

Required packages:

ubuntu:
zbar-tools_0.23-1.3_amd64.deb
libzbar0_0.23-1.3_amd64.deb
liblqr-1-0_0.4.2-2.1_amd64.deb
libjpeg-turbo8_1.3.0-0ubuntu2.1_amd64.deb

Extracted with dpkg-deb -x to a temporary directory.

slackware:
fftw-3.3.10-x86_64-1.txz
imagemagick-7.1.0_22-x86_64-1.txz
libzip-1.8.0-x86_64-1.txz

Extracted one by one to another temporary directory and ran install/doinst.sh for each package.
Resolved dependencies for zbarimg manually.

Required symlinks:
usr/lib/x86_64-linux-gnu/libMagickWand-6.Q16.so.6 -> ../../lib64/libMagickCore-7.Q16HDRI.so.10
usr/lib/x86_64-linux-gnu/libMagickCore-6.Q16.so.6 -> ../../lib64/libMagickWand-7.Q16HDRI.so.10
usr/lib64/ImageMagick-7.1.0 -> /usr/lib64/

Kept the most common filetypes for decoding.
Tested with jpg, png, svg.
Stripped to 7668K uncompressed ROX Application Directory.

Code: Select all

# ls -lR
usr:
insgesamt 12
drwxr-xr-x 2 root root 4096 Okt 13 16:17 bin
drwxr-xr-x 3 root root 4096 Mär 24  2020 lib
drwxr-xr-x 3 root root 4096 Okt 13 15:49 lib64

usr/bin:
insgesamt 48
-rwxr-xr-x 1 root root 22840 Feb  2  2020 zbarcam
-rwxr-xr-x 1 root root 22840 Feb  2  2020 zbarimg

usr/lib:
insgesamt 4
drwxr-xr-x 2 root root 4096 Okt 13 18:03 x86_64-linux-gnu

usr/lib/x86_64-linux-gnu:
insgesamt 596
lrwxrwxrwx 1 root root     16 Okt 13 17:36 libjpeg.so.8 -> libjpeg.so.8.0.2
-rw-r--r-- 1 root root 281288 Jul  5  2018 libjpeg.so.8.0.2
lrwxrwxrwx 1 root root     17 Okt 13 17:36 liblqr-1.so.0 -> liblqr-1.so.0.3.2
-rw-r--r-- 1 root root  55304 Jan  1  2018 liblqr-1.so.0.3.2
lrwxrwxrwx 1 root root     41 Okt 13 18:03 libMagickCore-6.Q16.so.6 -> ../../lib64/libMagickCore-7.Q16HDRI.so.10
lrwxrwxrwx 1 root root     41 Okt 13 18:03 libMagickWand-6.Q16.so.6 -> ../../lib64/libMagickWand-7.Q16HDRI.so.10
lrwxrwxrwx 1 root root     16 Okt 13 17:36 libzbar.so.0 -> libzbar.so.0.3.0
-rw-r--r-- 1 root root 256272 Feb  2  2020 libzbar.so.0.3.0

usr/lib64:
insgesamt 6388
drwxr-xr-x 3 root root    4096 Okt 13 15:49 ImageMagick-7.1.0
lrwxrwxrwx 1 root root      18 Okt 13 17:36 libfftw3.so.3 -> libfftw3.so.3.6.10
-rwxr-xr-x 1 root root 2068408 Sep 17  2021 libfftw3.so.3.6.10
lrwxrwxrwx 1 root root      33 Okt 13 17:36 libMagickCore-7.Q16HDRI.so.10 -> libMagickCore-7.Q16HDRI.so.10.0.0
-rwxr-xr-x 1 root root 3026744 Jan 30  2022 libMagickCore-7.Q16HDRI.so.10.0.0
lrwxrwxrwx 1 root root      33 Okt 13 17:36 libMagickWand-7.Q16HDRI.so.10 -> libMagickWand-7.Q16HDRI.so.10.0.0
-rwxr-xr-x 1 root root 1284736 Jan 30  2022 libMagickWand-7.Q16HDRI.so.10.0.0
lrwxrwxrwx 1 root root      11 Okt 13 17:36 libzip.so -> libzip.so.5
lrwxrwxrwx 1 root root      13 Okt 13 17:36 libzip.so.5 -> libzip.so.5.4
-rwxr-xr-x 1 root root  135312 Jun 19  2021 libzip.so.5.4

usr/lib64/ImageMagick-7.1.0:
insgesamt 4
drwxr-xr-x 3 root root 4096 Okt 13 15:50 modules-Q16HDRI

usr/lib64/ImageMagick-7.1.0/modules-Q16HDRI:
insgesamt 4
drwxr-xr-x 2 root root 4096 Okt 13 16:53 coders

usr/lib64/ImageMagick-7.1.0/modules-Q16HDRI/coders:
insgesamt 736
-rwxr-xr-x 1 root root   1080 Jan 30  2022 gif.la
-rwxr-xr-x 1 root root  35256 Jan 30  2022 gif.so
-rwxr-xr-x 1 root root   1093 Jan 30  2022 jpeg.la
-rwxr-xr-x 1 root root  56104 Jan 30  2022 jpeg.so
-rwxr-xr-x 1 root root   1098 Jan 30  2022 magick.la
-rwxr-xr-x 1 root root 219288 Jan 30  2022 magick.so
-rwxr-xr-x 1 root root   1102 Jan 30  2022 png.la
-rwxr-xr-x 1 root root 179624 Jan 30  2022 png.so
-rwxr-xr-x 1 root root   1087 Jan 30  2022 pnm.la
-rwxr-xr-x 1 root root  59792 Jan 30  2022 pnm.so
-rwxr-xr-x 1 root root   1156 Jan 30  2022 svg.la
-rwxr-xr-x 1 root root  85008 Jan 30  2022 svg.so
-rwxr-xr-x 1 root root   1115 Jan 30  2022 webp.la
-rwxr-xr-x 1 root root  27160 Jan 30  2022 webp.so
-rwxr-xr-x 1 root root   1080 Jan 30  2022 xcf.la
-rwxr-xr-x 1 root root  26872 Jan 30  2022 xcf.so
User avatar
greengeek
Posts: 1215
Joined: Thu Jul 16, 2020 11:06 pm
Has thanked: 349 times
Been thanked: 146 times

Re: Reading QRCode on Linux desktop? [solved]

Post by greengeek »

HerrBert wrote: Tue Oct 10, 2023 6:41 pm

... running qtqr fails due to many missing dependencies.
If anybody here is able to read qr-code images on a desktop pc, please let me know...

Here is a pet and an sfs for running QtQr on Fossa96 generic.
Use at own risk. (ie test first without save file)
(If you have a save file or save folder please always make a backup before testing any pets or sfs)

Main features:
- Can scan QR code from your webcam (either internal or external cam)
- Creates QR codes in various formats eg: text, email, web url, wifi network etc etc
- Can read QR from file

Links:
(approx 3MB download)
sfs:
https://www.mediafire.com/file/lds3w2rw ... 1.sfs/file
(edit: previous sfs did not load menu entry correctly, but desktop file now fixed)

Pet:
https://www.mediafire.com/file/0fif689n ... 1.pet/file

Note:
Tested with F96CE generic ie: ootb without anything else added
ie: if you have already added zbar and qrencode stuff then you may wish to leave out some of the contents of the pet or sfs if you like...

Screenshot.png
Screenshot.png (30.31 KiB) Viewed 816 times

.
Format options:

FormatOptions.png
FormatOptions.png (34.65 KiB) Viewed 816 times
User avatar
rockedge
Site Admin
Posts: 5823
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 2076 times
Been thanked: 2169 times
Contact:

Re: Reading QRCode on Linux desktop? [solved]

Post by rockedge »

@greengeek Thanks!! I downloaded the SFS version and added it to a HDD location and then in F96-CE_4 used SFS-Load to install it.

Works great.

puppyforumlink.png
puppyforumlink.png (2.12 KiB) Viewed 771 times
HerrBert
Posts: 340
Joined: Mon Jul 13, 2020 6:14 pm
Location: Germany, NRW
Has thanked: 17 times
Been thanked: 114 times

Re: Reading QRCode on Linux desktop? [solved]

Post by HerrBert »

Today i scanned a document and ran it thru gocr and stumbled upon gocr's capability of detecting barcode - respectively qr-code...
Makes things easier, because gocr can be downloaded via PPM in s15pup64 and has no further dependencies.

Post Reply

Return to “Users”