turnstile en vez de elogind
turnstile solo crea XDG_RUNTIME_DIR (backend none, sin exportar el bus de D-Bus, que lo abre .xinitrc). Xorg ya arranca como root con Xorg.wrap y la tapa y los botones los lleva acpid, así que elogind sobraba. Fuera su logind.conf.d. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01C5v1qWDwgkaVM5kjVHGGh8
This commit is contained in:
parent
9f3863ac33
commit
1f4a6a8803
6 changed files with 82 additions and 42 deletions
40
README-en.md
40
README-en.md
|
|
@ -16,7 +16,7 @@ real names you type; this README explains what each one does.
|
||||||
|---|---|
|
|---|---|
|
||||||
| `suckless/` | The programs, each with its own `config.h` and patches |
|
| `suckless/` | The programs, each with its own `config.h` and patches |
|
||||||
| `home/` | Files that go in `~`, at the same path (they are symlinked) |
|
| `home/` | Files that go in `~`, at the same path (they are symlinked) |
|
||||||
| `sistema/` | Files that go in `/` (acpid, zzz, elogind, udev, doas, xbps, runit) |
|
| `sistema/` | Files that go in `/` (acpid, zzz, turnstile, udev, doas, xbps, runit) |
|
||||||
| `install.sh` | Installs everything on a fresh Void system |
|
| `install.sh` | Installs everything on a fresh Void system |
|
||||||
|
|
||||||
## Install
|
## Install
|
||||||
|
|
@ -52,27 +52,45 @@ for example) and repeated safely:
|
||||||
does nothing.
|
does nothing.
|
||||||
6. `sistema` (system): copies `sistema/` into `/`, sets up
|
6. `sistema` (system): copies `sistema/` into `/`, sets up
|
||||||
`wpa_supplicant.conf` so wheel users can use `wpa_cli` without root and
|
`wpa_supplicant.conf` so wheel users can use `wpa_cli` without root and
|
||||||
save networks, enables the runit services (dbus, elogind, wpa_supplicant,
|
save networks, enables the runit services (dbus, turnstiled,
|
||||||
dhcpcd, bluetoothd, acpid, chronyd, tlp, automontaje, cupsd), removes
|
wpa_supplicant, dhcpcd, bluetoothd, acpid, chronyd, tlp, automontaje,
|
||||||
NetworkManager and polkitd (if something asks for polkit, like udisks2 or
|
cupsd), removes NetworkManager, elogind and polkitd (if something asks for
|
||||||
libvirt, D-Bus starts it on its own) and adds the user to the audio,
|
polkit, like udisks2 or libvirt, D-Bus starts it on its own) and adds the
|
||||||
video, input, network, bluetooth, lpadmin (printer management) and
|
user to the audio, video, input, network, bluetooth, lpadmin (printer
|
||||||
`_pipewire` (realtime priority for audio without rtkit) groups. `doas.conf`
|
management) and `_pipewire` (realtime priority for audio without rtkit)
|
||||||
is checked with `doas -C` before it is installed with mode 400.
|
groups. `doas.conf` is checked with `doas -C` before it is installed with
|
||||||
|
mode 400.
|
||||||
7. `quitar` (remove): uninstalls what the repo no longer uses because
|
7. `quitar` (remove): uninstalls what the repo no longer uses because
|
||||||
something else replaces it: sudo (doas), feh (xwallpaper and nsxiv),
|
something else replaces it: sudo (doas), feh (xwallpaper and nsxiv),
|
||||||
gammastep (sct), autorandr (`pantallas`), blueman and pavucontrol (the
|
gammastep (sct), autorandr (`pantallas`), blueman and pavucontrol (the
|
||||||
`bluetooth` and `volumen` scripts), pinentry-gtk (pinentry-dmenu), vlc
|
`bluetooth` and `volumen` scripts), pinentry-gtk (pinentry-dmenu), vlc
|
||||||
(mpv), btop, NetworkManager and tlp-rdw (wpa_supplicant, dhcpcd and the
|
(mpv), btop, NetworkManager and tlp-rdw (wpa_supplicant, dhcpcd and the
|
||||||
`wifi` script) and rtkit. sudo can be removed thanks to
|
`wifi` script), rtkit and elogind (turnstile). sudo can be removed thanks
|
||||||
`sistema/etc/xbps.d/sin-sudo.conf` (base-system depends on it), and it is
|
to `sistema/etc/xbps.d/sin-sudo.conf` (base-system depends on it), and it
|
||||||
only removed once `/etc/doas.conf` is installed.
|
is only removed once `/etc/doas.conf` is installed.
|
||||||
|
|
||||||
Afterwards, log out and back in (for the groups) and run `startx`.
|
Afterwards, log out and back in (for the groups) and run `startx`.
|
||||||
|
|
||||||
Nix is not installed: the little that comes from it (webcord) is installed by
|
Nix is not installed: the little that comes from it (webcord) is installed by
|
||||||
hand.
|
hand.
|
||||||
|
|
||||||
|
## Without elogind
|
||||||
|
|
||||||
|
elogind is systemd's logind on its own, and it is not needed here:
|
||||||
|
|
||||||
|
- `XDG_RUNTIME_DIR` (`/run/user/UID`) is created by turnstile at login
|
||||||
|
(`sistema/etc/turnstile/turnstiled.conf`: only that, no user services).
|
||||||
|
- Xorg runs as root through `Xorg.wrap` (`needs_root_rights = yes` in
|
||||||
|
`/etc/X11/Xwrapper.config`, shipped by Void).
|
||||||
|
- The lid and the power and suspend buttons are handled by acpid, which
|
||||||
|
calls `zzz`. Power off and reboot are runit's.
|
||||||
|
- Devices (sound, video, input, bluetooth) are reached through the user's
|
||||||
|
groups, not through the ACLs elogind gave the active session.
|
||||||
|
|
||||||
|
What stops working: mounting disks from a file manager (udisks2 asks polkit
|
||||||
|
for an active session, and there is none). USB sticks are mounted by
|
||||||
|
`automontaje`.
|
||||||
|
|
||||||
## Rebuilding after changing the config
|
## Rebuilding after changing the config
|
||||||
|
|
||||||
cd suckless/dwm && make && doas make install
|
cd suckless/dwm && make && doas make install
|
||||||
|
|
|
||||||
43
README.md
43
README.md
|
|
@ -12,7 +12,7 @@ Tema Everforest y fuente Fira Code en todos.
|
||||||
|---|---|
|
|---|---|
|
||||||
| `suckless/` | Los programas, cada uno con su `config.h` y sus parches |
|
| `suckless/` | Los programas, cada uno con su `config.h` y sus parches |
|
||||||
| `home/` | Archivos que van en `~`, con la misma ruta (se enlazan) |
|
| `home/` | Archivos que van en `~`, con la misma ruta (se enlazan) |
|
||||||
| `sistema/` | Archivos que van en `/` (acpid, zzz, elogind, udev, doas, xbps, runit) |
|
| `sistema/` | Archivos que van en `/` (acpid, zzz, turnstile, udev, doas, xbps, runit) |
|
||||||
| `install.sh` | Lo instala todo en un Void recién instalado |
|
| `install.sh` | Lo instala todo en un Void recién instalado |
|
||||||
|
|
||||||
## Instalar
|
## Instalar
|
||||||
|
|
@ -47,28 +47,47 @@ Hace siete pasos, que también se pueden lanzar por separado
|
||||||
subclaves de autenticación y hace que recuerde la contraseña una hora.
|
subclaves de autenticación y hace que recuerde la contraseña una hora.
|
||||||
`.bashrc` ya apunta `SSH_AUTH_SOCK` al agente. Si `~/.gnupg` no existe
|
`.bashrc` ya apunta `SSH_AUTH_SOCK` al agente. Si `~/.gnupg` no existe
|
||||||
todavía, no hace nada.
|
todavía, no hace nada.
|
||||||
6. `sistema`: copia `sistema/` en `/`, prepara `wpa_supplicant.conf` para
|
6. `sistema`: copia `sistema/` en `/`, prepara `wpa_supplicant.conf` para que
|
||||||
que los de wheel usen `wpa_cli` sin root y guarden redes, activa los
|
los de wheel usen `wpa_cli` sin root y guarden redes, activa los servicios
|
||||||
servicios de runit (dbus, elogind, wpa_supplicant, dhcpcd, bluetoothd,
|
de runit (dbus, turnstiled, wpa_supplicant, dhcpcd, bluetoothd, acpid,
|
||||||
acpid, chronyd, tlp, automontaje, cupsd), quita NetworkManager y polkitd
|
chronyd, tlp, automontaje, cupsd), quita NetworkManager, elogind y polkitd
|
||||||
(si algo pide polkit, como udisks2 o libvirt, D-Bus lo arranca solo) y
|
(si algo pide polkit, como udisks2 o libvirt, D-Bus lo arranca solo) y
|
||||||
añade el usuario a los grupos audio, video, input, network, bluetooth,
|
añade el usuario a los grupos audio, video, input, network, bluetooth,
|
||||||
lpadmin (para gestionar impresoras) y `_pipewire` (prioridad de tiempo
|
lpadmin (para gestionar impresoras) y `_pipewire` (prioridad de tiempo real
|
||||||
real para el audio sin rtkit). `doas.conf` se
|
para el audio sin rtkit). `doas.conf` se valida con `doas -C` antes de
|
||||||
valida con `doas -C` antes de instalarlo con modo 400.
|
instalarlo con modo 400.
|
||||||
7. `quitar`: desinstala lo que el repo ya no usa porque lo sustituye otra
|
7. `quitar`: desinstala lo que el repo ya no usa porque lo sustituye otra
|
||||||
cosa: sudo (doas), feh (xwallpaper y nsxiv), gammastep (sct), autorandr
|
cosa: sudo (doas), feh (xwallpaper y nsxiv), gammastep (sct), autorandr
|
||||||
(`pantallas`), blueman y pavucontrol (scripts `bluetooth` y `volumen`),
|
(`pantallas`), blueman y pavucontrol (scripts `bluetooth` y `volumen`),
|
||||||
pinentry-gtk (pinentry-dmenu), vlc (mpv), btop, NetworkManager y
|
pinentry-gtk (pinentry-dmenu), vlc (mpv), btop, NetworkManager y tlp-rdw
|
||||||
tlp-rdw (wpa_supplicant, dhcpcd y el script `wifi`) y rtkit. sudo se puede quitar
|
(wpa_supplicant, dhcpcd y el script `wifi`), rtkit y elogind (turnstile).
|
||||||
gracias a `sistema/etc/xbps.d/sin-sudo.conf` (base-system depende de
|
sudo se puede quitar gracias a `sistema/etc/xbps.d/sin-sudo.conf`
|
||||||
él), y solo se quita si `/etc/doas.conf` ya está instalado.
|
(base-system depende de él), y solo se quita si `/etc/doas.conf` ya está
|
||||||
|
instalado.
|
||||||
|
|
||||||
Después hay que cerrar sesión y volver a entrar (por los grupos) y lanzar
|
Después hay que cerrar sesión y volver a entrar (por los grupos) y lanzar
|
||||||
`startx`.
|
`startx`.
|
||||||
|
|
||||||
Nix no se instala: lo poco que viene de ahí (webcord) se instala a mano.
|
Nix no se instala: lo poco que viene de ahí (webcord) se instala a mano.
|
||||||
|
|
||||||
|
## Sin elogind
|
||||||
|
|
||||||
|
elogind es el logind de systemd por separado, y aquí sobra:
|
||||||
|
|
||||||
|
- `XDG_RUNTIME_DIR` (`/run/user/UID`) lo crea turnstile al entrar
|
||||||
|
(`sistema/etc/turnstile/turnstiled.conf`: solo eso, sin servicios de
|
||||||
|
usuario).
|
||||||
|
- Xorg arranca como root con `Xorg.wrap` (`needs_root_rights = yes` en
|
||||||
|
`/etc/X11/Xwrapper.config`, lo trae Void).
|
||||||
|
- La tapa y los botones de encendido y suspender los lleva acpid, que llama a
|
||||||
|
`zzz`. Apagar y reiniciar son los de runit.
|
||||||
|
- Los dispositivos (sonido, vídeo, entrada, bluetooth) van por los grupos del
|
||||||
|
usuario, no por las ACL que ponía elogind a la sesión activa.
|
||||||
|
|
||||||
|
Lo que deja de ir: montar discos desde un gestor de archivos (udisks2 pide a
|
||||||
|
polkit una sesión activa, que ya no hay). Las memorias USB las monta
|
||||||
|
`automontaje`.
|
||||||
|
|
||||||
## Recompilar tras cambiar la configuración
|
## Recompilar tras cambiar la configuración
|
||||||
|
|
||||||
cd suckless/dwm && make && doas make install
|
cd suckless/dwm && make && doas make install
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# elogind ya crea XDG_RUNTIME_DIR (/run/user/UID); esto es solo por si falta.
|
# turnstile ya crea XDG_RUNTIME_DIR (/run/user/UID); esto es solo por si falta.
|
||||||
if [ -z "$XDG_RUNTIME_DIR" ]; then
|
if [ -z "$XDG_RUNTIME_DIR" ]; then
|
||||||
export XDG_RUNTIME_DIR=/tmp/$(id -u)-runtime-dir
|
export XDG_RUNTIME_DIR=/tmp/$(id -u)-runtime-dir
|
||||||
mkdir -p "$XDG_RUNTIME_DIR"
|
mkdir -p "$XDG_RUNTIME_DIR"
|
||||||
|
|
|
||||||
21
install.sh
21
install.sh
|
|
@ -17,7 +17,7 @@ PAQUETES="
|
||||||
libXfixes-devel libxcb-devel freetype-devel fontconfig-devel harfbuzz-devel
|
libXfixes-devel libxcb-devel freetype-devel fontconfig-devel harfbuzz-devel
|
||||||
libXrender-devel xorgproto imlib2-devel zlib-devel libxcrypt-devel
|
libXrender-devel xorgproto imlib2-devel zlib-devel libxcrypt-devel
|
||||||
|
|
||||||
xorg xinit setxkbmap xrandr dbus elogind
|
xorg xinit setxkbmap xrandr dbus turnstile
|
||||||
picom dunst libnotify xwallpaper nsxiv maim xclip sct xss-lock
|
picom dunst libnotify xwallpaper nsxiv maim xclip sct xss-lock
|
||||||
pipewire wireplumber libspa-bluetooth alsa-pipewire
|
pipewire wireplumber libspa-bluetooth alsa-pipewire
|
||||||
wpa_supplicant dhcpcd bluez acpid chrony tlp
|
wpa_supplicant dhcpcd bluez acpid chrony tlp
|
||||||
|
|
@ -34,21 +34,23 @@ SUCKLESS="dwm st dmenu slstatus slock scroll clipmenu"
|
||||||
# Tema GTK Everforest, en una versión fija para que siempre salga igual
|
# Tema GTK Everforest, en una versión fija para que siempre salga igual
|
||||||
GTK_TEMA_REPO=https://github.com/Fausto-Korpsvart/Everforest-GTK-Theme
|
GTK_TEMA_REPO=https://github.com/Fausto-Korpsvart/Everforest-GTK-Theme
|
||||||
GTK_TEMA_COMMIT=9b8be4d6648ae9eaae3dd550105081f8c9054825
|
GTK_TEMA_COMMIT=9b8be4d6648ae9eaae3dd550105081f8c9054825
|
||||||
SERVICIOS="dbus elogind wpa_supplicant dhcpcd bluetoothd acpid chronyd tlp automontaje cupsd"
|
SERVICIOS="dbus turnstiled wpa_supplicant dhcpcd bluetoothd acpid chronyd tlp automontaje cupsd"
|
||||||
# La red la llevan wpa_supplicant y dhcpcd. polkitd no hace falta como
|
# La red la llevan wpa_supplicant y dhcpcd. polkitd no hace falta como
|
||||||
# servicio: si algo lo pide (udisks2, libvirt), D-Bus lo arranca.
|
# servicio: si algo lo pide (udisks2, libvirt), D-Bus lo arranca. turnstiled
|
||||||
SERVICIOS_FUERA="NetworkManager polkitd"
|
# sustituye a elogind.
|
||||||
|
SERVICIOS_FUERA="NetworkManager polkitd elogind"
|
||||||
# _pipewire da prioridad de tiempo real al audio sin rtkit
|
# _pipewire da prioridad de tiempo real al audio sin rtkit
|
||||||
# (/etc/security/limits.d/25-pw-rlimits.conf, de pipewire).
|
# (/etc/security/limits.d/25-pw-rlimits.conf, de pipewire).
|
||||||
GRUPOS="audio video input network bluetooth lpadmin _pipewire"
|
GRUPOS="audio video input network bluetooth lpadmin _pipewire"
|
||||||
# Lo que sustituyen otras cosas del repo: sudo (doas), feh (xwallpaper y
|
# Lo que sustituyen otras cosas del repo: sudo (doas), feh (xwallpaper y
|
||||||
# nsxiv), gammastep (sct), autorandr (pantallas), blueman y pavucontrol
|
# nsxiv), gammastep (sct), autorandr (pantallas), blueman y pavucontrol
|
||||||
# (scripts bluetooth y volumen), pinentry-gtk (pinentry-dmenu), vlc (mpv),
|
# (scripts bluetooth y volumen), pinentry-gtk (pinentry-dmenu), vlc (mpv),
|
||||||
# NetworkManager (wpa_supplicant, dhcpcd y el script wifi) y rtkit (el grupo
|
# NetworkManager (wpa_supplicant, dhcpcd y el script wifi), rtkit (el grupo
|
||||||
# _pipewire).
|
# _pipewire) y elogind (turnstile; Xorg arranca como root con Xorg.wrap y la
|
||||||
|
# tapa y los botones ya los lleva acpid).
|
||||||
QUITAR="
|
QUITAR="
|
||||||
sudo feh gammastep autorandr blueman pavucontrol pinentry-gtk
|
sudo feh gammastep autorandr blueman pavucontrol pinentry-gtk
|
||||||
gtk-engine-murrine vlc btop NetworkManager tlp-rdw rtkit
|
gtk-engine-murrine vlc btop NetworkManager tlp-rdw rtkit elogind
|
||||||
"
|
"
|
||||||
|
|
||||||
msg() { printf '\033[1;32m==>\033[0m %s\n' "$*"; }
|
msg() { printf '\033[1;32m==>\033[0m %s\n' "$*"; }
|
||||||
|
|
@ -249,6 +251,11 @@ quitar() {
|
||||||
msg "Quitando:$fuera"
|
msg "Quitando:$fuera"
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
root xbps-remove -Ry $fuera
|
root xbps-remove -Ry $fuera
|
||||||
|
|
||||||
|
# Lo que puso aquí una versión anterior de sistema/ para elogind
|
||||||
|
if [ -e /etc/elogind/logind.conf.d/10-acpid.conf ]; then
|
||||||
|
root rm /etc/elogind/logind.conf.d/10-acpid.conf
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
[ -f /etc/void-release ] || command -v xbps-install >/dev/null ||
|
[ -f /etc/void-release ] || command -v xbps-install >/dev/null ||
|
||||||
|
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
# acpid ya se encarga de la tapa y del botón de suspender (llama a zzz) y del
|
|
||||||
# botón de encendido. Si elogind también reacciona, el portátil se suspende
|
|
||||||
# dos veces: al abrir la tapa se enciende, se vuelve a suspender y luego
|
|
||||||
# arranca. Así solo lo gestiona acpid.
|
|
||||||
[Login]
|
|
||||||
HandlePowerKey=ignore
|
|
||||||
HandleSuspendKey=ignore
|
|
||||||
HandleHibernateKey=ignore
|
|
||||||
HandleLidSwitch=ignore
|
|
||||||
HandleLidSwitchExternalPower=ignore
|
|
||||||
HandleLidSwitchDocked=ignore
|
|
||||||
7
sistema/etc/turnstile/turnstiled.conf
Normal file
7
sistema/etc/turnstile/turnstiled.conf
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
# turnstile en vez de elogind, solo para crear /run/user/UID
|
||||||
|
# (XDG_RUNTIME_DIR) al entrar. Sin gestor de servicios de usuario: lo de la
|
||||||
|
# sesión lo arranca .xinitrc. Tampoco exporta DBUS_SESSION_BUS_ADDRESS,
|
||||||
|
# porque el bus lo abre .xinitrc con dbus-run-session.
|
||||||
|
backend = none
|
||||||
|
manage_rundir = yes
|
||||||
|
export_dbus_address = no
|
||||||
Loading…
Add table
Add a link
Reference in a new issue