unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#18698: Our WindowMaker wrapper pollutes PATH in the entire X session
@ 2014-10-13  0:48 Mark H Weaver
  2014-11-13  7:59 ` Ludovic Courtès
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Mark H Weaver @ 2014-10-13  0:48 UTC (permalink / raw)
  To: 18698

We install a wrapper script around WindowMaker that prepends
/gnu/store/XXX-windowmaker-XXX/bin to $PATH.  This setting is propagated
to all subprocesses in the entire X session, which is suboptimal.  It
would be nice to find another solution, preferably by using absolute
pathnames when launching subprocesses run by WindowMaker.

      Mark

^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#18698: Our WindowMaker wrapper pollutes PATH in the entire X session
  2014-10-13  0:48 bug#18698: Our WindowMaker wrapper pollutes PATH in the entire X session Mark H Weaver
@ 2014-11-13  7:59 ` Ludovic Courtès
  2015-02-10 11:01 ` Ricardo Wurmus
  2020-10-13 14:43 ` Maxim Cournoyer
  2 siblings, 0 replies; 8+ messages in thread
From: Ludovic Courtès @ 2014-11-13  7:59 UTC (permalink / raw)
  To: Mark H Weaver; +Cc: 18698-done

Mark H Weaver <mhw@netris.org> skribis:

> We install a wrapper script around WindowMaker that prepends
> /gnu/store/XXX-windowmaker-XXX/bin to $PATH.  This setting is propagated
> to all subprocesses in the entire X session, which is suboptimal.  It
> would be nice to find another solution, preferably by using absolute
> pathnames when launching subprocesses run by WindowMaker.

Fixed in be05e64.

Ludo’.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#18698: Our WindowMaker wrapper pollutes PATH in the entire X session
  2014-10-13  0:48 bug#18698: Our WindowMaker wrapper pollutes PATH in the entire X session Mark H Weaver
  2014-11-13  7:59 ` Ludovic Courtès
@ 2015-02-10 11:01 ` Ricardo Wurmus
  2015-02-11 12:32   ` 宋文武
  2020-10-13 14:43 ` Maxim Cournoyer
  2 siblings, 1 reply; 8+ messages in thread
From: Ricardo Wurmus @ 2015-02-10 11:01 UTC (permalink / raw)
  To: 18698

The fix may have resulted in unintended side-effects.  On a fresh
installation of the System Distribution v0.8.1 WindowMaker is installed
by default, but it is not completely functional.

For example, the attempt to change the style via the menu results in
this error to be displayed:

    Could not execute command:
        setstyle /gnu/store/...windowmaker.../share/WindowMaker/Styles/Black.style

Likewise, selecting "Configure Window Maker" from the right-click menu
results in this error:

    Could not execute command: exec WPrefs

The "setstyle" executable is located in
/gnu/store/...windowmaker.../bin/, but is not in the PATH.

~~ Ricardo

^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#18698: Our WindowMaker wrapper pollutes PATH in the entire X session
  2015-02-10 11:01 ` Ricardo Wurmus
@ 2015-02-11 12:32   ` 宋文武
  2015-02-12 20:15     ` Ludovic Courtès
  0 siblings, 1 reply; 8+ messages in thread
From: 宋文武 @ 2015-02-11 12:32 UTC (permalink / raw)
  To: 18698

Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> writes:

> The fix may have resulted in unintended side-effects.  On a fresh
> installation of the System Distribution v0.8.1 WindowMaker is installed
> by default, but it is not completely functional.
>
> For example, the attempt to change the style via the menu results in
> this error to be displayed:
>
>     Could not execute command:
>         setstyle /gnu/store/...windowmaker.../share/WindowMaker/Styles/Black.style
>
> Likewise, selecting "Configure Window Maker" from the right-click menu
> results in this error:
>
>     Could not execute command: exec WPrefs
>
> The "setstyle" executable is located in
> /gnu/store/...windowmaker.../bin/, but is not in the PATH.
Yes, the $out/bin of windowmaker is not in $PATH, and same for sawfish.

Instead of wrapping every executable of session-type, we can:

#1: Add the package to system profile ('packages').
  It's not clear to me how to do it now, until we have something
  like the NixOS's module system.

#2: Make SLiM use '/run/current-system/profile/share/xsessions' as
    session_dir.
  So simply add a package providing xsession file to 'packages' should
  make it available to SLiM.  And all DE and many window-managers provide
  xsession files already (eg: openbox, sawfish, xfce), we can patch
  the rest (eg: WindowMaker) to install one.

I would like to go #2, WDYT?

^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#18698: Our WindowMaker wrapper pollutes PATH in the entire X session
  2015-02-11 12:32   ` 宋文武
@ 2015-02-12 20:15     ` Ludovic Courtès
  2015-02-14  5:22       ` 宋文武
  0 siblings, 1 reply; 8+ messages in thread
From: Ludovic Courtès @ 2015-02-12 20:15 UTC (permalink / raw)
  To: 宋文武; +Cc: 18698

宋文武 <iyzsong@gmail.com> skribis:

> Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> writes:
>
>> The fix may have resulted in unintended side-effects.  On a fresh
>> installation of the System Distribution v0.8.1 WindowMaker is installed
>> by default, but it is not completely functional.
>>
>> For example, the attempt to change the style via the menu results in
>> this error to be displayed:
>>
>>     Could not execute command:
>>         setstyle /gnu/store/...windowmaker.../share/WindowMaker/Styles/Black.style
>>
>> Likewise, selecting "Configure Window Maker" from the right-click menu
>> results in this error:
>>
>>     Could not execute command: exec WPrefs
>>
>> The "setstyle" executable is located in
>> /gnu/store/...windowmaker.../bin/, but is not in the PATH.
> Yes, the $out/bin of windowmaker is not in $PATH, and same for sawfish.
>
> Instead of wrapping every executable of session-type, we can:
>
> #1: Add the package to system profile ('packages').
>   It's not clear to me how to do it now, until we have something
>   like the NixOS's module system.

What I have in mind is to add a ‘packages’ field in ‘service’.  That
would allow service implementations to contribute packages to the global
profile.  Thoughts?

> #2: Make SLiM use '/run/current-system/profile/share/xsessions' as
>     session_dir.
>   So simply add a package providing xsession file to 'packages' should
>   make it available to SLiM.  And all DE and many window-managers provide
>   xsession files already (eg: openbox, sawfish, xfce), we can patch
>   the rest (eg: WindowMaker) to install one.

IIUC the bug initially reported here would remain: the user’s $PATH
would be polluted with the window manager’s stuff, no?

Thanks,
Ludo’.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#18698: Our WindowMaker wrapper pollutes PATH in the entire X session
  2015-02-12 20:15     ` Ludovic Courtès
@ 2015-02-14  5:22       ` 宋文武
  2015-03-01 14:39         ` Ludovic Courtès
  0 siblings, 1 reply; 8+ messages in thread
From: 宋文武 @ 2015-02-14  5:22 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 18698

Ludovic Courtès <ludo@gnu.org> writes:

> 宋文武 <iyzsong@gmail.com> skribis:
>
>> Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> writes:
>>
>>> The fix may have resulted in unintended side-effects.  On a fresh
>>> installation of the System Distribution v0.8.1 WindowMaker is installed
>>> by default, but it is not completely functional.
>>>
>>> For example, the attempt to change the style via the menu results in
>>> this error to be displayed:
>>>
>>>     Could not execute command:
>>>         setstyle /gnu/store/...windowmaker.../share/WindowMaker/Styles/Black.style
>>>
>>> Likewise, selecting "Configure Window Maker" from the right-click menu
>>> results in this error:
>>>
>>>     Could not execute command: exec WPrefs
>>>
>>> The "setstyle" executable is located in
>>> /gnu/store/...windowmaker.../bin/, but is not in the PATH.
>> Yes, the $out/bin of windowmaker is not in $PATH, and same for sawfish.
>>
>> Instead of wrapping every executable of session-type, we can:
>>
>> #1: Add the package to system profile ('packages').
>>   It's not clear to me how to do it now, until we have something
>>   like the NixOS's module system.
>
> What I have in mind is to add a ‘packages’ field in ‘service’.  That
> would allow service implementations to contribute packages to the global
> profile.  Thoughts?
It's fine, but we may also need a 'dbus-service' field (for wicd).
>
>> #2: Make SLiM use '/run/current-system/profile/share/xsessions' as
>>     session_dir.
>>   So simply add a package providing xsession file to 'packages' should
>>   make it available to SLiM.  And all DE and many window-managers provide
>>   xsession files already (eg: openbox, sawfish, xfce), we can patch
>>   the rest (eg: WindowMaker) to install one.
>
> IIUC the bug initially reported here would remain: the user’s $PATH
> would be polluted with the window manager’s stuff, no?
I think the 'polluted' means we have a $PATH contains:
  /gnu/store/xxx-windowmaker/bin
install it to profile doesn't have this issue.
>
> Thanks,
> Ludo’.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#18698: Our WindowMaker wrapper pollutes PATH in the entire X session
  2015-02-14  5:22       ` 宋文武
@ 2015-03-01 14:39         ` Ludovic Courtès
  0 siblings, 0 replies; 8+ messages in thread
From: Ludovic Courtès @ 2015-03-01 14:39 UTC (permalink / raw)
  To: 宋文武; +Cc: 18698

宋文武 <iyzsong@gmail.com> skribis:

> Ludovic Courtès <ludo@gnu.org> writes:
>
>> 宋文武 <iyzsong@gmail.com> skribis:
>>
>>> Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> writes:
>>>
>>>> The fix may have resulted in unintended side-effects.  On a fresh
>>>> installation of the System Distribution v0.8.1 WindowMaker is installed
>>>> by default, but it is not completely functional.
>>>>
>>>> For example, the attempt to change the style via the menu results in
>>>> this error to be displayed:
>>>>
>>>>     Could not execute command:
>>>>         setstyle /gnu/store/...windowmaker.../share/WindowMaker/Styles/Black.style
>>>>
>>>> Likewise, selecting "Configure Window Maker" from the right-click menu
>>>> results in this error:
>>>>
>>>>     Could not execute command: exec WPrefs
>>>>
>>>> The "setstyle" executable is located in
>>>> /gnu/store/...windowmaker.../bin/, but is not in the PATH.
>>> Yes, the $out/bin of windowmaker is not in $PATH, and same for sawfish.
>>>
>>> Instead of wrapping every executable of session-type, we can:
>>>
>>> #1: Add the package to system profile ('packages').
>>>   It's not clear to me how to do it now, until we have something
>>>   like the NixOS's module system.
>>
>> What I have in mind is to add a ‘packages’ field in ‘service’.  That
>> would allow service implementations to contribute packages to the global
>> profile.  Thoughts?
> It's fine, but we may also need a 'dbus-service' field (for wicd).

Hmm right.  And dbus policy, and policykit something, and...

Clearly the NixOS way where each service can change anything in the
global config makes it easy; we need to find a middle ground where we
don’t end up allowing services to do anything.  Food for thought...

>>> #2: Make SLiM use '/run/current-system/profile/share/xsessions' as
>>>     session_dir.
>>>   So simply add a package providing xsession file to 'packages' should
>>>   make it available to SLiM.  And all DE and many window-managers provide
>>>   xsession files already (eg: openbox, sawfish, xfce), we can patch
>>>   the rest (eg: WindowMaker) to install one.
>>
>> IIUC the bug initially reported here would remain: the user’s $PATH
>> would be polluted with the window manager’s stuff, no?
> I think the 'polluted' means we have a $PATH contains:
>   /gnu/store/xxx-windowmaker/bin
> install it to profile doesn't have this issue.

Right, but WindowMaker is not necessarily in the user’s profile.

Still, maybe the initial solution, which added WindowMaker to $PATH, is
the least undesirable solution.

Thoughts?

Ludo’.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#18698: Our WindowMaker wrapper pollutes PATH in the entire X session
  2014-10-13  0:48 bug#18698: Our WindowMaker wrapper pollutes PATH in the entire X session Mark H Weaver
  2014-11-13  7:59 ` Ludovic Courtès
  2015-02-10 11:01 ` Ricardo Wurmus
@ 2020-10-13 14:43 ` Maxim Cournoyer
  2 siblings, 0 replies; 8+ messages in thread
From: Maxim Cournoyer @ 2020-10-13 14:43 UTC (permalink / raw)
  To: Mark H Weaver; +Cc: 18698-done

Hello,

Mark H Weaver <mhw@netris.org> writes:

> We install a wrapper script around WindowMaker that prepends
> /gnu/store/XXX-windowmaker-XXX/bin to $PATH.  This setting is propagated
> to all subprocesses in the entire X session, which is suboptimal.  It
> would be nice to find another solution, preferably by using absolute
> pathnames when launching subprocesses run by WindowMaker.
>
>       Mark

I tested with the following modifications to our lightweight-desktop
template:

--8<---------------cut here---------------start------------->8---
modified   gnu/system/examples/lightweight-desktop.tmpl
@@ -2,6 +2,7 @@
 ;; for a "desktop" setup without full-blown desktop
 ;; environments.

+(use-modules (gnu packages gnustep))
 (use-modules (gnu) (gnu system nss))
 (use-service-modules desktop)
 (use-package-modules bootloaders certs ratpoison suckless wm xorg)
@@ -42,7 +43,7 @@
   ;; the log-in screen with F1.
   (packages (append (list
                      ;; window managers
-                     ratpoison i3-wm i3status dmenu
+                     windowmaker
                      ;; terminal emulator
                      xterm
                      ;; for HTTPS access
--8<---------------cut here---------------end--------------->8---

And I cannot reproduce this.  I believe the fix Ludo did 6 years ago in
be05e643ae4d62dc25aa88b7fbdb0eae9cf10eb0 combined with the use of a
xsession file added in commit 537fe4568f4 by Kei resolved this issue for
good.

Closing.

Thanks,

Maxim




^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-10-13 14:44 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-13  0:48 bug#18698: Our WindowMaker wrapper pollutes PATH in the entire X session Mark H Weaver
2014-11-13  7:59 ` Ludovic Courtès
2015-02-10 11:01 ` Ricardo Wurmus
2015-02-11 12:32   ` 宋文武
2015-02-12 20:15     ` Ludovic Courtès
2015-02-14  5:22       ` 宋文武
2015-03-01 14:39         ` Ludovic Courtès
2020-10-13 14:43 ` Maxim Cournoyer

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).