From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id iFBMA8HQcmLRNgAAbAwnHQ (envelope-from ) for ; Wed, 04 May 2022 21:15:13 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id SI57A8HQcmLdwgAAauVa8A (envelope-from ) for ; Wed, 04 May 2022 21:15:13 +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 A64532E0CD for ; Wed, 4 May 2022 21:15:12 +0200 (CEST) Received: from localhost ([::1]:33484 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nmKSt-00029C-HD for larch@yhetil.org; Wed, 04 May 2022 15:15:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36212) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nmKSk-00028f-J9 for bug-guix@gnu.org; Wed, 04 May 2022 15:15:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:49870) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nmKSk-0002Dd-9q for bug-guix@gnu.org; Wed, 04 May 2022 15:15:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nmKSk-0004Mj-2t for bug-guix@gnu.org; Wed, 04 May 2022 15:15:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#48796: Guix on Debian 11 - Cant run or find applications from Guix in Desktop Menus Resent-From: Liliana Marie Prikler Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Wed, 04 May 2022 19:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48796 X-GNU-PR-Package: guix X-GNU-PR-Keywords: moreinfo To: Giovanni Biscuolo , Maxim Cournoyer , bo0od Cc: 48796@debbugs.gnu.org Received: via spool by 48796-submit@debbugs.gnu.org id=B48796.165169169216745 (code B ref 48796); Wed, 04 May 2022 19:15:02 +0000 Received: (at 48796) by debbugs.gnu.org; 4 May 2022 19:14:52 +0000 Received: from localhost ([127.0.0.1]:43767 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nmKSa-0004M1-2T for submit@debbugs.gnu.org; Wed, 04 May 2022 15:14:52 -0400 Received: from mail-ed1-f66.google.com ([209.85.208.66]:37650) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nmKSX-0004Lj-KD for 48796@debbugs.gnu.org; Wed, 04 May 2022 15:14:50 -0400 Received: by mail-ed1-f66.google.com with SMTP id k27so2792385edk.4 for <48796@debbugs.gnu.org>; Wed, 04 May 2022 12:14:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:subject:from:to:cc:date:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=biyFoErU9taUG0cQNooAwSS9s5ny2LT7Ry/FnvkE0CI=; b=dwhwjTGXGqzr40buBSZWr9N8KE9runYrx5bSHi+F2KL2SqUMmY9vqiU4ByAcKp+SbJ KtOa0Q69e2aZboTyoS3F4BmDidjTupD8UhJLS1JLMyJopJ9neZ6QCtps5q8pRj8c2Dv0 2eQ57bb+K7tt3e1h6sZyF5uQcvsNGvu0zv6xFk4eSnQHOuKQwSGaKu7ILdrn1WdB4B8V bUeC6mEx0cEApCVmYHDW+wawQtgTgY7AXb5hduG/gpZWa8xinRvRsTf0ezkMQJ3AFfDF W64ZICjfAKdzeJsKy4epvsM0oe+/vueGg5oNUQkLxqJSxqDbl+/jyGUazq7a8B9p3uBF CelA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=biyFoErU9taUG0cQNooAwSS9s5ny2LT7Ry/FnvkE0CI=; b=ZG2X1IGp47PfVb7TaideKZOiHjWACIBNbix4j0GkgTaDjKhHJj8ppR4zZ3ZsXQ3Bd4 bSpZPgpqogqEdkXW2l1lNgKAI8HF57y2DROpz0Cl+mSZ1zR36iYyzxgofBspg49jb9sP BOMWzWUNG5pcRiALmAlR5afZGH6Ge6+m2InKIFnr9VviO/CINAeYCES6UcbKKdz2zaMg ht3wYWRbRMOK3YJCM2cdVPCdRetyStbFd0goYk4802cW3MO3wkOTI33a91U82YxIFdWK xSnzNiapUOw1l1V814ddq9+Z8+GLmWtfjOvfRyZFnUEutHKvIiZTqWbPFWV+tSkrC2jx vkHw== X-Gm-Message-State: AOAM532RWuVpKK67Egz3N3r23VQoWbk1EhnIfl1go+JmUhxoJx4q3TUW AfSNExmHA+/X6PjIt3Mpzn4= X-Google-Smtp-Source: ABdhPJwEovEGrELPcrz7SXqSDxXZO6QarHONV1qKswUb2ILelXIyMrZ/7zWAFlYnO6HLA1Ege/vPGg== X-Received: by 2002:a50:ee11:0:b0:425:b5b3:a48d with SMTP id g17-20020a50ee11000000b00425b5b3a48dmr25169652eds.246.1651691683457; Wed, 04 May 2022 12:14:43 -0700 (PDT) Received: from nijino.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id eb7-20020a170907280700b006f3ef214e46sm6066015ejc.172.2022.05.04.12.14.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 May 2022 12:14:42 -0700 (PDT) Message-ID: From: Liliana Marie Prikler Date: Wed, 04 May 2022 21:14:40 +0200 In-Reply-To: <871qxcf6ak.fsf@xelera.eu> References: <87zgs3jxvr.fsf@gmail.com> <87pml1gpw8.fsf@xelera.eu> <59eff3512f8726c4ac0ee4071d878536b197d31f.camel@gmail.com> <871qxcf6ak.fsf@xelera.eu> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" 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=1651691712; 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=biyFoErU9taUG0cQNooAwSS9s5ny2LT7Ry/FnvkE0CI=; b=NRKxRSK2KZp5VxcUGI/JNSDDkNj6FdwFxTdXwlCsdA1p6Eszzc41YhmGW+w1Vn2a/YPrWD 1USonc/fbLN2LJCJg+S/yuRvKcQh5ecI4CKQ2A59qqrNKaDi/E8ei543QZNCxOS2cYVzkt AW/EoEJV/JDx/NbM9oN1FREYo0eU08dMsg9Y0LXJ25XjFMH+dV2aoCpEpPOWc82CAtUOLP THUKpb9ZpLHNYuB06tJhgGyK9rUFYET3xfYW43uxB4N5lYEFWThWK4Oil88WPcLfYBjoBn fXfPDmRlxdXqSU5nXWAcvMX4WWXRy3eYmJJIk3OYsJgtERMnPwz8coRwLsVCzw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1651691712; a=rsa-sha256; cv=none; b=gOQZI617o4j0DpwsZCSokBmEcQl37Q+0SvcAz32f0Dsp/hMz4p+aHi87Vewegk5TRjppwK 8BmWkpOpW96O436uuarNN2eTD3XPUvhHjipqF1qc6ngF8wqxhrkuqNqVGLMJHosKjdRo6o Q3zqiLwIq9M+FnNimhOQSnacrcyHcS9MdmcpeQOLMXGb62q5oWIJDt7wsNtiVOy8ny9vhI aK5ENssLZZ7Ox43gSM4fYMWPfJXc/XfFLwBVOj/t5OG+0vFpG00HtNF2FMG4NvInUikQRf O7JkXEXrFk6AmfJ0fTfuyBcW935HvMNBEtHr7TyPW8IrW+aiAUu4J92gbA+dew== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=dwhwjTGX; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 6.22 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=dwhwjTGX; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: A64532E0CD X-Spam-Score: 6.22 X-Migadu-Scanner: scn0.migadu.com X-TUID: 8qEye90JYSM2 Am Montag, dem 02.05.2022 um 14:49 +0200 schrieb Giovanni Biscuolo: > Hi Liliana Marie, Hi Giovanni, sorry for the late reply. It seems my slowness caused you to investigate things on your own, which might have prompted some wrong conclusions. > I just think that if Guix (the package manager) cannot automate > desktop integration on all foreign distros then it should be stated > in the manual, possibly explaining why and pointing users to the > foreign distro documentation. Fair point and I agree (and even submitted a documentation patch once already), but this problem hits a great many applications and can not easily be described in all of its failure modes. > To add a little bit of context (and highlight it's not an issue just > for Guix as a package manager) I found this bug reports interesting: > > 1. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=927907 > flatpak directories not added to XDG_DATA_DIRS on Plasma + Wayland > (still open, last update 2022-04-16) > > 2. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=931776 > snapd: Installed snaps do not appear in desktop launcher in Debian > buster. (still open, last update 2022-04-22) > > 3. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=647427 > XDG_DATA_DIRS not set when using openbox-gnome-session > (resolved on 2013-07-23) > This seems to be a rather Debian-specific issue then. Note that Ubuntu Focal Fossa (and probably later Ubuntus) don't experience these issues because Ubuntu worked around them so that they can ship snaps by default. If I wanted to look at this more closely, it'd make sense then to look at the difference between a basic Debian installation and a basic Ubuntu installation and check what they do differently w.r.t. flatpak and snap. > > > > It even set XDG_DATA_DIRS, which should allow integration with > > > > the GNOME Shell and other graphical dashboards. > > > > > > No: this does not work, for three reasons: > > > > > > 1. AFAIU "/etc/profile.d/guix.sh" or "~/.profile" are not > > > sourced/executed in a graphical session (graphical shell?), we > > > need to ~/.xsessionrc to configure that environment: am I wrong? > > Depends on your setup.  Some systemd setups don't source it, > > So it depends on the /default/ systemd setup of the foreign distro, > Debian 11 in this case, because I did not customize it: please do you > know where I should check for the systemd specific documentation on > "xdg related stuff"? There are two things you need to look up. First, how to modify environment variables systemd services, and second which service is actually the one launching your session. Once you have both, you can add an override, that starts it with your environment variables. I'm not sure if you can tell systemd to "please source my ~/.profile.sh or similar" easily, but that'd also be an option. > makes me wonder what (and why) is the differenxe betweeen a Gnome > Session and an LXDE one: shouldn't the setup be standard? It's the > systemd specific way to setup an xsession? What do you mean by standard? The standard way of spawning a process in Unix is fork() followed by exec(). All the shell interpreting in between if you're using a bash-based flow is merely convenience. > > > but note that you can work around that by editing the offending > > file. > > Please can you point me to the offending file? I don't sit on your computer and know too little about your setup to do so. You can try various debugging techniques to find out which files affect your environment variables in a graphical session. > > More importantly... > > > > > 2. XDG_DATA_DIRS gets someway hard reset by "something" to this > > > value: > > > > > > XDG_DATA_DIRS=/usr/local/share:/usr/share:/usr/share/gdm:/var/lib > > > /men > > > u- > > > xdg:/usr/local/share/:/usr/share/:/usr/share/gdm/:/var/lib/menu- > > > xdg/ > > I would investigate what actually "resets" this.  If it survives > > XDG_DATA_DIRS=blah $SHELL, then it's in the stuff your shell > > sources. > > Actually if I give that command in a terminal I get > "XDG_DATA_DIRS=blah", but I'm pretty sure there is nothing in the > stuff of my shell sources that resets XDG_DATA_DIRS Great. This means there is actually no resetting at all, your code to set XDG_DATA_DIRS simply isn't evaluated at all and thus the variable retains its default value, which is probably set somewhere internal to systemd or the desktop manager. > > If it doesn't, then you probably just experience (1). > > Yes: there is something in the default systemd/xsession configuration > of Debian 11 that resets XDG_DATA_DIR. No, there isn't. It not being set doesn't mean that something's resetting it, it can also mean the code to set it is not run. Since we spawned a new shell and found the value unchanged, that is exactly what's happening. > Please is there some user with a default Debian 11 xsession > configuration that can try to reproduce this? > > Am I the only one to experience this XDG_DATA_DIR reset issue? While I haven't experienced this with XDG_DATA_DIRS in particular, I know the issue itself. However, I'm not sure if I'm getting across what's behind it. As noted above, the issue appears to be more or less specific to Debian, as other distros tackle related problems w.r.t. flatpak and snap and those solutions work for Guix too. > > > 1. is that also a cross-distro standard? Probably not to the extent you're hoping. I'd hazard a guess that every window manager more or less rolls their own implementation, which basically boils down to watching for changes in a certain directory. > 2. why "xdg-desktop-menu forceupdate" does not work for user > installed *.desktop menus? Probably because your environment variables are borked. > 3. is there any other CLI that allows users to uptate their graphical > menus after having "manually installed" (write the right file in the > right folder) a *.desktop file? Not afaik. > > > [...] > > > The main point of this workaround is that I configure > > > XDG_DATA_HOME, described in the specifications: > > And that is evil. > > Please can you expand what do you mean with "evil"? I don't need to, you already found out yourself. > [...] > Reading the above it seems perfectly legit to customize XDG_DATA_HOME > pointing that variable to any user directory I need to add custom > GUIX menu entries... and I let handle that menu entries to my guix > profile: do I miss something? You already found out, but to repeat: yes. > Should I also customize $XDG_CONFIG_HOME to point to a specific > directory different from $HOME/.config? No, unless you know what you're doing and/or are testing an application that should not write to your actual configuration files. > > > > > [...] > > > Anyway to make the new installed *.desktop files appear in the > > > menu, I have to logout and login again: I've still not found a > > > command (or configuration) to update the menu, "xdg-desktop-menu > > > forceupdate" does not work. > > Should it?  It might only honor XDG_DATA_DIRS and ignore > > XDG_DATA_HOME by accident. > > AFAIU xdg-desktop-menu is supposed to also update user menus As per the XDG spec, XDG_DATA_DIRS is a preference-ordered PATH consisting of directories to search for XDG_DATA. XDG_DATA_HOME not being included in it is a violation of the XDG spec. > > Other than that, restarting your shell (if running on X) might be a > > more lightweight way of refreshing the menu. > > Restarting the shell means restarting the desktop environment? > > I know how to do it with i3 (reload config) but I don't know hot to > do it with LXDE (or mate, Gnome3, ecc.) r RET, or Alt+F2 r Return if you prefer this style of writing keybindings. In either case, that's the GNOME binding, but Mate should have the same. (Don't know about LXDE.) Cheers