Please help me install and set up "Rouge" from veered.org on my own computer or server. What it is: Drag over text anywhere on screen and read a translation. It runs on: The COSMIC desktop (Pop!_OS). Project page: https://veered.org/screen-translator-linux/ Source code download (zip): https://veered.org/screen-translator-linux/rouge-screen-translator.zip How I'd like you to help: 1. First ask me what you need to know: my operating system and version, my desktop environment if it matters, whether I'm comfortable with the terminal, and any accounts or hardware this project needs. 2. Then take me through it one step at a time. For each command, say briefly what it does, and wait for me to paste back the result before moving on. 3. Before any step that changes system settings, uses sudo, or edits an existing configuration file, tell me, and have me make a backup first. 4. If something fails, help me work out why. If the instructions below don't fit my system, say so rather than guessing. 5. At the end, show me how to check that it works, and how to uninstall it. The project is shared as-is by its author, with no warranty. If we find a problem in the project itself, please help me write a short, clear note I can send to support@veered.org. Here is the project's documentation (README files from the download): ===== README.md ===== # Screen Translator for Linux (Rouge) *Why Rouge? The word for red in another language.* **Runs on** the COSMIC desktop (Pop!_OS). **Version 1.0.** Part of [Veered](https://veered.org): free tools, shared as-is. Questions: support@veered.org Press a shortcut, drag a box over any text on screen, and read a translation in a popup at the spot you selected. Built for the COSMIC desktop on Wayland; works across multiple monitors. Claude reads the text and translates it in one step, so it handles any source language and messy real-world screenshots without OCR language packs. ## Please test before relying on it This is shared as-is, with no warranty. It works on my own computers, but your system, settings and software versions may differ, so please try it in a safe setting first. If something doesn't work, you can ask Claude (or another AI coding assistant) to look into it, and I'd appreciate hearing what you found and how you fixed it. You are also welcome to just let me know at support@veered.org, and I'll look into it. ## How you use it 1. Press **Super+Shift+T**. All monitors dim and the cursor becomes a crosshair. 2. Drag a rectangle over the text. **Esc** cancels. 3. The translation appears where you selected. It is selectable and also copied to the clipboard. Drag the header to move the popup; **x** or **Esc** closes it. `cosmic-translate-shot --file picture.png` translates an image file and prints the result, which is handy for testing your setup. ## Information for nerds: requirements, install and uninstall - COSMIC on Wayland — the desktop has to let a program take a picture of the screen, which COSMIC does. - A few Python packages, installed in one line: `sudo apt install python3-gi gir1.2-gtk-3.0 gir1.2-gtklayershell-0.1 python3-pil` - One translation engine: 1. **An Anthropic API key** (recommended, about 1 to 3 seconds per translation). Create one at https://console.anthropic.com and put it in the config file. Usage is billed to your API account. 2. **Claude Code**, if you already use it: when no key is set, the tool runs `claude -p` with your own login. Slower (several seconds per call). ### Install ```bash ./install.sh # creates the Super+Shift+T shortcut ./install.sh --key Super+Alt+t # a different shortcut ./install.sh --lang Spanish # translate into Spanish ./install.sh --no-shortcut # create the shortcut yourself in Settings ``` This installs `~/.local/bin/cosmic-translate-shot`, creates `~/.config/cosmic-tools/translate-shot.conf` with mode 600, and adds a COSMIC custom shortcut after backing up the shortcuts file to `~/.config/cosmic-tools/backups/`. Nothing needs `sudo`. Then add your key: ```bash $EDITOR ~/.config/cosmic-tools/translate-shot.conf # ANTHROPIC_API_KEY=... cosmic-translate-shot --check # shows the engine in use ``` ## Information for nerds: settings Settings live in `~/.config/cosmic-tools/translate-shot.conf` (see [`translate-shot.conf.example`](translate-shot.conf.example)). Environment variables with the same names take precedence. | Setting | Default | Meaning | | --- | --- | --- | | `ANTHROPIC_API_KEY` | empty | API key. Keep the file at mode 600; the tool warns if it is readable by others. | | `TRANSLATE_SHOT_ENGINE` | `auto` | `auto` (key if set, else Claude Code), `api`, or `cli` | | `TRANSLATE_SHOT_MODEL` | `claude-sonnet-5` | Model id. Sonnet reads dense or small text accurately; `claude-haiku-4-5` is faster and cheaper but makes more mistakes on dense text. | | `TRANSLATE_SHOT_LANG` | `English` | Target language, in plain words | | `TRANSLATE_SHOT_TIMEOUT` | `120` | Seconds before giving up | | `TRANSLATE_SHOT_CLAUDE` | auto | Path to the `claude` CLI | Privacy: the selected region of your screen is sent to Anthropic for translation. Do not capture anything you would not paste into Claude. ### Uninstall ```bash ./uninstall.sh # keeps your config file ./uninstall.sh --purge # also deletes it ``` ## Information for nerds COSMIC has no grim-compatible screenshot protocol, and its portal refuses silent captures, so the script speaks `ext_image_copy_capture_v1` directly over the Wayland socket in pure Python with shared-memory buffers. The selection overlay is one gtk-layer-shell surface per monitor, which is also what lets the popup sit at exact screen coordinates. Dragging a layer surface by changing its own margins feeds back on itself, so during a drag the surface temporarily covers the monitor (transparently) and the visible frame moves inside it. Crops smaller than 1000 px are upscaled 2x before sending, which noticeably improves reading of small UI text. ### Tests ```bash python3 -m unittest discover -s tests -v ``` The tests use a local mock HTTP server in place of the API and a throwaway HOME for the installer. They make no network calls, capture nothing and open no windows. ## Information for nerds: conventions - The installer is per-user: it writes to `~/.local/bin`, `~/.local/share/cosmic-tools` and `~/.config/cosmic-tools`, never to system directories, and needs no `sudo`. - Any step that edits a COSMIC config file makes a timestamped backup under `~/.config/cosmic-tools/backups/` first. - Configuration files are plain text with comments. ----- For Claude Code users ----- Download https://veered.org/screen-translator-linux/rouge-screen-translator.zip, unzip it into a new folder, read every README.md in it, and help me install and set up "Rouge" (Drag over text anywhere on screen and read a translation) on this machine. Check the requirements against this system first and tell me what is missing. Ask me before running anything with sudo, installing packages, or changing existing configuration files, and back those files up first. Finish by showing me how to test it and how to uninstall it.