From: Rodrigo Morales <me@rodrigomorales.site>
To: <help-guix@gnu.org>
Subject: [question] How to start systemd services installed by packages in Ubuntu?
Date: Wed, 21 Feb 2024 21:17:00 -0500 [thread overview]
Message-ID: <ac4ef1cc9ba5e9bc0d053aceedc17b68@rodrigomorales.site> (raw)
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>>=.
next reply other threads:[~2024-02-22 2:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-22 2:17 Rodrigo Morales [this message]
2024-02-22 10:54 ` [question] How to start systemd services installed by packages in Ubuntu? Nils Landt
2024-02-22 17:56 ` Rodrigo Morales
2024-02-23 17:35 ` Nils Landt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ac4ef1cc9ba5e9bc0d053aceedc17b68@rodrigomorales.site \
--to=me@rodrigomorales.site \
--cc=help-guix@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).