{"id":44422974,"url":"https://github.com/nlpsuge/xsession-manager","last_synced_at":"2026-02-12T10:08:50.250Z","repository":{"id":45503618,"uuid":"186085925","full_name":"nlpsuge/xsession-manager","owner":"nlpsuge","description":"Save and restore windows for X11 desktop environment like Gnome, and many other features. ","archived":false,"fork":false,"pushed_at":"2022-08-13T16:17:13.000Z","size":225,"stargazers_count":16,"open_issues_count":3,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-11-29T01:41:12.229Z","etag":null,"topics":["gnome","linux","productivity","psutils","python3","restore-sessions","session-management","window-switcher","wmctrl","wnck","x-session-manager","x11","xorg"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nlpsuge.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}},"created_at":"2019-05-11T04:06:26.000Z","updated_at":"2025-10-26T21:06:13.000Z","dependencies_parsed_at":"2022-07-19T02:17:06.699Z","dependency_job_id":null,"html_url":"https://github.com/nlpsuge/xsession-manager","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/nlpsuge/xsession-manager","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nlpsuge%2Fxsession-manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nlpsuge%2Fxsession-manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nlpsuge%2Fxsession-manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nlpsuge%2Fxsession-manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nlpsuge","download_url":"https://codeload.github.com/nlpsuge/xsession-manager/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nlpsuge%2Fxsession-manager/sbom","scorecard":{"id":690718,"data":{"date":"2025-08-11","repo":{"name":"github.com/nlpsuge/xsession-manager","commit":"3d82384a940af6549240c6d730299d8ba9e5cce4"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/21 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: GNU General Public License v3.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 11 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-22T02:14:35.394Z","repository_id":45503618,"created_at":"2025-08-22T02:14:35.394Z","updated_at":"2025-08-22T02:14:35.394Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29363010,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-12T08:51:36.827Z","status":"ssl_error","status_checked_at":"2026-02-12T08:51:26.849Z","response_time":55,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["gnome","linux","productivity","psutils","python3","restore-sessions","session-management","window-switcher","wmctrl","wnck","x-session-manager","x11","xorg"],"created_at":"2026-02-12T10:08:49.571Z","updated_at":"2026-02-12T10:08:50.239Z","avatar_url":"https://github.com/nlpsuge.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [xsession-manager](https://github.com/nlpsuge/xsession-manager)\n\nSave and restore windows for X11 desktop environment like Gnome, and many other features.\n\nThis project was written in ```Bash``` originally. But now I'm completely rewriting it in ```Python```\nwhich obviously makes it way more flexible, extensible.\n\n***If you are a Gnome 3 user and also want to use these similar features on Wayland, please give [Another Window Session Manager](https://github.com/nlpsuge/gnome-shell-extension-another-window-session-manager) a try, it's a Gnome extension, much more faster than `xsm`, and much more native experience on Gnome.***\n\n[![Downloads](https://pepy.tech/badge/xsession-manager/month)](https://pepy.tech/project/xsession-manager)\n[![Supported Versions](https://img.shields.io/pypi/pyversions/xsession-manager.svg)](https://pypi.org/project/xsession-manager)\n[![Pypi Versions](https://img.shields.io/pypi/v/xsession-manager.svg)](https://pypi.python.org/pypi/xsession-manager)\n[![Contributors](https://img.shields.io/github/contributors/nlpsuge/xsession-manager.svg)](https://github.com/nlpsuge/xsession-manager/graphs/contributors)\n\n## Install\n### Install dependencies\n+ Fedora\n```Bash\ndnf install python3-devel python3-tkinter wmctrl\n```\n### Install [xsession-manager](https://pypi.org/project/xsession-manager) via PyPi\n```Bash\npip3 install xsession-manager\n```\n### Install xsession-manager via source code\n#### Method-1: Using pip. \nThis method install xsession-manager in `~/.local/lib/python3.9/site-packages` if you are a normal user, in `/usr/local/lib/python3.9/site-packages` if you are root.\n```Bash\ncd the_root_of_source_code\npip install .\n```\n#### Method-2: Using setup.py\nThis method install xsession-manager in `/usr/local/lib/python3.9/site-packages`.\n```Bash\ncd the_root_of_source_code\nsudo python3 setup.py install\n```\n\n## Common usage\n+ Save running windows as a X session\n\nSave all running GUI windows to `xsession-default`\n```Bash\nxsm -s\n```\n\nSpecify a session name like, `my-session-name`, restore it later on by running `xsm -s my-session-name`. This feature should be very helpful when you have multiple tasks to do and each task needs different GUI apps.\n```Bash\nxsm -s my-session-name\n```\n\nNote: \n1. It will save some window states, which include Always on Top and Always on Visible Workspace and will be used when executing `xsm -r` or `xsm -ma`.\n\n+ Close running windows except those apps with mutiple windows. It's better to leave them to the user to close by hand, some apps like JetBrain's IDEs may have their own session. \n```Bash\nxsm -c\n```\n+ Close running windows include those apps with mutiple windows.\n```Bash\nxsm -c -im\n```\n+ Restore the saved X session\n\nRestore all GUI apps using the saved session named `xsession-default`\n```Bash\nxsm -r\n```\nRestore `gnome-system-monitor` using the saved session named `my-session-name`\n```Bash\nxsm -r my-session-name -i gnome-system-monitor\n```\n+ Move running windows to their Workspaces according to the saved X session\n```Bash\nxsm -ma\n```\n+ List saved X sessions\n```Bash\nxsm -l\n```\n+ View the details of a saved X sessions\n```Bash\nxsm -t xsession-default\n```\n\n\n## Full usage:\n\n```\nusage: xsm [-h] [-s [SAVE]] [-c [CLOSE_ALL ...]] [-im] [-r [RESTORE]] [-ri RESTORING_INTERVAL] [-pr [PR]] [-l] [-t [DETAIL]]\n           [-x EXCLUDE [EXCLUDE ...]] [-i INCLUDE [INCLUDE ...]] [-ma [MOVE_AUTOMATICALLY]] [--version] [-v] [-vv]\n\noptions:\n  -h, --help            show this help message and exit\n  -s [SAVE], --save [SAVE]\n                        Save the current session. Save to the default session if not specified a session name.\n  -c [CLOSE_ALL ...], --close-all [CLOSE_ALL ...]\n                        Close the windows gracefully. Close all windows if only -c/--close-all present. Or close one or more\n                        apps if arguments provided, which supports \u003cwindow_id\u003e, \u003cpid\u003e, \u003capp_name\u003e or \u003ctitle_name\u003e exactly the\n                        same as -x. For example: `xsm -c gedit 23475 0x03e00004`\n  -im, --including-apps-with-multiple-windows\n                        Close the windows gracefully including apps with multiple windows\n  -r [RESTORE], --restore [RESTORE]\n                        Restore a session gracefully. Restore the default session if not specified a session name.\n  -ri RESTORING_INTERVAL, --restoring-interval RESTORING_INTERVAL\n                        Specify the interval between restoring applications, in seconds. The default is 2 seconds.\n  -pr [PR]              Pop up a dialog to ask user whether to restore a X session.\n  -l, --list            List the sessions.\n  -t [DETAIL], --detail [DETAIL]\n                        Check out the details of a session.\n  -x EXCLUDE [EXCLUDE ...], --exclude EXCLUDE [EXCLUDE ...]\n                        Exclude apps from the operation according to \u003cwindow_id\u003e, \u003cpid\u003e, \u003capp_name\u003e or \u003ctitle_name\u003e. Require\n                        at least one value\n  -i INCLUDE [INCLUDE ...], --include INCLUDE [INCLUDE ...]\n                        Include apps from the operation according to \u003cwindow_id\u003e, \u003cpid\u003e, \u003capp_name\u003e or \u003ctitle_name\u003e. Require\n                        at least one value\n  -ma [MOVE_AUTOMATICALLY], --move-automatically [MOVE_AUTOMATICALLY]\n                        Auto move windows to specified workspaces according to a saved session. The default session is\n                        `xsession-default`\n  --version             show program's version number and exit\n  -v, --verbose         Print debugging information\n  -vv                   Print more debugging information, could contain sensitive info\n\n```\n\n## If you want to restore the previous X session automatically after login\nHere is a solution. If you are using Fedora, create a file named ```auto-restore-working-state.desktop``` and the ```Exec``` should be:\n```bash\nxsm -pr\n```\nThen put this file into ```~/.config/autostart```.\n\nFor example:\n```\n[Desktop Entry]\nName=Auto Restore saved X Windows\nComment=\nIcon=\nExec=xsm -pr\nTerminal=false\nType=Application\nX-GNOME-Autostart-Delay=20\n```\n\n***NOTE: You can also use ```xsession-manager``` instead of ```xsm```.***\n\n## Todo:\n[TODO](https://github.com/nlpsuge/xsession-manager/blob/master/TODO.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnlpsuge%2Fxsession-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnlpsuge%2Fxsession-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnlpsuge%2Fxsession-manager/lists"}