Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/joukewitteveen/xlogin

Automatic X login service for systemd
https://github.com/joukewitteveen/xlogin

display-manager login systemd x11 xorg

Last synced: 3 months ago
JSON representation

Automatic X login service for systemd

Awesome Lists containing this project

README

        

These files make it possible to login to X without a desktop manager.

Installation
============

Several variables are supported by the installation through make:
# make [DESTDIR=] [BASH=]
[SHELL=] [install]

DESTDIR
-------
The DESTDIR path is prepended to each target in the installation, making staged
installs possible. Empty by default.

BASH
----
The path to the Bash executable used by xlogin. Defaults to /usr/bin/bash.

SHELL
-----
The path to the Bash executable used by make. Defaults to the value of BASH.

Usage
=====

To enable automatic login at boot, execute:
# systemctl enable xlogin@

The xlogin service sets up a user session and runs the .xinitrc script of the
user. Several actions are available to the user.

Logout
------
$ loginctl terminate-session "$XDG_SESSION_ID"
or
$ systemctl --user exit

Shutdown
--------
$ systemctl poweroff
If no other users are logged in, this does not require a password.

Reboot
------
$ systemctl reboot
If no other users are logged in, this does not require a password.

Files
=====

Makefile
--------
This makes installation through
# make install
possible.

x-daemon
--------
This script makes starting X as a daemon possible. It is needed by the systemd
service that manages X.

[email protected]
----------
This service governs an X session on a specified VT. It is of little use on its
own.

[email protected]
---------------
This service is responsible for setting up the user session and running the
user's .xinitrc script. The script should not return.

25-xlogin.sh
------------
This script makes sure the systemd user dbus socket is not reused for the
user's X session. Its invocation is guaranteed by having the following on top
of your .xinitrc:

if [ -d /etc/X11/xinit/xinitrc.d ]; then
for f in /etc/X11/xinit/xinitrc.d/*; do
[ -x "$f" ] && . "$f"
done
unset f
fi

As a consequence, systemd commands that interface the user session will no
longer be able to communicate with the systemd instance. To alleviate this
problem, include the following in your .bashrc:

for sd_cmd in systemctl systemd-analyze systemd-run; do
alias $sd_cmd='DBUS_SESSION_BUS_ADDRESS="unix:path=$XDG_RUNTIME_DIR/bus" '$sd_cmd
done