all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [question] How to start systemd services installed by packages in Ubuntu?
@ 2024-02-22  2:17 Rodrigo Morales
  2024-02-22 10:54 ` Nils Landt
  0 siblings, 1 reply; 4+ messages in thread
From: Rodrigo Morales @ 2024-02-22  2:17 UTC (permalink / raw)
  To: help-guix


I'm using =guix= on Ubuntu and I have installed the packages =thunar=
and =thumbler=. As some of you might know, =thunar= is a file manager
and =tumbler= is the daemon which makes it possible for =thunar= to
show thumbnails for some files.

#+BEGIN_SRC sh
guix package -l | sed -n '/(current)/,$p'
#+END_SRC

#+RESULTS:
#+begin_example
Generation 10	Feb 21 2024 20:45:25	(current)
 + tumbler	4.18.1	out	/gnu/store/xk9kwfzpps58i6xvrxda3yqx39c5my34-tumbler-4.18.1
 + thunar 	4.18.7	out	/gnu/store/6x5wax4vd6gj78bigmb1hwi8sx8q7m0q-thunar-4.18.7

#+end_example

The package =tumbler= comes with a systemd service for starting the
daemon. I assumed that this was how it is intended to be started in
Ubuntu.

#+BEGIN_SRC sh
find ~/.guix-profile/lib/systemd/user
#+END_SRC

#+RESULTS:
#+begin_example
/home/rodrigo/.guix-profile/lib/systemd/user/
/home/rodrigo/.guix-profile/lib/systemd/user/tumblerd.service
/home/rodrigo/.guix-profile/lib/systemd/user/thunar.service
#+end_example

Upon installation, I executed the following command but the service
was not found.

#+HEADER: :prologue "exec 2>&1"
#+HEADER: :epilogue ":"
#+BEGIN_SRC sh
systemctl --user start tumblerd.service
#+END_SRC

#+RESULTS:
#+begin_example
Failed to start tumblerd.service: Unit tumblerd.service not found.
#+end_example

I created a symbolic link in
=/home/rodrigo/.config/systemd/user/tumblerd.service= that points to
=/home/rodrigo/.guix-profile/lib/systemd/user/tumblerd.service= and I
was able to start the service and see thumbnails within =thunar=.

#+BEGIN_SRC sh
ln -sf /home/rodrigo/.guix-profile/lib/systemd/user/tumblerd.service /home/rodrigo/.config/systemd/user/tumblerd.service
systemctl --user start tumblerd.service
echo Exit code: $?
#+END_SRC

#+RESULTS:
#+begin_example
Exit code: 0
#+end_example

As explained before, I needed to create a symbolic link from the
directory =~/.guix-profile/lib/systemd/user= to
=~/.config/systemd/user=, which is the directory that is looked up by
=systemd= when searching for user services. This is a manual task that
I would rather avoid doing whenever I install a package.

I have two questions:

1. Is using systemd user services for packages, that are installed
   through =guix package -i=, the way how daemons are intended to be
   started in Ubuntu?

2. Is it possible to make systemd in Ubuntu aware that there might be
   user services in =~/.guix-profile/lib/systemd/user=? I want to do
   this in order to avoid the manual task of creating a symbolic link
   to the directory that is actually ser. Ideally, I want to install a
   package and just execute =systemctl --user start <<service>>=.



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

end of thread, other threads:[~2024-02-23 17:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-22  2:17 [question] How to start systemd services installed by packages in Ubuntu? Rodrigo Morales
2024-02-22 10:54 ` Nils Landt
2024-02-22 17:56   ` Rodrigo Morales
2024-02-23 17:35     ` Nils Landt

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.