google / google-authenticator-libpam

Apache License 2.0
1.76k stars 281 forks source link

How to decrease the QR code size #155

Closed shekarkcb closed 4 years ago

shekarkcb commented 4 years ago

I seem to have issue in getting QR code displayed, it occupies whole screen (irrespective of the screen size / terminal size). Is there any way where i can fix the size of the QR code which gets generated when google-authenticator command runs ( may be height X width in any of the files or command line argument) OS : CentOS 7.6. Terminals tried : MacOS Terminal, iTerm, Putty Tried google-authenticator -Q utf8 but this inserts lines between the QR code, sometimes this doesn't get recognized by the authenticator app.

Any pointers greatly helpful.

Thanks

ThomasHabets commented 4 years ago

You can make your terminal font smaller, temporarily, while you scan the code. I don't think it's possible to make it use fewer characters, no.

For me the utf8 is smaller than ANSI, and has no empty lines. I don't have a mac.

For me it works great with GNOME Terminal on Linux, and Putty on Windows.

shekarkcb commented 4 years ago

Thanks for the suggestions @ThomasHabets , tried decreasing the fonts, and it worked on both mac / windows putty. Closing this thread.