Fixing Gnome Evolution Failed to Connect issue

 Thu, 22 Dec 2022 21:07 UTC

Fixing Gnome Evolution Failed to Connect issue
Image: CC BY 4.0 by cybrkyd

A lot of Gnome Evolution users have experienced an error which reads: The reported error was "Failed to authenticate: The name :1.13 was not provided by any .service files" or similar. It also sometimes appears as a type of “Failed to connect to account” error. Several bug-reports exist, for example, here and here.

Evolution error

The problem is a stale D-Bus service

The recommendation remains to exit Gnome Evolution with a command:

$ evolution --force-shutdown

That works, but the issue persists after the next logout and login. Logic would dictate that forcing a shutdown should be hard-coded into Gnome Evolution as a permanent fix but then we start moving into the rabbit-hole territory of Gnome components / D-Bus services / Systemd and so forth. Therefore, when Gnome Evolution remains running after logout (might be because it goes stale or does not respond), it is quite difficult to figure out who to ask to fix this one.

Processes can be checked by running the command ps -u [username] on a logged-out user account to list all running processes which persist beyond logout. As an example, the following output shows what is returned:

$ ps -u cybr

 2053 ?        00:32:39 cybr
 2079 ?        00:00:00 alsaj
 2082 ?        00:11:00 alsa_in
10265 tty1     00:00:00 bash
10295 tty1     00:00:00 ps

Killing all processes at logout

As a workaround, edit logind.conf to kill all user processes at logout.

$ sudo nano /etc/systemd/logind.conf

Uncomment and set KillUserProcesses=yes then save and exit.

Reload logind.conf:

$ systemctl restart systemd-logind

The idea is if KillUserProcesses=yes then processes running in the systemd-logind.service session will be terminated when the user logs out.

Running the command ps -u [username] on a logged-out user account after making the above change should return no results under the column headers.

$ ps -u cybr