From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id eNB6D7pV+mOjWwAAbAwnHQ (envelope-from ) for ; Sat, 25 Feb 2023 19:38:50 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id n/mDD7pV+mNFtAAA9RJhRA (envelope-from ) for ; Sat, 25 Feb 2023 19:38:50 +0100 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 1AA991933 for ; Sat, 25 Feb 2023 19:38:50 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pVzRK-0006jl-RR; Sat, 25 Feb 2023 13:38:34 -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 1pVzRJ-0006jd-VP for guix-devel@gnu.org; Sat, 25 Feb 2023 13:38:34 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pVzRJ-0001pR-Mb; Sat, 25 Feb 2023 13:38:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=Xib0r8O2QLU9GYj/pJetnR0F1VG1uHmAq8xIZvR0QBI=; b=oCJ8fKpCoTf8POrhqe/e QT6KeQRH+NCIucd2MME08LhXdj1lLztS7DhRTMBUz9L6XhSx8HbWritbI0tStfrTFhMY6tDMq7add /ftQdejcz2SzzU/nofhxra7lPDWMBOwidKI6qW7tTsE3Og/FaQGBPdAZdWExqVEZll83L0ZWocZks +pqXCtu56NzQ546sai6S0oT1hmL7nHDdV6g1+0zv6cfjNlmtH6rYlBGUpW0fvMxCEkX7NXW5JW4a2 HNRscfzUR08AWPLzXd3XjL7EWNAehRwkGeeq+7mOnwSIaHO87frC0+HckF3Itbe7vI24THwD069Bf eIG49rOcWoyMUw==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201] helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pVzRJ-0004Hd-9J; Sat, 25 Feb 2023 13:38:33 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Liliana Marie Prikler Cc: guix-devel@gnu.org Subject: Re: Proof of concept: Shepherd + DBus = =?utf-8?Q?=E2=99=A5?= References: X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Septidi 7 =?utf-8?Q?Vent=C3=B4se?= an 231 de la =?utf-8?Q?R=C3=A9volution=2C?= jour de l'Alaterne X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Sat, 25 Feb 2023 19:38:30 +0100 In-Reply-To: (Liliana Marie Prikler's message of "Fri, 24 Feb 2023 21:55:40 +0100") Message-ID: <87h6v9vbdl.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gnu.org header.s=fencepost-gnu-org header.b=oCJ8fKpC; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1677350330; a=rsa-sha256; cv=none; b=V9/h4/yXqUweRX2WhwlKPkIFzV6lorgK4+V8HknDJpUYhXIXC8ScqgOMWklAwaZNn2VU2a 5nnY2L+qwK5scNZmb7t7TEFsZvmP5hTOrSiZbkVk06ELz90IVfhOyNTTs7CKVYKrwm5eNl eoHTckGB2hRjl3rj2oO1gAKTdF27TWRm0t7XqLAeb7AZPtuXJdXUp5uyVKyZnVW+0xvyjq iXhHmLfNW3P+wNo2k/PDjQforCptfhl+MWa6xZcDg/ayUhQXBMzd7uQ8qP9DS9uBJwen/B iEPBZWXUo5pPh7uHkPtL8xpKrVvYabxEfd6Y3hTo+4Jh0JfjrkZGXUqvJkMV+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1677350330; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=Xib0r8O2QLU9GYj/pJetnR0F1VG1uHmAq8xIZvR0QBI=; b=IUlBJWYuzJvleNPRte06QyDHfBo9+vnA+5qqhct2qQB9zZoVZF/JiSyIndYyTG0rbM76th FoiKAh6usqjrri0CFuog4fTbCpXGE2QjB+TlHn7CHwB2J+gu+nykg7UcowLgFL3N5METGj 5rne1Xb6GypcnFNKx22UFi5pZQsib+TSFj+qfyOwxCVV8rOTC88EE9Rkt1VAlICyCoDWhm htGpRJ6RuTw9+PEZJsh5Pofw6UwmipBpQc1QXa0P+692eLF889d3e5JtSKT6VlqMToxz06 s7CrhEIXhyt0SsApAECwoBNS9aF3A4PSY35C+vzqzdHn64soJyV2eQk319UVIw== Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gnu.org header.s=fencepost-gnu-org header.b=oCJ8fKpC; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org X-Migadu-Spam-Score: -7.70 X-Spam-Score: -7.70 X-Migadu-Queue-Id: 1AA991933 X-Migadu-Scanner: scn1.migadu.com X-TUID: XfycQ6Q6V7M2 Hello! Liliana Marie Prikler skribis: > this comes a little late, as Gnome folks have decided that evaluating > arbitrary Javascript over DBus is perhaps not always the wisest idea=C2= =B9, Too bad, what could possibly go wrong? [...] > Once you set the unsafe flag in Looking Glass and promise to be a very > good girl, you can now extract environment variables. > > $ herd getenv gnome PATH=20=20=20=20=20=20=20=20=20=20=20=20=20=20 > > ;;; (reply #t "\"/gnu/store/s43dhx83c3a2g79vs5anf3wdmv9lwpi3-glib- > 2.70.2-bin/bin:/run/setuid- > programs:/home/yuri/.config/guix/current/bin:$HOME/.guix- > profile/bin:$HOME/.guix-profile/sbin:/run/current- > system/profile/bin:/run/current-system/profile/sbin\"") > > > If you were naughty and didn't do the magic dance, you get a rather > unhelpful result instead. > > $ herd getenv gnome PATH=20=20=20=20=20=20=20=20=20=20=20=20=20=20 > > ;;; (reply #f "") This is super cool and super useful. Is there some way we could achieve this (getenv/setenv in the GNOME Shell process) without resorting to JS? (=F0=9F=92=A1 Did you know? On GNU/Hurd, each process implements the =E2= =80=9Cmsg=E2=80=9D RPC interface, which, among other things, lets you inspect and change its environment variables! If you have a childhurd running, try something like: =E2=80=9Cmsgport --getenv=3DPATH -p $$=E2=80=9D.) > Anyway, we can now talk to DBus services from Shepherd, although doing > so is currently a bit of a pain in the buttocks. Much of this is due > to guile-ac-d-bus being somewhat obtuse and not having enough fibers in > it. That being said, I'm sure there's some other use-case out there > that is a good fit for this (wanna talk to loginctl for hibernation > perhaps?) Yes! Provided suitable Fibers integration, we could have services that automatically start/stop based on some notification received on the bus (devices plugged/unplugged, power or network condition changes, etc.). Pretty exciting. Thanks for sharing! Ludo=E2=80=99.