In this episode:
- urlwatch for new daily Ubuntu Server ISO
- systemd-run ephemeral timers as replacement for at
- Mozillateam Firefox on Debian
- systemd service: ExecStartPre as root
- gdm3 autosuspend/shutdown behaviour
urlwatch for new daily Ubuntu Server ISO
Somewhat desparate because at the time of starting this post, the (pre-beta, non-LTS, not blaming anyone) server image in question was badly broken.
---
name: Ubuntu Server Daily ISO
url: https://cdimage.ubuntu.com/ubuntu-server/daily-live/current/SHA256SUMS
filter:
- grep: .*-live-server-amd64.iso
---
systemd-run ephemeral timers as replacement for at
Goes great with “hardened” systems that deny use of at(1)
.
Run a command 60 seconds from now, via the user’s private systemd (after logout only if session lingering is enabled).
systemd-run --user --on-active=60s -- logger --tag foo "Hello world"
Run a command 2 minutes from now, privileged or as a specific user via the global systemd:
sudo systemd-run --uid="${LOGNAME}" --on-active=2m -- touch /tmp/hello
Insights
systemctl --user list-timers
journalctl --user -u 'run-*.timer'
sudo systemctl list-timers
sudo journalctl -u 'run-*.timer'
Mozillateam Firefox on Debian
$ sudo tee /etc/apt/sources.list.d/mozillateam-ppa.list <<Here
deb https://ppa.launchpadcontent.net/mozillateam/ppa/ubuntu jammy main
deb-src https://ppa.launchpadcontent.net/mozillateam/ppa/ubuntu jammy main
Here
$ sudo tee /etc/apt/trusted.gpg.d/mozillateam.asc < <(curl 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x0ab215679c571d1c8325275b9bdb3d89ce49ec21')
systemd service: ExecStartPre as root
[Service]
...
User=nonroot
Group=nonroot
ExecStartPre=+install -d /var/lib/theservice -o nonroot -g nonroot
ExecStart=/usr/sbin/theservice
See systemd.service, “special executable prefixes”.
gdm3 autosuspend/shutdown behaviour
Debian:
$ sudo apt-get install dbus-x11
$ sudo chsh -s /bin/bash Debian-gdm
$ sudo -i -u Debian-gdm
$ gsettings get org.gnome.settings-daemon.plugins.power sleep-inactive-ac-type
'suspend'
$ dbus-launch gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-type nothing
$ gsettings get org.gnome.settings-daemon.plugins.power sleep-inactive-ac-type
$ exit
$ sudo chsh -s /bin/false Debian-gdm
Arch/Garuda:
$ sudo chsh -s /bin/bash gdm
$ gsettings get org.gnome.settings-daemon.plugins.power sleep-inactive-ac-type
'suspend'
$ dbus-launch gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-type nothing
$ gsettings get org.gnome.settings-daemon.plugins.power sleep-inactive-ac-type
$ exit
$ sudo chsh -s /usr/bin/nologin gdm
i would recommend not to use trusted.gpg any longer. it’s officially deprecated (security concerns, all keys will be tried for all repos until one succeeds). you should put keys somewhere else (e.g. /usr/share/keyrings/) and use `deb [signed-by:/path/to/repokey.gpg] …` in the list files.