Monday, August 1, 2011

Desktop QR Code Reader for Ubuntu

So, for a long time, I wanted something that could go from this:



to this:



And, I was frustrated that no one made it. I would have made it but decoding QR codes is just so darn difficult... that is until ZBar came along with QR Code support. Now, I have a button I can click to move it over. Unfortunately, it isn't /that/ easy. I genned this app up by taking a Gtk demo for making a system tray applet, adding some screen shot capabilities, pumping it into ZBar, then using some of the xosc overlay stuff to draw the outlines. It was pretty straightforward. You can get the code here:

https://cnlohr.net/pubsvn/projects/X11QR/x11qr

ZBar is just awesome, it even gets the bizarre QR Codes:



Also, for your enjoyment, here's a video demonstrating it:




HOW TO INSTALL:
sudo add-apt-repository ppa:charles-cnlohr/qroverlay
sudo apt-get install qroverlay


NOTE: I do not have a menu icon for this so you will need to run it either from a terminal (qroverlay) OR you can type Alt+F2 and type qroverlay and click run (once it's installed).

Anyone who can help me to make it have a menu icon would be really great.

9 comments:

Brian Herman said...

I am running xubuntu and it doesn't seem to compile do you have a list of dependencies that I need for this program?

Charles said...

I'm really bad at figuring it all out... what libraries were you missing... At the least I think you need:

libgtkmm-2.4-dev libglibmm-2.4-dev libglib-2.0-dev libsigc++-2.0-dev libgtk2.0-dev libcairo2-dev libcairomm-1.0-dev libgdk-pixbuf2.0-dev libpangomm-1.4-dev libpango1.0-dev libatkmm-1.6-dev libatk1.0-dev libmagick++-dev
libxinerama-dev libxext-dev build-essential libzbar-dev

Please test this - if it is right, I will add it to the primary post.

Charles said...

I'm trying to make a PPA - I'll post about that once it gets built for amd64 + i386

Charles said...

Ok - got the PPA - see instructions

The WTO Blogger said...

My friend wrote a somewhat similar program, though it's for KDE. To add a menu, you should first create a .desktop file (this is an example from my friend https://sourceforge.net/p/kqrcode/kqrcode/ci/cb09cdb6e108be8896e903f6d7dbebe590137ae1/tree/kqrcode/kqrcode.desktop?force=True), and then add it to makefile to make it install into $prefix/share/applications/. In case of KQRCode, CMake does that, but i don't know what build system you are using.

balping said...

I havent found qroverlay package. Can you help me?

Akiara said...

i could install it downloading the qroverlay_0.2_i386.deb link at https://launchpad.net/~charles-cnlohr/+archive/qroverlay/+packages
installed it using the default instalator on ubuntu 11.10 (oneric)

strangely it didn't appear using alt+F2 ... and when i use it on terminal, it says:
qroverlay by Charles Lohr - Licensed under either the MIT/x11 or New BSD Licenses. You choose.
Simply run this tool, and click on its icon in the system tray. It will highlight all
QR Codes. Click again to hide all outlines. Right-click to copy the data to the clipboard

(qroverlay:9999): Gtk-WARNING **: Imposible encontrar el motor de temas en la ruta al _modulo: «pixmap»,

(qroverlay:9999): Gtk-WARNING **: Imposible encontrar el motor de temas en la ruta al _modulo: «pixmap»,

(qroverlay:9999): Gtk-WARNING **: Imposible encontrar el motor de temas en la ruta al _modulo: «pixmap»,

(qroverlay:9999): Gtk-WARNING **: Imposible encontrar el motor de temas en la ruta al _modulo: «pixmap»,

That error message means: Imposible to find the themes engine in the path to the _module:"pixmap"


any idea how to fix this?

Thank you

Edmund Laugasson said...

Not installable for Ubuntu 10.04 LTS using repository :(

Kelly Jones said...

Fantastic post. Learn how to incorporate QR codes in your web apps to deliver quick information directly to your users' mobile device http://blog.caspio.com/web_apps/4-ways-to-use-qr-codes-in-your-web-apps/