{"id":15706850,"url":"https://github.com/horazont/xsudo","last_synced_at":"2025-08-23T01:10:14.154Z","repository":{"id":66139565,"uuid":"242503410","full_name":"horazont/xsudo","owner":"horazont","description":"Script to execute a X11 command as different user. Alternative to kdesudo/gksudo.","archived":false,"fork":false,"pushed_at":"2020-02-23T12:04:37.000Z","size":7,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-12T19:11:23.489Z","etag":null,"topics":["sudo","x11"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/horazont.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-23T11:19:37.000Z","updated_at":"2024-06-17T08:06:00.000Z","dependencies_parsed_at":"2023-06-25T23:56:41.214Z","dependency_job_id":null,"html_url":"https://github.com/horazont/xsudo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/horazont/xsudo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/horazont%2Fxsudo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/horazont%2Fxsudo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/horazont%2Fxsudo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/horazont%2Fxsudo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/horazont","download_url":"https://codeload.github.com/horazont/xsudo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/horazont%2Fxsudo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271727691,"owners_count":24810562,"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-22T02:00:08.480Z","response_time":65,"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":["sudo","x11"],"created_at":"2024-10-03T20:29:32.273Z","updated_at":"2025-08-23T01:10:14.128Z","avatar_url":"https://github.com/horazont.png","language":"Shell","readme":"# `xsudo`\n\n## Name\n\n`xsudo` – Execute an X11 application as a different user with the current user’s X11 server\n\n## Synopsis\n\n```console\n$ xsudo [-u USER] [-i] [-h] [--] COMMAND [ARGS...]\n```\n\n## Description\n\nThis script executes the given `COMMAND` (with the following `ARGS`) as\nthe given `USER`, using the X11 server of the invoking user.\n\nIn contrast to `ssh` with `-X`, this avoids having to pass all\ncommunication with the X11 server through a socket, which is generally\nmuch slower (and makes some applications fail).\n\n**Note:** Do not run graphical applications as root. They generally have\na way too large attack surface, and I’m also pretty sure that\napplications share the same X11 server can do nasty things to each\nother.\n\n**Note:** In the same vein, do not rely on this as a security tool. You\nmay want to look into Mandatory Access Control, such as SELinux or\nAppArmor.\n\n**Note:** The target user must be able to read and execute the `xsudo`\ncommand.\n\nWhen executing the command, it is run using a login-shell mode `bash`\nshell. This can currently not be turned off or changed.\n\n## Options\n\n* `-u`: The name of the user to run the command as. This is\n  required. *Do not pass `root` to this.*\n\n* `-h` (`--help`): Print a short usage summary and exit.\n\n* `-i`: Thoroughly clean the environment of the executed command. Only\n  the XAUTHORITY and DISPLAY variables, along with anything set by the\n  login shell will be present.\n\n## Exit Status\n\n`xsudo` exits with the exit status of the called command or 255 in case\nof an internal error.\n\n## Limitations and Known Bugs\n\n- The command will always be executed under a `bash` login shell, even\n  if the user has a different shell set. This should be fixed in a\n  future version.\n\n- `xsudo` always changes directory to the home directory of the target\n  user. This is intended as a convenience function.\n\n## Bug Reports\n\nReport any bugs or issues you encounter to the\n[Bugtracker on GitHub](https://github.com/horazont/xsudo/issues).\n\n## See Also\n\nssh(1) with the `-X` option, kdesudo(1), gksudo(1)\n\n## Authors\n\nJonas Schäfer, inspired by\n[an answer to my question on SuperUser](https://superuser.com/a/1527506/122572)\non how to substitute kdesudo and gksudo.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhorazont%2Fxsudo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhorazont%2Fxsudo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhorazont%2Fxsudo/lists"}