I was trying to setup user services using GNU Shepherd, as illustrated in this blog post (https://guix.gnu.org/en/blog/2020/gnu-shepherd-user-services/). But I get an error related to `/run/user/1000`, that it either couldn't connect to or doesn't exist. What should I do?
Hello, El 21 sept. 2020 2:21, Buttery Pancake via <help-guix@gnu.org> escribió: > > I was trying to setup user services using GNU Shepherd, as illustrated in this blog post (https://guix.gnu.org/en/blog/2020/gnu-shepherd-user-services/). So you have followed these steps, am I right? The daemon start step is missing, IIUC. > But I get an error related to `/run/user/1000`, that it either couldn't connect to or doesn't exist. This usually indicates that Shepherd is not running. > What should I do? Run shepherd command as the user before any herd invocation. Usually this is enough: $ shepherd & AFAIK there is no configuration in Guix (yet) to start automatically a Shepherd session per-user. I use it too, but I launch it with the X session, maybe this is helpfuk for you too. Best regards, Miguel
Yes, I started shepherd using `shepherd &` before herd invocation. But that did not create the `/run/user/1000`.
Hi again,
On 2020-09-21 3:59, Buttery Pancake via wrote:
> Yes, I started shepherd using `shepherd &` before herd invocation. But
> that did not create the `/run/user/1000`.
The system's (e)logind creates /run/user/nnn, not the user Shep.
Are you running Guix System? If so, are you using elogind-service-type
or %desktop-services?
Kind regards,
T G-R
Sent from a Web browser. Excuse or enjoy my brevity.
The last time I tried setting up user services, I ran into the same error. I am using sway. And I think that I am using elogind...but I'm certain how to check that. I am starting sway via ~/.bash_profile with exec dbus-run-session sway Does this prove that I am currently using elogind? #+BEGIN_SRC sh joshua@dobby ~$ sudo herd status elogind Status of elogind: It is started. Running value is 291. It is enabled. Provides (elogind). Requires (dbus-system). Conflicts with (). Will be respawned. #+END_SRC -- Joshua Branson Sent from Emacs and Gnus https://gnucode.me
Thanks Miguel! That solved my issue. My ~/.bash_profile now looks like: #+BEGIN_SRC sh # Honor per-interactive-shell startup file if [ -f ~/.bashrc ]; then . ~/.bashrc; fi # shepherd if [[ -z $DISPLAY ]] && [[ $(tty) = /dev/tty1 ]]; then export MOZ_ENABLE_WAYLAND=1 export GUIX_PACKAGE_PATH=/home/joshua/prog/gnu/guix/guix-packages/ XDG_DATA_DIRS=/var/lib/flatpak/exports/share:/home/joshua/.local/share/flatpak/exports/share:$XDG_DATA_DIRS # this may fix a bug that I have with termite confusing backspace as space in guix environment # export TERM=linux shepherd -c /home/joshua/.config/shepherd/init.scm & exec dbus-run-session sway fi #+END_SRC #+BEGIN_SRC sh herd status Started: + root Stopped: - vpn #+END_SRC -- Joshua Branson Sent from Emacs and Gnus https://gnucode.me