Skip to content

Blog

Snatch your half-crashed desktop session from gnome-session-failed's claws

If the system[0] thinks that something went horribly wrong in a Gnome desktop session, it starts the systemd user unit gnome-session-failed.service, which runs the @libexecdir@/gnome-session-failed executable with the parameter --allow-logout. This results in the following full-screen message, blocking any other interaction with the session than clicking "Log out", or using ctrl-alt-Fx to switch to a VT:

*Oh no! Something has gone wrong.* A problem has occured and the system can't recover. Please log out and try again. Log out

Oh no! Something has gone wrong. A problem has occured and the system can't recover. Please log out and try again. [Log out]

The easiest way to deal with this is to just click on "Log out" and try again.

Let's say however, you have some important, unsaved data you really need to access (or, like me, you hear that your music is still playing, meaning the session can't be that broken, and are too stubborn to let Gnome force you to Log out).

In some circumstances, it is possible to super-shift-middleclick on the window to open the window manager context menu, uncheck "Always on top" and "On all workspaces", and just move it to a different workspace.

If that is not possible, we need to get to a shell on that machine somehow, either by switching to a VT using ctrl-alt-Fx, or connect via SSH from another device. One might want to just kill the gnome-session-failed process now, however, that would close the full-screen message, but the session would still terminate afterwards. This is due to the ExecStopPost=-@libexecdir@/gnome-session-ctl --shutdown line in the service file. To get around this, we temporarily override the service file:

systemctl --user edit --runtime gnome-session-failed.service

Insert the following:

[Unit]
OnFailure=
[Service]
ExecStopPost=

Reload the service config:

systemctl --user daemon-reload

Now you can safely kill the process:

pkill -f gnome-session-failed

Your session may be severely broken (i.e. window manager crashed, so no window decorations, window switching), but you might be able to save your file (or start another window manager like i3 in your session and write a blog post about it).


[0] I haven't figured out yet which part of the system is responsible here

how to put shit on old kindle without USB and internet

my kindle's USB port is broken, so I can't just connect via USB to put books on it

it also refuses to connect to WiFi hotspots without a backing internet connection. however, I don't want to connect it to the internet because it will phone home to amazon and potentially do auto-updates i don't want.

but, enshittification of the internet to the rescue, the kindle accepts a wifi hotspot with a "captive portal", so we pretend to be one.

Convert an audiobook to a podcast, to listen with AntennaPod

I listen to podcasts a lot, and I wanted to get into listening to audiobooks. However, I wanted to really buy them as un-DRM'd audio files, but still be able to listen to them via an app on my phone, without having to copy the whole several hundred megabytes onto it. So I thought it might be a good idea to use AntennaPod, a podcast listening app for Android, which can nicely stream podcasts and also manage offline availability.