Subject: FVWM: 2.4 -> 2.5 upgrade question

From: Jim Kleck <[email-masked]>
Date: Wed, 12 Jan 2005 17:36:31 -0800

I have upgraded from 2.4.17 to 2.5.12. In 2.4.17
I was able to use env variables directly in .fvwmrc,
for example:

*FvwmButtons: (Frame 2, Title $[HOST], Icon xterm.xpm, Action Exec 
"$[HOST]" exec /usr/bin/X11/xterm -geometry 80x60 -sb -sl 500 -j -ls -fn 
6x13 -T $HOST -n $HOST &)
read ConfigFvwmButtons.$[HOST]

which gave me a button with the host's name and read in
more buttons depending on the host's name. This allowed me
to run fvwm on several hosts using a network file system, and
the buttons could be customized for each host. Now on 2.5.12,
"$[HOST]" is not substitued. Has this functionality changed,
and is it available via some other means? Or must I go back
to 2.4.17 (or rather 2.4.19)?

Note that I also went from RedHat9 to Debian at the same time.

JimK

--
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: Scott Smedley <[email-masked]>
Date: Thu, 13 Jan 2005 14:32:37 +1100

Hi Jim,

> read ConfigFvwmButtons.$[HOST]

I suspect your problem is that you do not have a HOST _environment_
variable. On my system, HOST is a local _shell_ variable, & (by definition)
not inherited by child processes.

To see if HOST was an environment variable or merely a shell
variable I did this:

env | /bin/grep -a ^HOST=
set | /bin/grep -a ^HOST=

I added this line to my ~/.zshenv file:

export HOSTNAME=${$(uname -n)%%.*}

& used $[HOSTNAME] in my .fvwm2rc file.

You might need to use slightly different syntax/files if you don't use zsh.

Hope that helps.

SCoTT. :)

---

From: James Kleck <[email-masked]>
Date: Mon, 24 Jan 2005 15:05:40 -0800

Just for closure, I wanted to share what I found. As I said
in my original post, I had changed from RH9 to debian at the
same time that I upgraded fvwm. Under RH9 I had disabled the
graphical login screen and just ran a "startx" script once I
logged in (I forget why I had set it up that way). On debian
I had left the graphical login screen (gdm) enabled, and thus
X was being started from somewhere other than my userid, thus
my shell was not being run prior to starting X... thus $HOST
was not setup to any value. I have not found a way to get gdm
to set env vars and use an .Xdefaults, but I have disabled
gdm and now manually start X and fvwm and everything works.

JimK