Subject: Shepherd fails to start in user session ~50% of the time

From: Tom Willemse <[email-masked]>
Date: Thu, 15 Sep 2022 18:24:59 -0700

Hi Guix!

I've been using Guix on Archlinux for a little while now, and ever since
I've started using Guix Home on my laptop to start up user-level
services I've been having the issue that about 50% of the time when I
boot my laptop shepherd fails to start. 

My .xsession-errors says:

> shepherd: while opening socket '/run/user/1000/shepherd/socket': bind:
> Address already in use

and looking at my shepherd log:

> 2022-09-15 11:47:18 Service root has been started.
> 2022-09-15 11:47:18 Service root has been started.
> 2022-09-15 11:47:19 Starting services...
> 2022-09-15 11:47:19 Starting services...
> 2022-09-15 11:47:19 Exiting shepherd...
> 2022-09-15 11:47:19 Service dunst has been started.
> 2022-09-15 11:47:19 Service unclutter has been started.
> 2022-09-15 11:47:19 Service syncthing has been started.
> 2022-09-15 11:47:19 Service polybar has been started.
> 2022-09-15 11:47:19 Service cmst has been started.
> 2022-09-15 11:47:19 Service kdeconnect has been started.
> 2022-09-15 11:47:20 Service xbindkeys has been started.
> 2022-09-15 11:47:20 Service picom has been started.
> 2022-09-15 11:47:20 Service xmodmap has been started.
> 2022-09-15 11:47:20 Service redshift has been started.
> 2022-09-15 11:47:20 Exiting shepherd...
> 2022-09-15 11:47:20 Service syncthing has been stopped.
> 2022-09-15 11:47:20 Service xbindkeys has been stopped.
> 2022-09-15 11:47:20 Service redshift has been stopped.
> 2022-09-15 11:47:20 Service cmst has been stopped.
> 2022-09-15 11:47:20 Service kdeconnect has been stopped.
> 2022-09-15 11:47:20 Service polybar has been stopped.
> 2022-09-15 11:47:20 Service dunst has been stopped.
> 2022-09-15 11:47:20 Service picom has been stopped.
> 2022-09-15 11:47:20 Service unclutter has been stopped.
> 2022-09-15 11:47:20 Exiting.

It looks like it starts twice and then exits both, but I'm not sure why.
I'm guessing it's the ~/.guix-home/activate and
~/.guix-home/on-first-login that are trying to start it.

I'm not sure what other information I can provide you that will help, so
please let me know!

Cheers,

Tom