Subject: FVWM: question about backgrounds

From: Eduardo Alvarez <[email-masked]>
Date: Wed, 9 Jul 2003 14:56:50 +0000

Hello, everyone,

I've been lurking for a while now, and have the following question:

I put a picture on the root window via the following:

xv -rmode 5 -quit -root ~/bgrounds/hchaos.png

I also start a transparent aterm via .xinitrc

now, the problem is that the transparent aterm doesn't acquire the root
image on startup.  If I place it on the .xinitrc file, It acquires the gray
pattern typical of a plain X root window.  If I place it on the .fvwm2rc
file, it catches a black background.  I figure that this has to do with the
time that it takes to load the image, but I have no clue how to synchronize
or otherwise make sure that the aterm acquires the right background.  Any
ideas on how could I solve this?

-- 
Eduardo Alvarez			http://www.great-atuin.net/~punga

"Stercus, stercus stercus, moriturus sum"
    			-- Rincewind the Wizard, "Interesting Times"
--
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: parv <[email-masked]>
Date: Wed, 9 Jul 2003 22:40:58 -0400

in message <[email-masked]>, wrote Eduardo
Alvarez thusly...
> now, the problem is that the transparent aterm doesn't acquire the
> root image on startup.

In ~/.xinitrc, try sleeping for a while before starting aterm...

  xv -quit -root <image> && sleep 2
  aterm

  - Parv

-- 
A programmer, budding Unix system administrator, and amateur photographer
seeks employment:  http://www103.pair.com/parv/work/

---

From: Mikhael Goikhman <[email-masked]>
Date: Thu, 10 Jul 2003 06:04:01 +0300

>   xv -quit -root <image> && sleep 2

The idea is ok, but the example lines are incorrect.
As it is written (running xv in foreground) it wastes 2 sec for nothing.
This would be more correct:

  (xv -quit -root <image> && aterm) &

Or:

  xv -quit -root <image> &
  (sleep 3 && aterm) &

Regards,
Mikhael.

---

From: Uwe Pross <[email-masked]>
Date: Thu, 10 Jul 2003 07:48:01 +0200

Hi there,

> I also start a transparent aterm via .xinitrc

I use "wmsetbg" to set the desktop background. It seems to
set the background in a different way to xv or fvwm-root
since it changes the background of aterm, gnome-terminal
automatically. 
It seems also to be stronger than xv and fvwm-root:

aterm -tr
wmsetbg image1.jpg
# aterm bg changes to image1.jpg
fvwm-root image2.jpg
# aterm still got image1.jpg
gnome-terminal --transparent
# gnome-terminal uses image1.jpg as background

Regards, Uwe
-- 
  ,_,  Uwe Pross
 (O,O) mailto:[email-masked]
 (   ) http://www.tu-chemnitz.de/~uwp
=-"-"-================================
--
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: Thu, 10 Jul 2003 14:21:32 +0300

> # aterm bg changes to image1.jpg

This would be a future invocation like, but currently fvwm-root does not
suport jpg. Supposing this is a type, you should use:

  fvwm-root -r image2.png

> # gnome-terminal uses image1.jpg as background

Then these terminals should use image2.png, I guess.

Regards,
Mikhael.

---

From: Uwe Pross <[email-masked]>
Date: Thu, 10 Jul 2003 15:17:05 +0200

Hi there,

> suport jpg. Supposing this is a type, you should use:

Okay, I did not try it with fvwm-root. To be sure I have
tried it now with

    convert image.jpg image.xpm
    fvwm-root image.xpm

But the result is the same.

> Then these terminals should use image2.png, I guess.

Just have a try ;-) You will see that gnome-applications as
gnome-terminal still use the old background.

Regards, Uwe

---

From: Mikhael Goikhman <[email-masked]>
Date: Thu, 10 Jul 2003 18:12:43 +0300

> But the result is the same.

But I wrote to add "-r", didn't I? :)

Regards,
Mikhael.

---

From: Uwe Pross <[email-masked]>
Date: Thu, 10 Jul 2003 17:18:24 +0200

Hi there,

> But I wrote to add "-r", didn't I? :)

Yes you did, I have overseen it. But the result is the same,
at least on my computer.

Regards, Uwe

---

From: Mikhael Goikhman <[email-masked]>
Date: Thu, 10 Jul 2003 18:28:02 +0300

> Yes you did, I have overseen it. But the result is the same,

Works for me. gnome-terminal does not support --transparent any more,
but --window-with-profile transparent (after creating profile) works.
aterm -tr automatically changes its background after "fvwm-root -r" too.

Regards,
Mikhael.

---

From: parv <[email-masked]>
Date: Thu, 10 Jul 2003 17:17:27 -0400

in message <[email-masked]>,
wrote Mikhael Goikhman thusly...
> The idea is ok, but the example lines are incorrect.  As it is
> written (running xv in foreground) it wastes 2 sec for nothing.

Why, sleep only if xv succeeds before starting aterm?

I gathered from OP that aterm was starting before xv could do its
thing.  So there should be some reasonable wait before aterm starts.
(See below before replying to this point.)

>   (xv -quit -root <image> && aterm) &

If for some reason, xv fails there would be /no/ aterm.  This would
be the least "correct" thing to do.

>   (sleep 3 && aterm) &

I like this much better than the above two versions for above
mentioned reasons.

Going off topic now...

I would change the last line to either of...

  sleep 3 && aterm &
  { sleep 3; aterm; } &

...Why start a sub shell, unless it is a shell specific workaround?

  - Parv

---

From: Mikhael Goikhman <[email-masked]>
Date: Fri, 11 Jul 2003 20:43:18 +0300

> (See below before replying to this point.)

This is a non principal discussion, but xv does not reforks itself to
background from foreground, so if xv is finished no futher wait is ever
needed. At least "xv -quit" is transient, so this first problem is not
critical, but aterm is not, so a more important (second) problem in these
lines is a missing ampersand after aterm.

> ...Why start a sub shell, unless it is a shell specific workaround?

The subshell syntax is portable. As for the last 2 lines, different
shells do different things. The second line most certainly starts a new
shell if this syntax is supported at all. Even the first line starts a
new shell in some shells (bash, tcsh, but not zsh).

Regards,
Mikhael.