From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id gO3HFeOK12V6VgAAe85BDQ:P1 (envelope-from ) for ; Thu, 22 Feb 2024 18:56:51 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id gO3HFeOK12V6VgAAe85BDQ (envelope-from ) for ; Thu, 22 Feb 2024 18:56:51 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1708624611; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=m0UoALNWkjPDde7p4ZgAzSKa8lVNOJn7EicTcNm7AG0=; b=IFnDzNTxyHcByP54HcT4/HwczIwyhwSbdQvyLeaRkQtnhEtuWQjPA1f6eEyngeJLXQ+ApX aQ/EnCQMxl2srGmDMIon7n3wINwSg6HOwBW5vUm5WAv9z/UyO43KcZnCbDK4t2SYNrD4zw EXhonoum41CCVHRH0T/mGfZrCtmYLQnESvdG80JwA+SJSIMLHHgSGyIWabhmtlEFHqT6eO nngAfxOpqqCXnxw5ahcIIutsd5KGnT2mHhHRkIQuc0eukm5GclT+5RYhhh2fFobdon4N7U d0Z8Q9LhhZ5B7ikBCIcYKDXp4Utvg+pToW18q354EsNbcoRgln4JW47PcEA7yw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1708624611; a=rsa-sha256; cv=none; b=k2H1QdE9MlAw9N7L7K2Xt6M+WN6csvbgoZTyRjnL/xaiWPkXzheNNkadcR9WbVXbKmPMSv DHWSvd1pTlxkUgf0y/wvWvWVzj3U8Q3o66DW+E1sS8F4ME2l0zgdCvo9o85cKFJCVnzUZ9 +OxLWX5ZjjIVo99biN2cSKdhiW8QbMhzfxzv+lolUinSKAK60+v161Z0bfRZJz5AV6Lr5t +I9cmo6mvPViZPTxPe5YSO1BSjLOyr8VOmZb4FmSgIxGtdVSuEc6MZMENhzD6Ap4a5ymjk 0/Czo1sJG731/hPlcOyVdiiDf5LHXXSRTQVFVmY2x0asxPxK3LX1YsAauFlQKA== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 11A8B14513 for ; Thu, 22 Feb 2024 18:56:51 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rdDIz-0001aF-PP; Thu, 22 Feb 2024 12:56:21 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rdDIx-0001Zk-Fl for help-guix@gnu.org; Thu, 22 Feb 2024 12:56:19 -0500 Received: from smtpout1.mo12.mail-out.ovh.ca ([51.161.45.254]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rdDIu-0008Qx-K4 for help-guix@gnu.org; Thu, 22 Feb 2024 12:56:19 -0500 Received: from mxplan1.mail.ovh.ca (unknown [10.111.38.59]) by mo12.mail-out.ovh.ca (Postfix) with ESMTPS id 4Tggmr6QHPzHpwQ; Thu, 22 Feb 2024 13:56:12 -0400 (AST) Received: from rodrigomorales.site (54.39.251.57) by DAG2EX1.mxpca1.local (172.16.2.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Thu, 22 Feb 2024 12:56:11 -0500 X-OVh-ClientIp: 190.233.209.64 From: Rodrigo Morales To: Nils Landt , Subject: Re: [question] How to start systemd services installed by packages in Ubuntu? In-Reply-To: <704162954.134516.1708599269182@office.mailbox.org> References: <704162954.134516.1708599269182@office.mailbox.org> Date: Thu, 22 Feb 2024 12:56:09 -0500 Message-ID: <87v86gqt6u.fsf@rodrigomorales.site> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [54.39.251.57] X-ClientProxiedBy: DAG2EX2.mxpca1.local (172.16.2.12) To DAG2EX1.mxpca1.local (172.16.2.11) X-Ovh-Tracer-GUID: 24a0f6c7-c082-48ca-87ee-3ba07edfbc35 X-Ovh-Tracer-Id: 9996865276471942810 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvledrfeeggddutdegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufgjfhffkfggtghisehttdertddttddtnecuhfhrohhmpeftohgurhhighhoucfoohhrrghlvghsuceomhgvsehrohgurhhighhomhhorhgrlhgvshdrshhithgvqeenucggtffrrghtthgvrhhnpedutefhjeetffekleetveffgfefkefgfeetkeeglefhjeefgeduuddttdffleevieenucffohhmrghinheprhhoughrihhgohdrlhhotggrlhdpgihftggvrdhorhhgnecukfhppeduvdejrddtrddtrddupdehgedrfeelrddvhedurdehjedpudeltddrvdeffedrvddtledrieegnecuvehluhhsthgvrhfuihiivgepudenucfrrghrrghmpehinhgvthepuddvjedrtddrtddruddpmhgrihhlfhhrohhmpehmvgesrhhoughrihhgohhmohhrrghlvghsrdhsihhtvgdpnhgspghrtghpthhtohepvddprhgtphhtthhopehnihhlsheslhgrnhguthdrvghmrghilhdprhgtphhtthhopehhvghlphdqghhuihigsehgnhhurdhorhhgpdfovfetjfhoshhtpehmohduvddpmhhouggvpehsmhhtphhouhht Received-SPF: pass client-ip=51.161.45.254; envelope-from=me@rodrigomorales.site; helo=smtpout1.mo12.mail-out.ovh.ca X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: help-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -5.27 X-Spam-Score: -5.27 X-Migadu-Queue-Id: 11A8B14513 X-Migadu-Scanner: mx13.migadu.com X-TUID: PuC3ktoJiKlw (I'm sending this message again because it seems I replied to you but not to the mailing list so that this message gets to the mailing list archive, pardon for sending it twice) Nils Landt writes: > Yes. In ~/.config/systemd/user.conf (file probably doesn't exist yet): > > [Manager] > ManagerEnvironment="XDG_DATA_DIRS=%h/.guix-profile/lib" > > In case the %h doesn't work for you (depends on systemd version), write /home/rodrigo (or whatever) instead. > After restarting the user session, it should pick up the unit files. I did what you suggested, and the services were found, but some errors were shown when launching applications and the startup time significantly increased. Initially, the file =~/.config/systemd/user.conf= was empty. Therefore, the services =thunar.service= and =tumblerd.service= which were located in =~/.guix-profile/lib/systemd/user/= couldn't be found. #+BEGIN_SRC sh systemctl --user list-unit-files '*.service' | grep -e 'thunar.service' -e 'tumblerd.service' | wc -l #+END_SRC #+RESULTS: #+begin_example 0 #+end_example * Attempt no. 1 (your suggestion) :PROPERTIES: :CREATED: [2024-02-22 11:21:37 -05] :END: I edited the file =~/.config/systemd/user.conf= as you suggested. I logged out and logged in. #+BEGIN_SRC sh cat ~/.config/systemd/user.conf #+END_SRC #+RESULTS: #+begin_example [Manager] ManagerEnvironment="XDG_DATA_DIRS=/home/rodrigo/.guix-profile/lib" #+end_example I noticed that =/home/rodrigo/.guix-profile/lib= was included to the variable =XDG_DATA_DIRS= (see result of the command below). #+BEGIN_SRC sh echo $XDG_DATA_DIRS | tr ':' '\n' | sort #+END_SRC #+RESULTS: #+begin_example /gnu/store/16kl9gx8k8ygkcj7dw1xrpw2p1h1bhjh-emacs-29.1/share /gnu/store/23rprfqw8jy1xr0bcfvq644s2jmycdkr-gtk+-3.24.37/share /gnu/store/gc4q34l7yc63qv2qcqq7avmf34hdpbwp-shared-mime-info-1.15/share /gnu/store/m26kdkgr4c09wc0djn2pgcz9jl7j2rw1-glib-2.72.3/share /home/rodrigo/.guix-home/profile/share /home/rodrigo/.guix-profile/lib /home/rodrigo/.guix-profile/share /home/rodrigo/.guix-profile/share /home/rodrigo/.local/share/flatpak/exports/share /usr/share/gnome /usr/share/i3 /var/lib/flatpak/exports/share /var/lib/snapd/desktop #+end_example I also noticed that =/home/rodrigo/.guix-profile/lib/systemd/user= was included in the property =UnitPath= (see result of the command below). #+BEGIN_SRC sh systemctl --user show --property=UnitPath --value | tr ' ' '\n' | sort #+END_SRC #+RESULTS: #+begin_example /etc/systemd/user /etc/xdg/systemd/user /home/rodrigo/.config/systemd/user /home/rodrigo/.config/systemd/user.control /home/rodrigo/.guix-profile/lib/systemd/user /home/rodrigo/.local/share/systemd/user /run/systemd/user /run/user/1000/systemd/generator /run/user/1000/systemd/generator.early /run/user/1000/systemd/generator.late /run/user/1000/systemd/transient /run/user/1000/systemd/user /run/user/1000/systemd/user.control /usr/lib/systemd/user /usr/local/lib/systemd/user /usr/local/share/systemd/user /usr/share/systemd/user #+end_example Therefore, the services could be found. #+BEGIN_SRC sh systemctl --user list-unit-files '*.service' | grep -e 'thunar.service' -e 'tumblerd.service' #+END_SRC #+RESULTS: #+begin_example thunar.service static - tumblerd.service static - #+end_example The problem I noticed was that applications that were installed through =guix package -i= took more than usual to start. Inkscape took 25 seconds to print the version. #+BEGIN_SRC text $ time /home/rodrigo/.guix-profile/bin/inkscape --version (inkscape:42859): dbind-WARNING **: 11:58:15.650: AT-SPI: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken. Inkscape 1.2.1 (9c6d41e410, 2022-07-14) /home/rodrigo/.guix-profile/bin/inkscape --version 0.02s user 0.03s system 0% cpu 25.072 total $ echo $? 0 #+END_SRC Thunar started immediately when printing the version (first code block below), but not when the graphical interface was shown (second code block below). #+BEGIN_SRC text $ time /home/rodrigo/.guix-profile/bin/thunar --version thunar 4.18.7 (Xfce 4.18) Copyright (c) 2004-2022 The Thunar development team. All rights reserved. Written by Benedikt Meurer . Please report bugs to . /home/rodrigo/.guix-profile/bin/thunar --version 0.01s user 0.01s system 94% cpu 0.016 total $ echo $? 0 #+END_SRC #+BEGIN_SRC text $ time /home/rodrigo/.guix-profile/bin/thunar /tmp (thunar:42772): dbind-WARNING **: 11:57:56.620: AT-SPI: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken. ThunarThumbnailer: Failed to retrieve supported types: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.thumbnails.Thumbnailer1 was not provided by any .service files /home/rodrigo/.guix-profile/bin/thunar /tmp 0.36s user 0.05s system 0% cpu 52.116 total $ echo $? 0 #+END_SRC * Attempt no. 2 (add path for systemd services in guix home) :PROPERTIES: :CREATED: [2024-02-22 11:21:40 -05] :END: I edited the file =~/.config/systemd/user.conf=, but this time I included the path were =guix home= install systemd services. I logged out and logged in. #+BEGIN_SRC sh cat ~/.config/systemd/user.conf #+END_SRC #+RESULTS: #+begin_example [Manager] ManagerEnvironment="XDG_DATA_DIRS=/home/rodrigo/.guix-home/profile/lib" #+end_example As happened in attempt no. 1, the specified value in =~/.config/systemd/user.conf= (=/home/rodrigo/.guix-home/profile/lib= was added to =XDG_DATA_DIRS=. #+BEGIN_SRC sh echo $XDG_DATA_DIRS | tr ':' '\n' | sort #+END_SRC #+RESULTS: #+begin_example /gnu/store/16kl9gx8k8ygkcj7dw1xrpw2p1h1bhjh-emacs-29.1/share /gnu/store/23rprfqw8jy1xr0bcfvq644s2jmycdkr-gtk+-3.24.37/share /gnu/store/gc4q34l7yc63qv2qcqq7avmf34hdpbwp-shared-mime-info-1.15/share /gnu/store/m26kdkgr4c09wc0djn2pgcz9jl7j2rw1-glib-2.72.3/share /home/rodrigo/.guix-home/profile/lib /home/rodrigo/.guix-home/profile/share /home/rodrigo/.guix-profile/share /home/rodrigo/.local/share/flatpak/exports/share /usr/share/gnome /usr/share/i3 /var/lib/flatpak/exports/share /var/lib/snapd/desktop #+end_example As happened in attempt no. 1, the specified value in =~/.config/systemd/user.conf= (i.e. =/home/rodrigo/.guix-home/profile/lib/systemd/user=) was added to the property =UnitPath=. #+BEGIN_SRC sh systemctl --user show --property=UnitPath --value | tr ' ' '\n' | sort #+END_SRC #+RESULTS: #+begin_example /etc/systemd/user /etc/xdg/systemd/user /home/rodrigo/.config/systemd/user /home/rodrigo/.config/systemd/user.control /home/rodrigo/.guix-home/profile/lib/systemd/user /home/rodrigo/.local/share/systemd/user /run/systemd/user /run/user/1000/systemd/generator /run/user/1000/systemd/generator.early /run/user/1000/systemd/generator.late /run/user/1000/systemd/transient /run/user/1000/systemd/user /run/user/1000/systemd/user.control /usr/lib/systemd/user /usr/local/lib/systemd/user /usr/local/share/systemd/user /usr/share/systemd/user #+end_example As happened in attempt no. 1, the services were found. #+BEGIN_SRC sh systemctl --user list-unit-files '*.service' | grep -e 'thunar.service' -e 'tumblerd.service' #+END_SRC #+RESULTS: #+begin_example thunar.service static - tumblerd.service static - #+end_example The same issue of attempt no. 1 occured, some applications that were installed through =guix packaege -i= took more than usual to start. Inkscape took 10 seconds to print the version. #+BEGIN_SRC text $ time /home/rodrigo/.guix-profile/bin/inkscape --version (inkscape:37335): dbind-WARNING **: 11:29:48.365: AT-SPI: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.TimedOut: Failed to activate service 'org.a11y.Bus': timed out (service_start_timeout=120000ms) Inkscape 1.2.1 (9c6d41e410, 2022-07-14) /home/rodrigo/.guix-profile/bin/inkscape --version 0.03s user 0.02s system 0% cpu 10.016 total $ echo $? 0 #+END_SRC Thunar started immediately when printing the version (first code block below), but not when the graphical interface was shown (second code block below). #+BEGIN_SRC text $ time /home/rodrigo/.guix-profile/bin/thunar --version thunar 4.18.7 (Xfce 4.18) Copyright (c) 2004-2022 The Thunar development team. All rights reserved. Written by Benedikt Meurer . Please report bugs to . /home/rodrigo/.guix-profile/bin/thunar --version 0.01s user 0.01s system 82% cpu 0.016 total $ echo $? 0 #+END_SRC #+BEGIN_SRC text $ time /home/rodrigo/.guix-profile/bin/thunar /tmp (thunar:38326): dbind-WARNING **: 11:35:15.484: AT-SPI: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken. ThunarThumbnailer: Failed to retrieve supported types: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.thumbnails.Thumbnailer1 was not provided by any .service files /home/rodrigo/.guix-profile/bin/thunar /tmp 0.33s user 0.05s system 0% cpu 51.356 total $ echo $? 0 #+END_SRC * Conclusion :PROPERTIES: :CREATED: [2024-02-22 12:01:46 -05] :END: As was shown above, adding any of =~/.guix-home/profile/lib/= or =~/.guix-profile/lib/= to =~/.config/systemd/user.conf= under =ManagerEnvironment= significantly increased the startup time of applications and some errors were shown. The question now is: How to make =systemd= aware of user services in =~/.guix-home/profile/lib/= or =~/.guix-bprofile/lib/= but without disrupting the startup of some applications. For the time being, to avoid having to wait too much time whenever an application is launched, I will have =~/.config/systemd/user.conf= empty and I will manually create symbolic links from =~/.config/systemd/user= to point to the services located in =~/.guix-home/profile/lib/systemd/user= and =~/.guix-profile/lib/systemd/user=.