From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id ADXVHZd7SmIr9wAAgWs5BA (envelope-from ) for ; Mon, 04 Apr 2022 07:01:11 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id iCEsG5d7SmJGtgAA9RJhRA (envelope-from ) for ; Mon, 04 Apr 2022 07:01:11 +0200 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 E66B03684D for ; Mon, 4 Apr 2022 07:01:10 +0200 (CEST) Received: from localhost ([::1]:53370 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nbEpx-0004mt-Lj for larch@yhetil.org; Mon, 04 Apr 2022 01:01:09 -0400 Received: from eggs.gnu.org ([209.51.188.92]:38026) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nbEpq-0004lA-4C for guix-patches@gnu.org; Mon, 04 Apr 2022 01:01:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:56300) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nbEpp-0001X3-RV for guix-patches@gnu.org; Mon, 04 Apr 2022 01:01:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nbEpp-0000kk-Lr for guix-patches@gnu.org; Mon, 04 Apr 2022 01:01:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#54434] [PATCH 0/6] XFCE Updates Resent-From: Feng Shu Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 04 Apr 2022 05:01:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54434 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Brendan Tildesley Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= , Maxime Devos , 54434@debbugs.gnu.org Received: via spool by 54434-submit@debbugs.gnu.org id=B54434.16490484322846 (code B ref 54434); Mon, 04 Apr 2022 05:01:01 +0000 Received: (at 54434) by debbugs.gnu.org; 4 Apr 2022 05:00:32 +0000 Received: from localhost ([127.0.0.1]:50197 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nbEpM-0000jq-0K for submit@debbugs.gnu.org; Mon, 04 Apr 2022 01:00:32 -0400 Received: from m12-13.163.com ([220.181.12.13]:58797) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nbEpI-0000jU-4z for 54434@debbugs.gnu.org; Mon, 04 Apr 2022 01:00:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-ID:MIME-Version; bh=AIDtZ iBRGPK0YUnY8+/xmDKhW9IKamLbWrp4HwP1yug=; b=Y4O8ExSLWiCkF+qC58fVA HIL330b6st/0rZ4Z3FR2a4srKw2GegujAIckwMGuCa6d8jAO0juveOS3fXwwlvxy bMSoCTd7eeh0z1uC7Dg6EsI4PvMLfwOcUAtRAcKZnLfuJNiLOVHMIe5LGK05wLP0 wdYMA+RIx7Dpq7G9e6JHFI= Received: from debian (unknown [218.92.14.78]) by smtp9 (Coremail) with SMTP id DcCowADn4kRMe0piND1TAQ--.37702S2; Mon, 04 Apr 2022 12:59:57 +0800 (CST) From: Feng Shu References: <20220318073844.14290-1-mail@brendan.scot> <20220318073844.14290-8-mail@brendan.scot> <87ee2ewj69.fsf_-_@gnu.org> <019a1901-860b-137a-a973-9b3c505acd7f@brendan.scot> <87o81hy2sw.fsf@163.com> <17675c0b-22c0-db01-b9ef-ee3348326056@brendan.scot> Date: Mon, 04 Apr 2022 12:59:56 +0800 In-Reply-To: <17675c0b-22c0-db01-b9ef-ee3348326056@brendan.scot> (Brendan Tildesley's message of "Mon, 4 Apr 2022 13:53:41 +1000") Message-ID: <87h779xx2r.fsf@163.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-CM-TRANSID: DcCowADn4kRMe0piND1TAQ--.37702S2 X-Coremail-Antispam: 1Uf129KBjvJXoWxWw47ArW8Jry5Cr15GF13CFg_yoWrAF1DpF y5Cay7GFyDAFyDGrn7t340qry2qFWrJFyrXrZ5WrykAwn8Cw1xKFWSy3yrAa4DWws7Zw1Y 9w4jv34DZw4jqrJanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07UvfOcUUUUU= X-Originating-IP: [218.92.14.78] X-CM-SenderInfo: 5wxpt2lkx6il2tof0z/1tbiLw3Y1FUMb4ftyQAAs7 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1649048471; 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:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=AIDtZiBRGPK0YUnY8+/xmDKhW9IKamLbWrp4HwP1yug=; b=sKValra4VaBXM9jiRVoKuyMcBtm3r7OixHFcX3pzyNF09aFe3O3bvhQgOzf0PRiJvKj+oa HlkQ3IDHD6PsrUEYvJ2l5DJUUfc7BjdSlRAZ7HUGJ7AxU8hlSm60ZiyRrHPfcj16Sea36C RL/MeftYYqVxtLMj8ox6RmBLTWlHG/L7pcc1kpCgx2sIIPsaUkRwxj3QlzLUGogyyVHLji gK/Dho4jPryq3znO1Fmt3bP/z7KzkN7YjysR/UTl7nA0QrkBUZ6gZVs1RhDEOSxrBcu49j 59Rk+519Ar5xjiCGC/zoLUTkQcuIC+ygzpU1tyTFawxaeBVlKrlEuCtJvSsEuQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1649048471; a=rsa-sha256; cv=none; b=LUwUYHWXhg+X9p6mQZ1D2owk2PyG3qhXzS4w6XKKl2prlaY7al1noxzXx3ffHege2SYgeI KUtmGSEWJTA34lPZZF39ENACQ8ejOg71GAZD1WPbb8j2egE61Je0IA6USVAmctjEbQ7z1/ yLknLY7k1/LAhr3q+Yiz7I1w+QZbYA2fHZFhYy2CQPbhwWJWjKLaQIBueJYcZNHH6EtOSM //edl2Ta3l9eNL7OYel033YeynpwcIRoiRSvQOk5u2jWZaOd59m8Q5V6kosDNFq+m4Xmfs Yyz5IQXiRZvNIXUWyaC4lY/ASUB71N955Hfp+nfTY+DssXeDQ9KQ9SW3ELxxVg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=163.com header.s=s110527 header.b=Y4O8ExSL; dmarc=fail reason="SPF not aligned (relaxed)" header.from=163.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 5.12 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=163.com header.s=s110527 header.b=Y4O8ExSL; dmarc=fail reason="SPF not aligned (relaxed)" header.from=163.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: E66B03684D X-Spam-Score: 5.12 X-Migadu-Scanner: scn0.migadu.com X-TUID: KEeZrv/tIRoM Brendan Tildesley writes: > On 4/4/22 12:56 pm, Feng Shu wrote: >> Brendan Tildesley writes: >> >>> On 3/4/22 8:33 pm, Ludovic Court=C3=A8s wrote: >>>> [...] >>>> One problem is that this won=E2=80=99t work for those using Guix Home,= where the >>>> default profile is ~/.guix-home/profile. >>>> >>>> Can this extra variable be avoided? Or could it be handled by a search >>>> path specification? >>> It's xfce4-panel that needs the search path to load .so files for >>> panel plugins. >>> xfce4-panel already has the search-path set to load them, but since >>> its installed >>> to the system profile,it does not load the user installed plugins. If >>> xfce4-panel >>> was a user installed package it may work but userswould have to >>> manually install it. >>> So I'm not sure how else to solve it. >> What happen when version of xfce4-panel installed in system profile is >> different from installed in home profile? > I think xfce4-panel will be run from $PATH so the system version will > be picked first and the user installed one will be ignored. The search > path will be set but will not work until the user logs out and back in > again, which is not ideal. I'd like a user to be able to install a plugin > and have it appear in the settings menu immediately. > Maybe it will first find xfce.desktop in /share/xsessions, then in /share/xsessions. (define* (xinitrc #:key fallback-session) "Return a system-wide xinitrc script that starts the specified X session, which should be passed to this script as the first argument. If not, the @var{fallback-session} will be used or, if @var{fallback-session} is false,= a desktop session from the system or user profile will be used." (define builder #~(begin (use-modules (ice-9 match) (ice-9 regex) (ice-9 ftw) (ice-9 rdelim) (srfi srfi-1) (srfi srfi-26)) (define (close-all-fdes) ;; Close all the open file descriptors except 0 to 2. (let loop ((fd 3)) (when (< fd 4096) ;FIXME: use sysconf + _SC_OPEN_= MAX (false-if-exception (close-fdes fd)) (loop (+ 1 fd))))) (define (exec-from-login-shell command . args) ;; Run COMMAND from a login shell so that it gets to see the same ;; environment variables that one gets when logging in on a tty, = for ;; instance. (let* ((pw (getpw (getuid))) (shell (passwd:shell pw))) ;; Close any open file descriptors. This is all the more ;; important that SLiM itself exec's us directly without closing ;; its own file descriptors! (close-all-fdes) ;; The '--login' option is supported at least by Bash and zsh. (execl shell shell "--login" "-c" (string-join (cons command args))))) (define system-profile "/run/current-system/profile") (define user-profile (and=3D> (getpw (getuid)) (lambda (pw) (string-append (passwd:dir pw) "/.guix-profile")))) (define (xsession-command desktop-file) ;; Read from DESKTOP-FILE its X session command and return it as a ;; list. (define exec-regexp (make-regexp "^[[:blank:]]*Exec=3D(.*)$")) (call-with-input-file desktop-file (lambda (port) (let loop () (match (read-line port) ((? eof-object?) #f) ((=3D (cut regexp-exec exec-regexp <>) result) (if result (string-tokenize (match:substring result 1)) (loop)))))))) (define (find-session profile) ;; Return an X session command from PROFILE or #f if none was fou= nd. (let ((directory (string-append profile "/share/xsessions"))) (match (scandir directory (cut string-suffix? ".desktop" <>)) ((or () #f) #f) ((sessions ...) (any xsession-command (map (cut string-append directory "/" <>) sessions)))))) (let* ((home (getenv "HOME")) (xsession-file (string-append home "/.xsession")) (session (match (command-line) ((_) #$(if fallback-session #~(list #$fallback-session) #f)) ((_ x ..1) x)))) (if (file-exists? xsession-file) ;; Run ~/.xsession when it exists. (apply exec-from-login-shell xsession-file (or session '())) ;; Otherwise, start the specified session or a fallback. (apply exec-from-login-shell (or session (find-session user-profile) (find-session system-profile))))))) (program-file "xinitrc" builder)) --=20