My favorites | Sign in
Logo
             
New issue | Search
for
| Advanced search | Search tips
Issue 30: WMII assumes installed binary path is on the user's installation path
3 people starred this issue and may be notified of changes. Back to list
Status:  New
Owner:  ----
Type-Defect
Priority-Medium


Sign in to add a comment
 
Reported by morrisde, May 23, 2008
What steps will reproduce the problem?
1. Before compilation, edit config.mk
2. Change PREFIX to a non-standard location (e.g.
/usr/local/wmii/snap-20080520)
3. Compile and install wmii
4. Edit user's login shell so that the WMII install path is NOT in the PATH
variable. (e.g. in .zshenv "PATH=/usr/bin:/usr/local/bin").
5. Start wmii (/usr/local/wmii/snap-20080520/bin/wmii)

What is the expected output? What do you see instead?

Following the above steps, wmii will not run because it relies on many
applications being in the install path.

What version of the product are you using (wmii -v)? On what operating system?

WMII Version: wmii-20080520, ©2007 Kris Maglione
OS Version: Debian Lenny

Please provide any additional information below.

This bug can be worked around by the following steps:

1. Add the WMII install path to the PATH variable before running WMII
2. Define the user's PATH environment variable recursively (e.g.
PATH="my_new_path_addition":${PATH})

This is sometimes a bad idea for the following reasons:

1. Some proprietary applications are VERY picky about the order of
directories in the PATH environment variable and must not have PATH defined
recursively (which will invalidate the carefully defined PATH in sub-shells).

2. Every sub-shell duplicates the user's modifications to the PATH
environment variable which can potentially alter the order of the PATH
variable (which can sometimes cause problems by running an application from
an unexpected location).

A better solution would be to make all WMII internal code use the
PREFIX/bin path defined in config.mk when running applications.
Comment 1 by maglion...@gmail.com, May 24, 2008
I'll think about it, but I don't agree. It's very common for applications to assume
that their executables are in $PATH. wmii, in particular, needs wmiir in its path for
wmiirc and rc.wmii to work. Other than this, the only assumption is that wmiistartrc
is in $PATH, which may not be necessary. I have no intention of removing the
requirement that wmiir is in $PATH at runtime.
Comment 2 by sqweek, May 28, 2008
 Assuming it is in PATH is fine. I have a further problem here, which is that wmii
launches wmiirc in a login shell, which have a tendency to clobber PATH. Which makes
it next to impossible to run a different version of wmii for testing, since any
temporary PATH changes I make are lost.
-sqweek
Sign in to add a comment

Hosted by Google Code