{"id":20332351,"url":"https://github.com/zeroby0/unilock","last_synced_at":"2025-08-20T22:49:25.318Z","repository":{"id":175499881,"uuid":"653549735","full_name":"zeroby0/unilock","owner":"zeroby0","description":"Lock / Unlock all your (Gnome/Linux) computers at once. ","archived":false,"fork":false,"pushed_at":"2023-07-10T06:50:29.000Z","size":16,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-16T06:46:45.722Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zeroby0.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-14T09:09:53.000Z","updated_at":"2024-10-08T16:39:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"e0c540eb-7977-466f-bfc7-27345e3b4da4","html_url":"https://github.com/zeroby0/unilock","commit_stats":null,"previous_names":["zeroby0/unilock"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zeroby0/unilock","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeroby0%2Funilock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeroby0%2Funilock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeroby0%2Funilock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeroby0%2Funilock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zeroby0","download_url":"https://codeload.github.com/zeroby0/unilock/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zeroby0%2Funilock/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271399879,"owners_count":24752819,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-20T02:00:09.606Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-14T20:26:10.332Z","updated_at":"2025-08-20T22:49:25.291Z","avatar_url":"https://github.com/zeroby0.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Unilock :unlock:\n\nLock / Unlock all your (Gnome/Linux) computers at once.  \n\n\nYou should use this with Tailscale (or any other VPN), or anyone\nin your network will be able to lock/unlock your computers. \nSee the [Tailscale](#tailscale) section.\n\n### Usage\n\n#### Controller\n\nDownload `controller.py` onto your main\ncomputer (Controller), and add the IPs of\ncomputers you'd like to control to it.\n\n\nFor example:\n```py\nlisteners = [\n    # Delete these lines and\n    # add IPs of your listeners here.\n    '100.110.23.50',\n    '100.21.245.51',\n    '100.180.23.50:62000',\n]\n```\n\nThen run `gdbus monitor -y -d org.freedesktop.login1 | python3 controller.py`.\n\n\n#### Listeners\n\nDownload `listener.py` onto the computers\nyou'd like to control (Listeners), and\nset the interface you'd like them to listen on.\n\nFor example:\n```py\ninterface = 'eth0'\ninterface_ip = None  # Optional. We'll detect the IP\n\nport = 49050 # default: 49050\n```\n\nthen run `python3 listener.py`.\n\nAnd you're all set.\n\n### Systemd\n\nYou can create systemd services so Unilock\nstarts when your computer starts.\n\n#### Controller\n\nPut this at `~/.config/systemd/user/unilock-controller.service`\non your controller and run \n`systemctl --user enable unilock-controller --now` to enable it.\n\n```\n[Unit]\nDescription=Unilock Controller: Lock all systems when this system is locked\nAfter=graphical.target\nWants=gnome-session.target\n\n[Service]\nExecStart=/bin/bash -c \"gdbus monitor -y -d org.freedesktop.login1 | python3 /path/to/controller.py\"\nRestart=on-failure\nRestartSec=3s\n\n[Install]\nWantedBy=default.target\n```\n\n#### Listener\n\nPut this at `~/.config/systemd/user/unilock-listener.service`\non your listeners and run\n`systemctl --user enable unilock-listener --now` to enable it.\n\n```\n[Unit]\nDescription=Unilock Listener: Lock/Unlock this system following controller\nAfter=graphical.target\nWants=gnome-session.target\n\n[Service]\nExecStart=/bin/bash -c \"python3 /path/to/listener.py\"\nRestart=on-failure\nRestartSec=3s\n\n[Install]\nWantedBy=default.target\n```\n\n### Tailscale\n\n\nIf you use [Tailscale](https://tailscale.com/), set \ninterface to `tailscale0` on\nyour listeners.\n\nAnd add the `tailscaled.service` as\ndependency to the Controller and Listener\nsystemd service files.\n\n\n```\nAfter=graphical.target tailscaled.service\nWants=gnome-session.target tailscaled.service\n```\n\n### Thank you\n\nThank you to [@zerodogg](https://github.com/zerodogg)\nfor https://notes.zerodogg.org/GNOME/lock-unlock-cli/\nand to [@gogama](https://github.com/gogama)\nfor https://github.com/gogama/lockheed.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzeroby0%2Funilock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzeroby0%2Funilock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzeroby0%2Funilock/lists"}