Bitcoin Forum
April 26, 2018, 03:37:55 PM *
News: Latest stable version of Bitcoin Core: 0.16.0  [Torrent]. (New!)
   Home   Help Search Donate Login Register  
Pages: [1]
Author Topic: Ubuntu - QR Code Handy Utils  (Read 2440 times)
Hero Member
Offline Offline

Activity: 784
Merit: 1000


View Profile WWW
July 02, 2011, 09:08:57 AM

Here's some handy info if you want to play with scanning QR codes in Ubuntu.
I know there's probably a gui app but this has it's uses too. It's quick once setup and can be automated easily.

Get some needed packages,

sudo apt-get install zbar-tools
sudo apt-get install xclip

Command to scan a QR and put on clipboard, ready to paste,

zbarimg -q --raw "$1" |xclip -selection c

Command to scan using webcam and put on clipboard - this one puts up a preview and when the green square is good press "space", and close window (X). (Better if it auto-closed...)

zbarcam --raw |xclip -selection c

I put these together into a tiny script that does both depending on file parm given,

if [ -n "$1" ]; then
  zbarimg -q --raw "$1" |xclip -selection c
  zbarcam --raw |xclip -selection c

Now you can attach this script to a menu item, or key or desktop shortcut easily.

For capturing a file you can attach it to a Nautilus Action file selected file as parm (%f) and it will allow you to right click any image to convert. I'd suggest adding a couple mime-type selectors  so it only shows for png and jpeg files, not all of them.

Pages: [1]
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!