diff mbox series

[bug#45062,1/2] gnu: xfce4-session: Fix xfce4-panel plugin detection.

Message ID 20201206050224.5355-1-kkebreau@posteo.net
State Accepted
Headers show
Series [bug#45062,1/2] gnu: xfce4-session: Fix xfce4-panel plugin detection. | expand

Checks

Context Check Description
cbaines/submitting builds success
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Kei Kebreau Dec. 6, 2020, 5:02 a.m. UTC
* gnu/packages/xfce.scm (xfce4-session)[source]: Add patch to append the path
to user-installed xfce4-panel plugins to the X_XFCE4_LIB_DIRS environment
variable.
* gnu/packages/patches/xfce4-session-xinitrc.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
---
 gnu/local.mk                                  |  3 ++-
 .../patches/xfce4-session-xinitrc.patch       | 19 +++++++++++++++++++
 gnu/packages/xfce.scm                         |  1 +
 3 files changed, 22 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/xfce4-session-xinitrc.patch

Comments

宋文武 Dec. 6, 2020, 6:50 a.m. UTC | #1
Kei Kebreau <kkebreau@posteo.net> writes:

> * gnu/packages/xfce.scm (xfce4-session)[source]: Add patch to append the path
> to user-installed xfce4-panel plugins to the X_XFCE4_LIB_DIRS environment
> variable.
> [...]
> +Ensure that xfce4 panel plugins in the user's Guix profile can
> +be found in the directories specified in X_XFCE4_LIB_DIRS.
> +
> +Partially fixes Guix bug #44916:
> +https://debbugs.gnu.org/cgi/bugreport.cgi?bug=44916.
>

Quote from #44916:
>> Aside from that, it seems like Xfce, when installed as a system-wide
>> desktop environment, does not look in the user's Guix profile for
>> plugins.  Panel modules are located by Xfce in the directories listed in
>> the X_XFCE4_LIB_DIRS environment variable.  For my Xfce configuration,
>> X_XFCE4_LIB_DIRS contains only /run/current-system/profile/lib/xfce4.

I think mix plugins from system and user profiles is a bad idea, the
system profile tend to be updated less than the user profile, so there
maybe some ABI problems between the xfce-panel in the system profile and
its plugins in the user profile due to mismatched versions.  

Does install both ‘xfce4-panel’ and ‘xfce4-whiskermenu-plugin’ into the
user profile works (hopeful a system xfce4 session will first pickup a
user installed xfce4-panel)?
Kei Kebreau Dec. 6, 2020, 7:55 p.m. UTC | #2
On Sun, 06 Dec 2020 14:50:32 +0800
宋文武 <iyzsong@outlook.com> wrote:

> Kei Kebreau <kkebreau@posteo.net> writes:
> 
> > * gnu/packages/xfce.scm (xfce4-session)[source]: Add patch to
> > append the path to user-installed xfce4-panel plugins to the
> > X_XFCE4_LIB_DIRS environment variable.
> > [...]
> > +Ensure that xfce4 panel plugins in the user's Guix profile can
> > +be found in the directories specified in X_XFCE4_LIB_DIRS.
> > +
> > +Partially fixes Guix bug #44916:
> > +https://debbugs.gnu.org/cgi/bugreport.cgi?bug=44916.
> >  
> 
> Quote from #44916:
> >> Aside from that, it seems like Xfce, when installed as a
> >> system-wide desktop environment, does not look in the user's Guix
> >> profile for plugins.  Panel modules are located by Xfce in the
> >> directories listed in the X_XFCE4_LIB_DIRS environment variable.
> >> For my Xfce configuration, X_XFCE4_LIB_DIRS contains only
> >> /run/current-system/profile/lib/xfce4.  
> 
> I think mix plugins from system and user profiles is a bad idea, the
> system profile tend to be updated less than the user profile, so there
> maybe some ABI problems between the xfce-panel in the system profile
> and its plugins in the user profile due to mismatched versions.  
> 
> Does install both ‘xfce4-panel’ and ‘xfce4-whiskermenu-plugin’ into
> the user profile works (hopeful a system xfce4 session will first
> pickup a user installed xfce4-panel)?

Installing both 'xfce4-panel' and 'xfce4-whiskermenu-plugin' into the
user profile does work!  Is there a way to make clear to users and
administrators that xfce4-panel and its plugins should both be
installed at the user or system level to ensure proper function?  I
don't think it's obvious since our Xfce desktop service implicitly
installs the xfce4-panel.
diff mbox series

Patch

diff --git a/gnu/local.mk b/gnu/local.mk
index cbfefccbb9..ca6d90cced 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -4,7 +4,7 @@ 
 # Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
 # Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Mark H Weaver <mhw@netris.org>
 # Copyright © 2016 Chris Marusich <cmmarusich@gmail.com>
-# Copyright © 2016, 2017, 2018 Kei Kebreau <kkebreau@posteo.net>
+# Copyright © 2016, 2017, 2018, 2020 Kei Kebreau <kkebreau@posteo.net>
 # Copyright © 2016, 2017 Rene Saavedra <rennes@openmailbox.org>
 # Copyright © 2016 Adonay "adfeno" Felipe Nogueira <https://libreplanet.org/wiki/User:Adfeno> <adfeno@openmailbox.org>
 # Copyright © 2016, 2017, 2018, 2019, 2020 Ricardo Wurmus <rekado@elephly.net>
@@ -1721,6 +1721,7 @@  dist_patch_DATA =						\
   %D%/packages/patches/xf86-video-tga-remove-mibstore.patch	\
   %D%/packages/patches/xf86-video-voodoo-pcitag.patch		\
   %D%/packages/patches/xfce4-panel-plugins.patch		\
+  %D%/packages/patches/xfce4-session-xinitrc.patch		\
   %D%/packages/patches/xfce4-settings-defaults.patch		\
   %D%/packages/patches/xmonad-dynamic-linking.patch		\
   %D%/packages/patches/xplanet-1.3.1-cxx11-eof.patch		\
diff --git a/gnu/packages/patches/xfce4-session-xinitrc.patch b/gnu/packages/patches/xfce4-session-xinitrc.patch
new file mode 100644
index 0000000000..914890ff3d
--- /dev/null
+++ b/gnu/packages/patches/xfce4-session-xinitrc.patch
@@ -0,0 +1,19 @@ 
+Ensure that xfce4 panel plugins in the user's Guix profile can
+be found in the directories specified in X_XFCE4_LIB_DIRS.
+
+Partially fixes Guix bug #44916:
+https://debbugs.gnu.org/cgi/bugreport.cgi?bug=44916.
+
+Patch by Kei Kebreau <kkebreau@posteo.net>
+
+--- xfce4-session-4.14.2/scripts/xinitrc.in.in.orig	2020-12-05 15:01:43.932285134 -0500
++++ xfce4-session-4.14.2/scripts/xinitrc.in.in	2020-12-05 15:22:06.171691694 -0500
+@@ -83,6 +83,8 @@
+   dbus-update-activation-environment --systemd XAUTHLOCALHOSTNAME=$XAUTHLOCALHOSTNAME
+ fi
+ 
++# load local Guix xfce4-panel plugins
++test -r "$HOME/.guix-profile/lib/xfce4" && export X_XFCE4_LIB_DIRS="$X_XFCE4_LIB_DIRS:$HOME/.guix-profile/lib/xfce4"
+ 
+ # check if we start xfce4-session with ck-launch-session. this is only
+ # required for starting from a console, not a login manager
diff --git a/gnu/packages/xfce.scm b/gnu/packages/xfce.scm
index 4090372805..685ddd3e18 100644
--- a/gnu/packages/xfce.scm
+++ b/gnu/packages/xfce.scm
@@ -684,6 +684,7 @@  your system in categories, so you can quickly find and launch them.")
               (sha256
                (base32
                 "1bwpylcn7x9i301yz45wvkzah9bncv9b44nf4hh9ln4i1jka9qzv"))
+              (patches (search-patches "xfce4-session-xinitrc.patch"))
               (modules '((guix build utils)))
               (snippet
                '(begin