unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* Shepherd User Services
@ 2020-09-21  0:21 Buttery Pancake via
  2020-09-21  1:59 ` Buttery Pancake via
  0 siblings, 1 reply; 6+ messages in thread
From: Buttery Pancake via @ 2020-09-21  0:21 UTC (permalink / raw)
  To: help-guix

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?

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Shepherd User Services
  2020-09-21  0:21 Shepherd User Services Buttery Pancake via
@ 2020-09-21  1:59 ` Buttery Pancake via
  2020-09-21 15:18   ` Tobias Geerinckx-Rice
  0 siblings, 1 reply; 6+ messages in thread
From: Buttery Pancake via @ 2020-09-21  1:59 UTC (permalink / raw)
  To: help-guix

Yes, I started shepherd using `shepherd &` before herd invocation. But that did not create the `/run/user/1000`.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Shepherd User Services
  2020-09-21  1:59 ` Buttery Pancake via
@ 2020-09-21 15:18   ` Tobias Geerinckx-Rice
  2020-09-24 11:57     ` Joshua Branson
  0 siblings, 1 reply; 6+ messages in thread
From: Tobias Geerinckx-Rice @ 2020-09-21 15:18 UTC (permalink / raw)
  To: Buttery Pancake; +Cc: help-guix

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.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Shepherd User Services
  2020-09-21 15:18   ` Tobias Geerinckx-Rice
@ 2020-09-24 11:57     ` Joshua Branson
  0 siblings, 0 replies; 6+ messages in thread
From: Joshua Branson @ 2020-09-24 11:57 UTC (permalink / raw)
  To: Tobias Geerinckx-Rice; +Cc: Buttery Pancake, help-guix


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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Shepherd User Services
  2020-09-21  1:18 Miguel
@ 2020-09-24 12:04 ` Joshua Branson
  0 siblings, 0 replies; 6+ messages in thread
From: Joshua Branson @ 2020-09-24 12:04 UTC (permalink / raw)
  To: Miguel; +Cc: Buttery Pancake via


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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Shepherd User Services
@ 2020-09-21  1:18 Miguel
  2020-09-24 12:04 ` Joshua Branson
  0 siblings, 1 reply; 6+ messages in thread
From: Miguel @ 2020-09-21  1:18 UTC (permalink / raw)
  To: Buttery Pancake via

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-09-24 12:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-21  0:21 Shepherd User Services Buttery Pancake via
2020-09-21  1:59 ` Buttery Pancake via
2020-09-21 15:18   ` Tobias Geerinckx-Rice
2020-09-24 11:57     ` Joshua Branson
2020-09-21  1:18 Miguel
2020-09-24 12:04 ` Joshua Branson

unofficial mirror of help-guix@gnu.org 

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhetil.org/guix-user/0 guix-user/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 guix-user guix-user/ https://yhetil.org/guix-user \
		help-guix@gnu.org
	public-inbox-index guix-user

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.gnu.guix.user
	nntp://news.gmane.io/gmane.comp.gnu.guix.user


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git