Home
» LINUX
»
How to Scan QR Codes on a Linux Desktop
How to Scan QR Codes on a Linux Desktop
CoBang lets you scan a QR code on a Linux desktop with a webcam or an image file. Install it from Flathub with Flatpak, open the app, choose camera or image mode, and read the decoded result in the app. If your webcam is unavailable, check the desktop’s camera permission portal or try the package supplied for your distribution.
Install CoBang on Linux
CoBang is a native Linux QR and barcode scanner. Its maintainer lists Ubuntu packages through a PPA, Arch Linux through the AUR, Fedora through COPR, and Flatpak through Flathub. The maintainer notes that the Flathub release can lag behind traditional distro packages. For most users, Flatpak is a convenient route across distributions; if you prefer your distro’s package manager, follow the maintainer’s current instructions for your specific release.
Install with Flatpak
If Flatpak is already installed and Flathub is configured, open a terminal and run:
flatpak install flathub vn.hoabinh.quan.CoBang
Confirm the install prompt. If Flatpak reports that it cannot find the Flathub remote, add the official repository and retry:
Flatpak setup varies by distribution, so use Flathub’s setup instructions to install Flatpak and enable Flathub for Ubuntu, Fedora, Arch, Linux Mint, or another supported distro. When prompted, review the app and runtime details before confirming.
Use a native distro package
Ubuntu and derivatives can use the maintainer’s PPA; the project notes that CoBang version 1 and later require a distribution as new as Ubuntu 24.10. The maintainer also provides an AUR route for Arch and a COPR route for Fedora. Package availability and commands can change, so consult the current CoBang installation notes before adding a repository or building an AUR package. Avoid copying an old package command if it does not match your release.
Scan a QR code with your webcam
Connect or enable a camera. Make sure the webcam works in your desktop session and is not being used exclusively by another app.
Launch CoBang. Find it in the applications menu. You can also start the Flatpak build from a terminal with flatpak run vn.hoabinh.quan.CoBang.
Select camera mode. In the app, choose the camera view if it did not open automatically. If Linux asks for camera access, allow it for CoBang only if you want to scan with that camera.
Frame the code. Hold the printed code steady in the preview, keep the full square visible, and avoid glare or heavy blur. Give the app a moment to decode it.
Review the result. CoBang displays decoded content in the result area. Read it before opening a link, joining a Wi-Fi network, or copying other content. A QR code can contain a URL or data you did not expect.
Scan a QR code saved as an image
Open CoBang and switch from the camera view to its image or picture mode.
Choose the image-opening control, then select the saved QR code image in the file chooser. CoBang’s interface may vary slightly by release and desktop environment.
Wait for decoding, then inspect the result in the app. The project supports QR and barcode scanning from a static image, including local or remote image sources where supported by the app.
Use a clear, uncropped image with good contrast. If the code is embedded in a screenshot, crop away unrelated content only if the complete QR square remains intact. A distorted, tiny, low-contrast, or partially covered code may not decode.
If CoBang cannot access the webcam
Flatpak runs apps in a sandbox. The CoBang maintainer says sandboxed webcam access uses xdg-desktop-portal; camera visibility can depend on the portal support in your desktop environment. Check your desktop’s privacy or camera settings, close other camera apps, and restart CoBang after changing permissions. Also confirm the camera is visible to the operating system and that your session has a working portal service.
If the camera still does not appear, try the distro package route described by the project. CoBang accesses V4L2 devices directly when it runs outside the Flatpak sandbox, while the Flatpak build uses the portal. This is a useful troubleshooting difference, not a guarantee that changing package format will fix every camera or driver issue.
For a quick alternative when a camera is not available, use image mode with a QR screenshot or photo. The project’s official repository and Flathub listing provide current project and package details.