Re: Summary: FVWM: Changing desktop color.

From: sbuntin <sbuntin_at_calweb.com>
Date: Sun, 8 Dec 1996 21:00:59 -0800 (PST)

On Sat, 7 Dec 1996, Mike A. Harris wrote:

> Mike A. Harris wrote:
> >
>
> To Everyone:
> Thanks very much for the plethora of replys that I received concerning
> some sort of on-screen notification of being connected to my ISP while
> in X. The onscreen color change seemed to be the easiest, and I think
> the most useful and visible. I chose the 'xsetroot' method and it works
> absolutely fantastic!

Wonderful idea. I just came home, only to find that I'd left my ppp
link up and running for the last two hours. Guess I'd better change
to an unmetered account. :>

>
> Here is what I ended up with:
> [Bottom line of /etc/ppp/ip-up
> xsetroot -solid orange -d :0
>
> [Bottom line of /etc/ppp/ip-down
> xsetroot -solid navyblue -d :0

You might want to make this a bit cleaner by testing for a running
X before changing root - One of these days, you might end up with
an xsetroot that likes to barf, instead of dying gracefully.

[ -f /var/run/server.0.pid ] && xsetroot -solid <and so forth>

That works for me - I'm running Xaccel. I don't know if XFree or
MetroX use the same pidfile. I think so, but...

>
> Now the only problem is that if I quit X while logged on to my provider,
> and then start it up again (more accurately: when Netscape 3.01 CRASHES
> MY ENTIRE X SESSION and I have to restart it) the window is back to it's
> default blue color.
>
> Two problems:
> 1) I've changed the default color of the root window in .xinitrc with
> 'xsetroot -solid navyblue' however when X starts up the screen
> goes navy blue, and then 4 seconds later when fvwm starts, the
> screen reverts to the original (unknown) color. I would like
> to
> permanently change the root window's default color in .fvwmrc95
> if possible(or wherever it is stored). Can anyone help?

Hmm. I'm guessing here - it sounds like there's something either
in InitFunction or RestartFunction that's changing your root color,
or possibly a Style *root* command? Find it, dump it. :>

Does fvwm95 change your root color on a normal start, or just when
restarting after an NS crash?

>
> 2) What can I put in .xinitrc to test wether or not I'm online and
> if I am then set the window to orange, otherwise set it to
> navyblue?
> My scripting abilities are not yet to the point where I can
> figure out stuff like this easily.
>

Tell me about it. :>

Here's a quick modification of a line I use to get mail if my link
is up -

[ -f /var/run/ppp0.pid ] && xsetroot -solid orange -d :0

# Tests for presence of pppd's pidfile - It's worked for
# me so far. You might have to change the /var/run location,
# if your setup is different.

If you put that in after the xsetroot...blue command, you'll be all
set. Either that, or you can yank the xsetroot...blue and take
care of the whole thing in an if-then.

if [ -f /var/run/ppp0.pid ] ; then
   xsetroot -solid orange -d :0
else
   xsetroot -solid navyblue -d :0
fi

Now that I've spouted off, I'd better test these things...


--
Scott Buntin


--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_hpc.uh.edu.
To report problems, send mail to fvwm-owner_at_hpc.uh.edu.
Received on Sun Dec 08 1996 - 23:03:01 GMT

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:37:59 BST