{"id":18434676,"url":"https://github.com/schneegans/gnome-shell-pod","last_synced_at":"2025-05-07T15:21:38.052Z","repository":{"id":43353631,"uuid":"333200390","full_name":"Schneegans/gnome-shell-pod","owner":"Schneegans","description":":package: A Podman container which runs GNOME Shell in xvfb","archived":false,"fork":false,"pushed_at":"2024-11-06T08:29:39.000Z","size":338,"stargazers_count":52,"open_issues_count":4,"forks_count":12,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-31T11:21:10.577Z","etag":null,"topics":["gnome-shell","podman"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/Schneegans.png","metadata":{"files":{"readme":"README.md","changelog":"changelog.md","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":"2021-01-26T19:55:15.000Z","updated_at":"2025-03-04T16:44:20.000Z","dependencies_parsed_at":"2023-01-31T18:01:44.858Z","dependency_job_id":null,"html_url":"https://github.com/Schneegans/gnome-shell-pod","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Schneegans%2Fgnome-shell-pod","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Schneegans%2Fgnome-shell-pod/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Schneegans%2Fgnome-shell-pod/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Schneegans%2Fgnome-shell-pod/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Schneegans","download_url":"https://codeload.github.com/Schneegans/gnome-shell-pod/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252902728,"owners_count":21822292,"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":["gnome-shell","podman"],"created_at":"2024-11-06T06:04:52.760Z","updated_at":"2025-05-07T15:21:38.032Z","avatar_url":"https://github.com/Schneegans.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 📦 Run GNOME Shell in a Container!\n\n_:information_source: I want to thank [@amezin](https://github.com/amezin) for his awesome contributions, which made it possible to transition the images from Ubuntu to Fedora._\n\n## The Idea\n\nDeveloping high-quality GNOME Shell extensions is challenging due to various reasons.\nOne major issues is the lack of continuous integration possibilities.\nSo I thought: Why not try getting GNOME Shell running on the runners of GitHub Actions?\n\n**Anyway, here is what already works:**\n\n- [x] Multiple containers for various GNOME Shell versions:\n  - [x] [**gnome-shell-pod-32**](https://github.com/Schneegans/gnome-shell-pod/pkgs/container/gnome-shell-pod-32): GNOME Shell 3.36.9 (based on Fedora 32)\n  - [x] [**gnome-shell-pod-33**](https://github.com/Schneegans/gnome-shell-pod/pkgs/container/gnome-shell-pod-33): GNOME Shell 3.38.5 (based on Fedora 33)\n  - [x] [**gnome-shell-pod-34**](https://github.com/Schneegans/gnome-shell-pod/pkgs/container/gnome-shell-pod-34): GNOME Shell 40.9 (based on Fedora 34)\n  - [x] [**gnome-shell-pod-35**](https://github.com/Schneegans/gnome-shell-pod/pkgs/container/gnome-shell-pod-35): GNOME Shell 41.9 (based on Fedora 35)\n  - [x] [**gnome-shell-pod-36**](https://github.com/Schneegans/gnome-shell-pod/pkgs/container/gnome-shell-pod-36): GNOME Shell 42.5 (based on Fedora 36)\n  - [x] [**gnome-shell-pod-37**](https://github.com/Schneegans/gnome-shell-pod/pkgs/container/gnome-shell-pod-37): GNOME Shell 43.2 (based on Fedora 37)\n  - [x] [**gnome-shell-pod-38**](https://github.com/Schneegans/gnome-shell-pod/pkgs/container/gnome-shell-pod-38): GNOME Shell 44.0 (based on Fedora 38)\n  - [x] [**gnome-shell-pod-39**](https://github.com/Schneegans/gnome-shell-pod/pkgs/container/gnome-shell-pod-39): GNOME Shell 45.10 (based on Fedora 39)\n  - [x] [**gnome-shell-pod-40**](https://github.com/Schneegans/gnome-shell-pod/pkgs/container/gnome-shell-pod-40): GNOME Shell 46.6 (based on Fedora 40)\n  - [x] [**gnome-shell-pod-41**](https://github.com/Schneegans/gnome-shell-pod/pkgs/container/gnome-shell-pod-41): GNOME Shell 47.1 (based on Fedora 41)\n  - [x] [**gnome-shell-pod-rawhide**](https://github.com/Schneegans/gnome-shell-pod/pkgs/container/gnome-shell-pod-rawhide): This is based on Fedora Rawhide and rebuilt weekly.\n- [x] Choose display manager:\n  - [x] Wayland\n  - [x] X11\n- [x] You can launch other applications, such as `gnome-control-center`.\n- [x] You can make \"screenshots\" of GNOME Shell and transfer them to host memory.\n- [x] You can install a GNOME Shell extension from host memory and enable it.\n- [x] You can use `xdotool` to interact with the extension.\n- [x] All of this works locally and on the GitHub hosted runners!\n\n## How Does It Work?\n\nA user called \"gnomeshell\" will auto-login via `systemd-logind.service.d` and run `gnome-shell` on `xvfb`.\nThe framebuffer of `xvfb` is mapped to a file which can be copied to host memory and converted to an image.\nThis way we can actually make \"screenshots\" of GNOME Shell!\n\n## How Do I Use It?\n\nI wrote a series of blog posts in order to explain how I use these containers for continuous integration test of my GNOME Shell extensions.\nFor some in-depth examples, you may want to read those:\n\n1. [Bundling the Extension](http://schneegans.github.io/tutorials/2022/02/28/gnome-shell-extensions-ci-01)\n2. [Automated Release Publishing](http://schneegans.github.io/tutorials/2022/03/01/gnome-shell-extensions-ci-02)\n3. [Automated Tests with GitHub Actions](http://schneegans.github.io/tutorials/2022/03/02/gnome-shell-extensions-ci-03)\n\nBelow, you'll find some simple examples to get you started.\nYou will need to install [imagemagick](https://imagemagick.org/index.php) (for converting the xvfb framebuffer image) and, obviously, [Podman](https://podman.io/).\nOn Ubuntu-like distributions you can install them with this command:\n\n```bash\nsudo apt-get install imagemagick podman\n```\n\n### Basic Usage\n\nIf you want to play around with GNOME Shell inside the pod, use these commands:\n\n```bash\n# Run the container in interactive mode. This will automatically login the\n# gnomeshell user.\npodman run --rm --cap-add=SYS_NICE --cap-add=IPC_LOCK --cap-add=CAP_SYS_ADMIN -ti ghcr.io/schneegans/gnome-shell-pod-33\n\n# Start GNOME Shell.\nsystemctl --user start \"gnome-xsession@:99\"\n\n# For example, you can run this command inside the container:\nDISPLAY=:99 gnome-control-center\n```\n\nNow use another terminal on your host to capture and display a screenshot.\n\n```bash\n# Copy the framebuffer of xvfb.\npodman cp $(podman ps -q -n 1):/opt/Xvfb_screen0 .\n\n# Convert it to jpeg.\nconvert xwd:Xvfb_screen0 capture.jpg\n\n# And finally display the image.\n# This way we can see that GNOME Shell is actually up and running!\neog capture.jpg\n```\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"pictures/capture2.jpg\" /\u003e\n\u003c/p\u003e\n\nYou can kill the `gnome-control-center` with \u003ckbd\u003eCtrl\u003c/kbd\u003e+\u003ckbd\u003eC\u003c/kbd\u003e in the container and then poweroff the container with `poweroff`.\n\n### Detached Mode\n\nIn this example we will download some pictures inside the container and make GNOME Shell use one of them as background image.\nThe `gnomeshell` user can run passwordless `sudo`, so you can simply install packages.\n`podman exec --user gnomeshell` can be used to run arbitrary commands inside the running container. However, many commands interacting with GNOME Shell will require a connection to the D-Bus. To make this easier, the images contain a `/local/bin/set-env.sh` script, which sets all required environment variables.\n\n```bash\n# Run the container in detached mode.\nPOD=$(podman run --rm --cap-add=SYS_NICE --cap-add=IPC_LOCK --cap-add=CAP_SYS_ADMIN -td ghcr.io/schneegans/gnome-shell-pod-33)\n\ndo_in_pod() {\n  podman exec --user gnomeshell --workdir /home/gnomeshell \"${POD}\" set-env.sh \"$@\"\n}\n\n# Install the gnome-backgrounds package.\ndo_in_pod sudo dnf -y install gnome-backgrounds\n\n# Set GNOME Shell's background image. This requires a D-Bus connection,\n# so we wrap the command in the set-env.sh script.\ndo_in_pod gsettings set org.gnome.desktop.background picture-uri \\\n          \"file:///usr/share/backgrounds/gnome/adwaita-day.jpg\"\n\n# Wait until the user bus is available.\ndo_in_pod wait-user-bus.sh\n\n# Start GNOME Shell.\ndo_in_pod systemctl --user start \"gnome-xsession@:99\"\n\n# Wait some time until GNOME Shell has been started.\nsleep 3\n\n# Now make a screenshot and show it!\npodman cp ${POD}:/opt/Xvfb_screen0 . \u0026\u0026 \\\n       convert xwd:Xvfb_screen0 capture.jpg \u0026\u0026 \\\n       eog capture.jpg\n\n# Now we can stop the container again.\npodman stop ${POD}\n```\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"pictures/capture5.jpg\" /\u003e\n\u003c/p\u003e\n\n## :octocat: Contributing\n\nCommits should start with a Capital letter and should be written in present tense (e.g. **:tada: Add cool new feature** instead of **:tada: Added cool new feature**).\nYou should also start your commit message with **one** applicable emoji.\nThis does not only look great but also makes you rethink what to add to a commit. Make many but small commits!\n\n| Emoji                                                     | Description                                   |\n| --------------------------------------------------------- | --------------------------------------------- |\n| :tada: `:tada:`                                           | When you added a cool new feature.            |\n| :wrench: `:wrench:`                                       | When you added a piece of code.               |\n| :art: `:art:`                                             | When you improved / added assets like themes. |\n| :rocket: `:rocket:`                                       | When you improved performance.                |\n| :memo: `:memo:`                                           | When you wrote documentation.                 |\n| :beetle: `:beetle:`                                       | When you fixed a bug.                         |\n| :twisted_rightwards_arrows: `:twisted_rightwards_arrows:` | When you merged a branch.                     |\n| :fire: `:fire:`                                           | When you removed something.                   |\n| :truck: `:truck:`                                         | When you moved / renamed something.           |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschneegans%2Fgnome-shell-pod","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fschneegans%2Fgnome-shell-pod","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschneegans%2Fgnome-shell-pod/lists"}