Subject: FVWM: Strange fvwm-related problems

From: Phil Stracchino <[email-masked]>
Date: Wed, 2 Jul 2003 17:37:11 -0400

I have a couple of curious fvwm-related problems which, after lengthy
examination, I am still unable to solve.

I use sirc as my IRC client, and icbm as my ICB client.  Both clients
are written in Perl, and both have the ability (via Perl functions
loaded from their startup files) to launch external applications.  In
particular, I commonly launch Xcoral, a graphical programming editor,
from both in order to edit their configuration files on the fly while
running (both can reload their configuration on the fly).

In icbm or sirc sessions started while running fvwm-1.24r, this works
perfectly.  If I start the clients under fvwm-1.24r and then switch to
fvwm-2.4.16, I can still launch Xcoral from within either.  But if the
clients were launched while fvwm-2.4.16 is running, all attempts to
launch xcoral or any other application that creates a window from within
either sirc or icbm silently fail, even if I switch bach to fvwm-1.24r  
and try to launch them.  However, executing any external command that
does not create a window still works.

Also, I use procmeter3 to monitor system status.  If started from 
fvwm-1.24r's InitFunction, it works perfectly.  If started from an Xterm 
while fvwm-2.4.16 is running, it works perfectly.  If started from 
fvwm-2.4.16's InitFunction, it loads and draws its window correctly, but 
none of its modules ever receive any data.

I have dumped and diffed the environment of a login and non-login shell
under both fvwm-1.24 and fvwm-2.4.16, and there is no significant
difference.  Witness the following diff:

babylon5:alaric:~:3 $ diff -U3 env*
--- env-fvwm1   Wed Jul  2 17:08:13 2003
+++ env-fvwm2   Wed Jul  2 17:09:52 2003
@@ -3,6 +3,7 @@
 HOSTNAME=babylon5.babcom.com
 SHELL=/bin/bash
 TERM=dumb
+FVWM_USERDIR=/home/alaric/.fvwm
 HOSTDISPLAY=babylon5:0.0
 QTDIR=/usr/lib/qt
 USER=alaric
@@ -22,4 +23,5 @@
 LESS=-M
 MOZILLA_HOME=/opt/netscape
 LESSOPEN=|lesspipe.sh %s
+FVWM_MODULEDIR=/usr/X11R6/libexec/fvwm/2.4.16
 DISPLAY=:0.0

As you can see, the only difference is the addition of FVWM_USERDIR and
FVWM_MODULEDIR to the environment by fvwm2.  The data for this
comparison was generated by the following two-line shell script, invoked
from InitFunction in each case:

#!/bin/bash
env > $1

Does anyone at all have any insight whatsoever as to the cause of these
problems?  I like the features of fvwm2, not least that window gravity
seems to work properly in fvwm2, but functional problems like this that
actually break the functioning of totally unrelated apps are really on
the verge of driving me back to fvwm1.  Sure, I like being able to have
marble-textured window decorations, but that's worthless if the
applications in the windows don't work because of something the window
manager is doing.

(Oh, and what's with fvwm2 on Solaris defaulting to utterly and totally
 ignoring ALL user window-manager configuration?)

-- 
 .*********  Fight Back!  It may not be just YOUR life at risk.  *********.
 : phil stracchino : unix ronin : renaissance man : mystic zen biker geek :
 :  [email-masked] : [email-masked] : [email-masked]  :
 :   2000 CBR929RR, 1991 VFR750F3 (foully murdered), 1986 VF500F (sold)   :
 :    Linux Now!   ...Because friends don't let friends use Microsoft.    :
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Mikhael Goikhman <[email-masked]>
Date: Wed, 2 Jul 2003 22:50:43 +0000

> none of its modules ever receive any data.

You didn't show any configuration, like definition of your InitFunction
or commands you use in sirc to open other application windows.

Please do this simple test. Start your fvwm-2.4.16 using this command:

  fvwm -c "AddToFunc InitFunction I Exec exec xterm -e sirc"

(place it into ~/.xinitrc or the equivalent)
Does sirc work like you expect even if started from InitFunction?

If yes, post your entire .fvwm2rc and we will try to find an error.
If no, try to do more experiments with a mininal configuration.

>  ignoring ALL user window-manager configuration?)

Please explain this question.

Do you mean Sun (or sysadmin) patched fvwm to ignore ~/.fvwm/.fvwm2rc
configuration file or something else?

Regards,
Mikhael.

---

From: Phil Stracchino <[email-masked]>
Date: Wed, 2 Jul 2003 20:21:47 -0400

> or commands you use in sirc to open other application windows.

Sorry for the omission.  I didn't include my InitFunction because I
wasn't starting sirc from InitFunction, and because the problem with
procmeter3 didn't seem specific to InitFunction -- the procmeter3
problem occurs whenever procmeter3 is started from fvwm2 by any means.

An example definition for sirc is as follows:

    my $rcdir = $ENV{'HOME'}.'/.sirc';

    sub cmd_edit
    {
        my $cmd = sprintf ('/usr/local/bin/xcoral %s &', $args);
        system ($cmd);
    }
    &addcmd("edit");

    &docommand("^alias rc edit ~/.sirc/sircrc.pl");

The equivalent definition for icbm is almost identical:

    my $rcdir = $ENV{'HOME'}.'/.icbm';

    sub edit
    {
        my $cmd = sprintf ('/usr/local/bin/xcoral %s &', @_);
        system ($cmd);
    }
    &addcmd('edit');

    &alias ('rc',   "edit $rcdir/commands");

> Does sirc work like you expect even if started from InitFunction?

This actually doesn't replicate my situation, because I'm not starting
sirc directly.  I open an xterm, and from that xterm I run a Perl script
which forks off a series of child processes, each of which spawns an
xterm and starts an sirc or icbm instance in it.  Normally I do not do
this from InitFunction because usually, when I log in and start fvwm, my
dialup isn't connected yet and there's no servers available for sirc or
icbm to connect to.  I also hadn't tried putting that script into
InitFunction because when I tried running the script from a menu in
fvwm-1.24r, it didn't work, and I was never able to figure out why.  The
script executed, but no windows ever appeared.

However, in accordance with your instructions, I tried adding the
following to InitFunction:

+		"I" Exec exec /home/alaric/bin/geek

And to my surprise, not only did it work, but the icbm and sirc
instances it started could launch external windowed apps without any
problems.  This mystifies me even more -- starting procmeter3 from
InitFunction breaks it, but running bin/geek from InitFunction makes
sirc and icbm work right?  Most peculiar, Holmes.

Based on this, I then tried adding my front-end script to an fvwm menu
as follows:

AddToMenu RootMenu	"Desktop Menu"	Title
+			"Geek!"		Exec exec /home/alaric/bin/geek

This worked too.  So, it seems whatever the problem is, I can work
around it (so long as I don't want to specify additional options) by
starting my front-end from fvwm; this still doesn't tell me what the
problem is, though, or enable me to start from an xterm and have
launching work.  It just occurred to me to try entering the command
using FvwmTalk, though, and that too works and yields a chat window from
which I can spawn windowed applications.

I've tried a few variations on these various themes trying to find a
similar workaround to the problem with procmeter3, with no success.
That's still a complete mystery to me.

> If no, try to do more experiments with a mininal configuration.

Attached.  I've also included my front-end script for starting icbm and
sirc in case it sheds any clues.

> configuration file or something else?

I take it this is NOT an expected occurrence.  Allow me to clarify,
therefore:

I downloaded fvwm-2.4.16 source and used it to build fvwm2 for this
machine (an Athlon XP1800 running a heavily-updated, Slackware-7.0-based
Linux).  I then performed a make distclean and used the exact same
source code, with as close as applicable to the exact same configuration
options, to build fvwm2 on an Ultra30 running Solaris 9.

The fvwm2 installation built on Linux honors all user configuration
files automatically, and just Does The Right Thing.  The fvwm2 built on
the Solaris machine defaults to ignoring all user configuration files
unless explicitly started as 'fvwm2 -f $HOME/.fvwm2rc'.  

I take it from your response this is not supposed to happen.  Is it
possible that the prior presence of the Sunfreeware fvwm-2.4.5 package
on the machine while configuring fvwm-2.4.16 (I removed the fvwm-2.4.5
package before fvwm-2.4.16's make install) could have an influence on
this?