{"id":13440347,"url":"https://github.com/elogind/elogind","last_synced_at":"2026-03-03T19:01:51.016Z","repository":{"id":38631689,"uuid":"73081359","full_name":"elogind/elogind","owner":"elogind","description":"The systemd project's \"logind\", extracted to a standalone package","archived":false,"fork":false,"pushed_at":"2024-04-12T19:12:55.000Z","size":61630,"stargazers_count":293,"open_issues_count":2,"forks_count":44,"subscribers_count":18,"default_branch":"main","last_synced_at":"2024-04-12T22:47:27.052Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elogind.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.GPL2","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}},"created_at":"2016-11-07T13:33:54.000Z","updated_at":"2024-04-15T11:39:35.640Z","dependencies_parsed_at":"2023-02-16T06:01:08.706Z","dependency_job_id":"7944b1d2-b45a-4134-a7f2-577bfa03f6b8","html_url":"https://github.com/elogind/elogind","commit_stats":{"total_commits":31060,"total_committers":1215,"mean_commits":25.56378600823045,"dds":0.649935608499678,"last_synced_commit":"0e5d55cb2e2679e3bb009c8c69e5174994f78757"},"previous_names":[],"tags_count":251,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elogind%2Felogind","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elogind%2Felogind/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elogind%2Felogind/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elogind%2Felogind/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elogind","download_url":"https://codeload.github.com/elogind/elogind/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244586018,"owners_count":20476860,"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":[],"created_at":"2024-07-31T03:01:21.913Z","updated_at":"2025-10-21T03:50:12.954Z","avatar_url":"https://github.com/elogind.png","language":"C","funding_links":["https://www.buymeacoffee.com/EdenWorX"],"categories":["C","systemd-logind (Session Manager)"],"sub_categories":[],"readme":"Elogind User, Seat and Session Manager\n\nIntroduction\n============\n\nElogind is the systemd project's \"logind\", extracted out to be a\nstandalone daemon.  It integrates with PAM to know the set of users\nthat are logged in to a system and whether they are logged in\ngraphically, on the console, or remotely.  Elogind exposes this\ninformation via the standard org.freedesktop.login1 D-Bus interface,\nas well as through the file system using systemd's standard\n/run/systemd layout.  Elogind also provides \"libelogind\", which is a\nsubset of the facilities offered by \"libsystemd\".  There is a\n\"libelogind.pc\" pkg-config file as well.\n\nAll of the credit for elogind should go to the systemd developers.  \nFor more on systemd, see  \n  http://www.freedesktop.org/wiki/Software/systemd  \nAll of the blame should go to Andy Wingo, who extracted elogind\nfrom systemd.  \nAll complaints should go to Sven Eden, who is maintaining elogind.\nBut you could also [Buy Him A Coffee](https://www.buymeacoffee.com/EdenWorX)\ninstead if you like elogind and want to say thanks.\n\nBuild Status\n------------\n* CI Status main       : [![elogind CI Status main](https://github.com/elogind/elogind/actions/workflows/build.yml/badge.svg?branch=main)](https://github.com/elogind/elogind/actions)\n* CI Status v252-stable: [![elogind CI Status v252-stable](https://github.com/elogind/elogind/actions/workflows/build.yml/badge.svg?branch=v252-stable)](https://github.com/elogind/elogind/actions)\n* CI Status v255-stable: [![elogind CI Status v255-stable](https://github.com/elogind/elogind/actions/workflows/build.yml/badge.svg?branch=v255-stable)](https://github.com/elogind/elogind/actions)\n* CI Status v257-stable: [![elogind CI Status v257-stable](https://github.com/elogind/elogind/actions/workflows/build.yml/badge.svg?branch=v257-stable)](https://github.com/elogind/elogind/actions)\n\nContributing\n============\n\nElogind was branched from systemd version 219, and preserves the git\nhistory of the systemd project.  The version of elogind is the\nupstream systemd version, followed by the patchlevel of elogind.  For\nexample version 219.12 is the twelfth elogind release, which aims to\nprovide a subset of the interfaces of systemd 219.\n\nTo contribute to elogind, fork the current source code from github:  \n  https://github.com/elogind/elogind  \nSend a pull request for the changes you like.\n\nIf you do not have a github account, the elogind wiki page at  \n  https://github.com/elogind/elogind/wiki\nlists further possibilities to contact the maintainers.\n\nTo chat about elogind:\n  #elogind on Libera.Chat\n\nBug reports should go to:\n  https://github.com/elogind/elogind/issues\n\nWhy bother?\n===========\n\nElogind has been developed for use in Guix System, the OS distribution of\nGNU Guix.  See http://gnu.org/s/guix for more on Guix.  Guix System uses a\nspecific init manager (GNU Shepherd), for reasons that are not relevant\nhere, but still aims to eventually be a full-featured distribution that\ncan run GNOME and other desktop environments.  However, to run GNOME\nthese days means that you need to have support for the login1 D-Bus\ninterface, which is currently only provided by systemd.  That is the\norigin of this project: to take the excellent logind functionality\nfrom systemd and provide it as a standalone package.\n\nYou're welcome to use elogind for whatever purpose you like --\nas-is, or as a jumping-off point for other things -- but please don't\nuse it as part of some anti-systemd vendetta. We are appreciative of\nthe systemd developers logind effort and think that everyone deserves\nto run it if they like. No matter what kind of PID1 they use.\n\nDifferences relative to systemd\n===============================\n\nThe pkg-config file is called libelogind, not libsystemd or\nlibsystemd-logind.\n\nThe headers are in `\u003celogind/...\u003e`, like `\u003celogind/sd-login.h\u003e`\ninstead of `\u003csystemd/sd-login.h\u003e`.  \nTo make it easier for projects to add support for elogind, there is a\nsubfolder \"systemd\" in the elogind include directory. So if\n`pkg-config` is used to get the cflags, including\n`\u003csystemd/sd-login.h\u003e` will still work.\n\nLibelogind just implements login-related functionality.  It also\nprovides the sd-bus API.\n\nUnlike systemd, whose logind arranges to manage resources for user\nsessions via RPC calls to systemd, in elogind there is no systemd so\nthere is no global cgroup-based resource management.  This has a few\nimplications:\n\n  * Elogind does not create \"slices\" for users.  Elogind will not\n    record that users are associated with slices.\n  * The /run/systemd/slices directory will always be empty.\n  * Elogind does not have the concept of a \"scope\", internally, as\n    it's the same as a session. Any API that refers to scopes will\n    always return an error code.\n\nOn the other hand, elogind does use a similar strategy to systemd in\nthat it places processes in a private cgroup for organizational\npurposes, without installing any controllers (see\nhttp://0pointer.de/blog/projects/cgroups-vs-cgroups.html).  This\nallows elogind to map arbitrary processes to sessions, even if the\nprocess does the usual double-fork to be reparented to PID 1.\n\nElogind does not manage virtual terminals.\n\nElogind does monitor power button and the lid switch, like systemd,\nbut instead of doing RPC to systemd to suspend, poweroff, or restart\nthe machine, elogind just does this directly.  For suspend, hibernate,\nand hybrid-sleep, elogind uses the same code as systemd-sleep.\nInstead of using a separate sleep.conf file to configure the sleep\nbehavior, this is included in the [Sleep] section of\n`/etc/elogind/login.conf`. See the example `login.conf` for more.  \nFor shutdown, reboot, and kexec, elogind shells out to `halt`,\n`reboot` and `kexec` binaries.\n\nThe loginctl command has the `poweroff`, `reboot`, `suspend`,\n`hibernate`, `hybrid-sleep` and `suspend-then-hibernate` commands\nfrom systemd, as well as the `--ignore-inhibitors` flag.\n\nThe PAM module is called `pam_elogind.so`, not `pam_systemd.so`.\n\nElogind and the running cgroup controller\n=========================================\nWhile `meson` runs, it will detect which controller is in place.\nIf no controller is in place, configure will determine, that elogind\nshould be its own controller, which will be a very limited one.\n\nThis approach should generally work, but if you just have no cgroup\ncontroller in place, yet, or if you are currently switching to\nanother one, this approach will fail.\n\nIn this case you can do one of the two following things:\n\n 1) Boot your system with the target init system and cgroup\n    controller, before configuring and building elogind, or\n 2) Use the `--with-cgroup-controller=name` option.\n\nExample: If you plan to use openrc, but openrc has not yet booted\n         the machine, you can use  \n         `--with-cgroup-controller=openrc`  \n         to let elogind know that openrc will be the controller\n         in charge.\n\nHowever, if you set the controller at configure time to something\ndifferent than what is in place, elogind will not start until that\ncontroller is actively used as the primary controller.\n\nABI compatibility with libsystemd\n=================================\n\nBasically all symbols are included. But any API calls that require to\ncall systemd, or need internal knowledge of systemd, are simple stubs.\nThey are there to provide ABI compatibility, but will not work.\n\nOne exception is `sd_is_mq()` that is found in sd-daemon.h. This is the\nonly place using POSIX message queues, which would add further\ndependencies. As those would be completely unused in the rest of\nelogind, this function is also a stub, and always returns -ENOSYS.\n\nLicense\n=======\n\nLGPLv2.1+ for all code\n  - except `src/basic/MurmurHash2.c` which is Public Domain\n  - except `src/basic/siphash24.c` which is CC0 Public Domain\n\nDependencies\n============\n\n  * glibc \u003e= 2.19 (*or* musl-libc \u003e= 1.1.20)\n  * libcap\n  * libudev\n  * PAM \u003e= 1.7.0 (optional)\n  * libacl (optional)\n  * libselinux (optional)\n  * libaudit (optional)\n  * pkg-config\n  * gperf \u003e= 3.1\n  * docbook-xsl (optional, required for documentation)\n  * xsltproc    (optional, required for documentation)\n  * python-lxml (optional, required to build the indices)\n  * python, meson, ninja\n  * gcc, awk, sed, grep, m4, and similar tools\n\nDuring runtime, you need the following additional dependencies:\n---------------------------------------------------------------\n  * util-linux \u003e= v2.27.1 required\n  * dbus \u003e= 1.9.14 (strictly speaking optional, but recommended)  \n    NOTE: If using dbus \u003c 1.9.18, you should override the default  \n          policy directory (--with-dbuspolicydir=/etc/dbus-1/system.d).\n  * PolicyKit (optional)\n\nTo build in directory build/:  \n    `meson build/ \u0026\u0026 ninja -C build`\n\nIf you plan to use a build directory outside the source tree, make sure that\nit is not too '_far away_'. To detect broken setups, some compiler magic is\nincluded to check whether the relative path to the sources is shorter than the\nabsolute path to each source file.\nSo if you get an error like `error: size of array 'x' is negative` when the\nmacro `assert_cc(STRLEN(FILE) \u003e STRLEN(RELATIVE_SOURCE_PATH) + 1);` is\nexpanded, put your build directory nearer to the source tree.\n\nAny configuration options can be specified as -Darg=value... arguments\nto meson. After the build directory is initially configured, the configuration\ncan be changed with:  \n    `meson configure -Darg=value... build/`  \n`meson configure` without any arguments will print out available options and\ntheir current values.\n\nUseful commands:  \n----------------\n  * `ninja -v some/target`\n  * `ninja test`\n  * `sudo ninja install`\n  * `DESTDIR=... ninja install`\n  * `make DEBUG=YES`  \n    The Makefile is a full convenience wrapper, that allows to use meson/ninja in  \n    Makefile compatible IDEs like CLion or vscode.\n    Note: For maximum control you should use meson/ninja directly instead.  \n\nA tarball can be created with:  \n  `git archive --format=tar --prefix=elogind-241/ v241 | xz \u003e elogind-241.tar.xz`\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felogind%2Felogind","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felogind%2Felogind","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felogind%2Felogind/lists"}