A simple, yet effective alternative to TextSniper for macOS — now for Linux (GNOME Wayland).
Uses Flameshot for interactive region selection, Tesseract OCR for text extraction, and wl-clipboard to put the result on your clipboard.
- Linux with GNOME on Wayland (tested on Ubuntu 26.04, GNOME Shell 50)
- Flameshot — region screenshot
- Tesseract OCR — text recognition
- wl-clipboard — Wayland clipboard (
wl-copy) - Python 3 with
PyGObjectandAyatanaAppIndicator3— tray icon
sudo apt install flameshot tesseract-ocr wl-clipboard gir1.2-ayatanaappindicator3-0.1 python3-gigit clone https://github.com/m-faizan-tariq/textsniper-linux.git
cd textsniper-linux
chmod +x install.sh
./install.sh-
Copy the scripts to
~/.local/bin/:cp textsnip.sh ~/.local/bin/textsnip cp textsnip-tray ~/.local/bin/textsnip-tray chmod +x ~/.local/bin/textsnip ~/.local/bin/textsnip-tray
-
Add desktop entries:
cp textsnip.desktop ~/.local/share/applications/ cp textsnip-tray.desktop ~/.config/autostart/
-
Bind a keyboard shortcut (e.g. Win+Shift+T):
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:\ /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/\ name 'TextSniper' gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:\ /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/\ command 'textsnip' gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:\ /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/\ binding '<Super><Shift>T'
-
Start the tray icon to access OCR from your system tray:
textsnip-tray
-
Configure Flameshot to hide the help overlay:
mkdir -p ~/.config/flameshot cat > ~/.config/flameshot/flameshot.ini << 'EOF' [General] showHelp=false EOF
textsnip ──> flameshot gui -s -r ──> PNG (stdout)
│
▼
tesseract stdin stdout ──> plain text
│
▼
wl-copy ──> system clipboard
| File | Purpose |
|---|---|
textsnip.sh |
Main OCR pipeline script |
textsnip-tray |
System tray icon (Python/Gtk) |
textsnip.desktop |
Application launcher entry |
textsnip-tray.desktop |
Autostart entry |
install.sh |
One-command installer |
- The Flameshot dimensions overlay cannot be hidden and will briefly appear on each capture.
- This project was built for GNOME Wayland. X11 users may need
xclipinstead ofwl-copy. - AI-generated.
Apache-2.0
