{"id":16105094,"url":"https://github.com/intgr/ego","last_synced_at":"2025-04-12T09:21:23.081Z","repository":{"id":37032081,"uuid":"237831856","full_name":"intgr/ego","owner":"intgr","description":"Alter Ego: run Linux desktop applications under a different local user","archived":false,"fork":false,"pushed_at":"2025-04-11T22:52:22.000Z","size":235,"stargazers_count":150,"open_issues_count":25,"forks_count":1,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-04-11T23:34:44.434Z","etag":null,"topics":["isolation","linux","linux-desktop-applications","pulseaudio","sandboxing","wayland","xhost"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/intgr.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":"2020-02-02T20:27:45.000Z","updated_at":"2025-04-07T06:08:49.000Z","dependencies_parsed_at":"2024-06-28T05:21:35.440Z","dependency_job_id":"89b4b4f4-4395-48b8-84d8-191e4f0905ab","html_url":"https://github.com/intgr/ego","commit_stats":{"total_commits":108,"total_committers":3,"mean_commits":36.0,"dds":"0.18518518518518523","last_synced_commit":"4a76d1ab14d95a1fff44757d87c79ab15be400a3"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intgr%2Fego","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intgr%2Fego/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intgr%2Fego/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/intgr%2Fego/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/intgr","download_url":"https://codeload.github.com/intgr/ego/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248544037,"owners_count":21121880,"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","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":["isolation","linux","linux-desktop-applications","pulseaudio","sandboxing","wayland","xhost"],"created_at":"2024-10-09T19:08:23.506Z","updated_at":"2025-04-12T09:21:23.060Z","avatar_url":"https://github.com/intgr.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"ego (a.k.a Alter Ego)\n=====================\n\n[![Crates.io version](https://img.shields.io/crates/v/ego.svg)](https://crates.io/crates/ego)\n[![Tests status](https://github.com/intgr/ego/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/intgr/ego/actions?query=workflow:Tests)\n\n\u003e Do all your games need access to your documents, browser history, SSH private keys?\n\u003e\n\u003e ... No? Just run `ego steam`!\n\n**Ego** is a tool to run Linux desktop applications under a different local user. Currently\nintegrates with Wayland, Xorg, PulseAudio and xdg-desktop-portal. You may think of it as `xhost`\nfor Wayland and PulseAudio. This is done using filesystem ACLs and X11 host access control.\n\nDisclaimer: **DO NOT RUN UNTRUSTED PROGRAMS VIA EGO.** However, using ego is more secure than\nrunning applications directly under your primary user.\n\nDistro packages\n---------------\nDistribution packages are available for:\n* Arch Linux (user-contributed package) https://aur.archlinux.org/packages/ego/\n\nAfter installing the package, add yourself to the `ego-users` group. After logout and login,\nthe `ego` command should just work.\n\n([varia/README.md](varia/README.md) documents recommendations for distro packagers)\n\nManual setup\n------------\nEgo aims to come with sane defaults and be easy to set up.\n\n**Requirements:**\n* [Rust \u0026 cargo](https://www.rust-lang.org/tools/install)\n* `libacl.so` library (Debian/Ubuntu: libacl1-dev; Fedora: libacl-devel; Arch: acl)\n* `libxcb.so` library (Debian/Ubuntu: libxcb1-dev; Fedora: libxcb-devel; Arch: libxcb)\n\n**Recommended:** (Not needed when using `--sudo` mode, but some desktop functionality may not work).\n* `machinectl` command (Debian/Ubuntu/Fedora: systemd-container; Arch: systemd)\n* `xdg-desktop-portal-gtk` (Debian/Ubuntu/Fedora/Arch: xdg-desktop-portal-gtk)\n\n**Installation:**\n\n1. Run:\n\n       cargo install ego\n       sudo cp ~/.cargo/bin/ego /usr/local/bin/\n\n2. Create local user named \"ego\": \u003csup\u003e[1]\u003c/sup\u003e\n\n       sudo useradd ego --uid 155 --create-home\n\n3. That's all, try it:\n\n       ego xdg-open .\n\n[1] No extra groups are needed by the ego user.\nUID below 1000 hides this user on the login screen.\n\n### Avoid password prompt\nIf using \"machinectl\" mode (default if available), you need the rather new systemd version \u003e=247\nand polkit \u003e=0.106 to do this securely.\n\nCreate file `/etc/polkit-1/rules.d/50-ego-machinectl.rules`, polkit will automatically load it\n(replace `\u003cmyname\u003e` with your own username):\n\n```js\npolkit.addRule(function(action, subject) {\n    if (action.id == \"org.freedesktop.machine1.host-shell\" \u0026\u0026\n        action.lookup(\"user\") == \"ego\" \u0026\u0026\n        subject.user == \"\u003cmyname\u003e\") {\n            return polkit.Result.YES;\n    }\n});\n```\n\n##### sudo mode\nFor sudo, add the following to `/etc/sudoers` (replace `\u003cmyname\u003e` with your own username):\n\n    \u003cmyname\u003e ALL=(ego) NOPASSWD:ALL\n\nChangelog\n---------\n\n##### Unreleased\n* Use X11 protocol directly via `libxcb`. The `xhost` dependency is no longer needed. (#163)\n\n##### 1.1.7 (2023-06-26)\n* Distro packaging: added tmpfiles.d conf to create missing ego user home directory (#134, fixed issue #131)\n* Ego now detects and warns when target user's home directory does not exist or has wrong ownership (#139)\n* Minimum Supported Rust Version (MSRV) is now 1.64.0 (#116)\n* Various minor cleanups, replaced unmaintained dependencies, dependency updates.\n\n##### 1.1.6 (2023-01-21)\n* Updated to clap 4.0.x (#101) and many other dependency updates\n* Fixes for new clippy lints (#95, #93, #111)\n* Use `snapbox` instead of hand-coded snapshot testing (#102)\n* Minimum Supported Rust Version (MSRV) was determined to be 1.60.0 (#113)\n\n##### 1.1.5 (2022-01-02)\n* Document xhost requirement, improve xhost error reporting (#76)\n* Upgrade to clap 3.0.0 stable (#71)\n\n(Version 1.1.4 was yanked, it was accidentally released with a regression)\n\n##### 1.1.3 (2021-11-12)\n* Pin clap version (fixes #65) (#68)\n\n##### 1.1.2 (2021-05-08)\n* Enable sudo askpass helper if SUDO_ASKPASS is set (#58)\n  * Example how to set up a GUI password prompt with sudo: https://askubuntu.com/a/314401\n  * Note: For a GUI password prompt with the machinectl mode, you need to run a\n    Polkit authentication agent instead\n\n##### 1.1.1 (2021-03-23)\n* Include drop-in files for polkit, sudoers.d, sysusers.d -- for distro packages (#53)\n* Documentation tweaks (#51, #53)\n\n##### 1.1.0 (2021-03-07)\n* Default to `machinectl` if available, fall back to `sudo` otherwise (#47)\n* Documentation \u0026 minor improvements (#46, #48)\n\n##### 0.4.1 (2021-01-29)\n* Fixed `--machinectl` on Ubuntu, Debian with dash shell (#42)\n* Fixed error reporting when command execution fails (#43)\n* Documented how to avoid password prompt with machinectl \u0026 other doc tweaks (#41)\n\n##### 0.4.0 (2021-01-29)\n* Improved integration with desktop environments:\n  * Launch xdg-desktop-portal-gtk in machinectl session (#6, #31)\n  * Old behavior is still available via `--machinectl-bare` switch.\n* Shell completion files are now auto-generated with clap-generate 3.0.0-beta.2 (#36, #28)\n  * bash, zsh and fish shells are supported out of the box.\n* Code reorganization and CI improvements (#21, #23)\n* Dependency updates (#20, #24, #27, #22, #26, #33, #35, #38, #37, #39)\n\n##### 0.3.1 (2020-03-17)\n* Improved error message for missing target user (#16)\n\n##### 0.3.0 (2020-03-02)\n* Initial machinectl support (using `--machinectl`) (#8)\n* Updated: posix-acl (#9)\n\n##### 0.2.0 (2020-02-17)\n* Added zsh completion support (#5)\n* Added `--verbose` flag (#4)\n* Added `--user` argument and command-line parsing (#3)\n\n##### 0.1.0 (2020-02-13)\nInitial version\n\nAppendix\n--------\nEgo is licensed under the MIT License (see the `LICENSE` file). Ego was created by Marti Raudsepp.\nEgo's primary website is at https://github.com/intgr/ego\n\nThanks to Alexander Payne (myrrlyn) for relinquishing the unused \"ego\" crate name.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fintgr%2Fego","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fintgr%2Fego","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fintgr%2Fego/lists"}