Please help me install and set up "Cordovan" from veered.org on my own computer or server. What it is: Unlock a stuck Linux lock screen with a button on your phone. It runs on: Linux with KDE Connect (KDE Plasma), GSConnect (GNOME) or COSMIC. Project page: https://veered.org/unlock-linux-from-phone/ Source code download (zip): https://veered.org/unlock-linux-from-phone/cordovan-phone-unlock.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 ===== # Unlock a Stuck Linux Lock Screen from Your Phone (Cordovan) *Why Cordovan? A deep red-brown leather from Córdoba, the kind a good key case is made of.* **Runs on** Linux with KDE Connect (KDE Plasma), GSConnect (GNOME) or COSMIC. **Version 1.0.** Part of [Veered](https://veered.org): free tools, shared as-is. Questions: support@veered.org **The problem:** you type your password, the lock screen says "Authenticating..." and nothing happens. Switching to a text console (Ctrl-Alt-F2) can freeze the whole machine, and then the only way out is the power button. **The fix:** a button on your phone, "Unlock computer". Tap it and the lock screen clears. Your windows and work stay as they were. It uses KDE Connect's "Run command", which you probably already have if your phone's notifications show up on your computer. ## Install ```sh bash install.sh ``` It asks for your password once. Then add the button on the computer: - **KDE Plasma:** System Settings > KDE Connect > your phone > Run command > Add command - **GNOME (GSConnect):** GSConnect settings > your phone > Commands > + - **COSMIC:** see "COSMIC" below Name it `Unlock computer`. The command is `~/.local/bin/phone-unlock` (the installer prints the full path). On the phone: KDE Connect > your computer > Run command. **Try it:** lock the screen, tap the button. To remove: `bash uninstall.sh`, then delete the button. ## If the button doesn't work - The phone and computer must be connected (notifications coming through). - From another computer: `ssh yourcomputer loginctl unlock-sessions` - Frozen solid: hold Alt+SysRq and press R, E, I, S, U, B, a second or two apart. That restarts safely, saving files first. The power button does not. ## Please test before relying on it This is shared as-is, with no warranty. It works on my own computers, and 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. ## License MIT. ## Information for nerds ### What it installs | File | What it does | |------|--------------| | `~/.local/bin/phone-unlock` | Runs `loginctl unlock-sessions`; logs each run to `~/.local/state/phone-unlock.log` | | `/etc/polkit-1/rules.d/49--phone-unlock.rules` | Grants `org.freedesktop.login1.lock-sessions` to your user only | `loginctl unlock-sessions` asks systemd-logind to send Unlock to every session, and the desktop's locker drops the lock. Without the rule, logind wants interactive authentication, which a phone-triggered command can't give. The rule names only your user, and only the lock/unlock-sessions action. Anyone who can already run commands as you could unlock your screen anyway, so it adds nothing an attacker in your account didn't have. ### COSMIC COSMIC's KDE Connect daemon ([cosmic-utils/kdeconnect](https://github.com/cosmic-utils/kdeconnect)) reads commands from `~/.config/kdeconnect/runcommand.json`: ```json [{"id":"phone-unlock","name":"Unlock computer","command":"/home/YOU/.local/bin/phone-unlock"}] ``` Then send the list to the phone (or reconnect it): ```sh busctl --user call io.github.hepp3n.kdeconnect /io/github/hepp3n/kdeconnect/Daemon \ io.github.hepp3n.kdeconnect.Daemon PushLocalCommands s ``` `ListDevices` on the same object gives the device id. If the link keeps dropping on COSMIC, see [Scarlet](https://veered.org/kdeconnect-cosmic-fix/). ### Checking a tap arrived ```sh tail ~/.local/state/phone-unlock.log ``` `ok` means logind accepted it; `failed:` shows logind's reason. ----- For Claude Code users ----- Download https://veered.org/unlock-linux-from-phone/cordovan-phone-unlock.zip, unzip it into a new folder, read every README.md in it, and help me install and set up "Cordovan" (Unlock a stuck Linux lock screen with a button on your phone) 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.