Subject: FVWM: X-terminal question

From: Tim Wadsworth <[email-masked]>
Date: Tue, 12 Nov 1996 18:08:59 GMT

Hi,

To display messages from fvwm on a workstation, I used to use
xconsole. I believe that fvwm2 has a module, FvwmConsole, which gets
started by default, that performs a similar function.

I am now using fvwm2 to manage an X-terminal screen, but of course,
/dev/console is not readable by me, and even if it were, it would have
everybody else's messages too.

How can I achieve a similar effect?

Currently my .xsession (which is run by xdm) logs *some* of the messages
to a file, but others such as 
fbconsole: open /dev/console: Permission denied
go to /var/tmp/xdm-errors.

My question is really threefold:
1. Why do the messages go to different places, ie. why are the
	fbconsole (presumably fbconsole == FvwmConsole?) messages immune
	to my redirect?
2. How do I get all of the messages to go to the same place, and
3. How do I display them in a window on my X-terminal?

If anyone could answer any or all of these questions, it would be most
appreciated.

Thanks in advance,

Tim.
--
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 [email-masked].
To report problems, send mail to [email-masked].

---

From: Pete Forman <[email-masked]>
Date: Tue, 12 Nov 1996 18:30:08 GMT

>>>>> "Tim" == Tim Wadsworth <[email-masked]> writes:

    [snip]
    Tim> 1. Why do the messages go to different places, ie. why are the
    Tim> 	fbconsole (presumably fbconsole == FvwmConsole?) messages
    Tim> 	immune to my redirect?
    Tim> 2. How do I get all of the messages to go to the same place,
    Tim>    and
    Tim> 3. How do I display them in a window on my X-terminal?

Errors may be printed on stdout or stderr.
Try this line in .xsession if you use sh or ksh

    exec > $HOME/xsession.log 2>&1

If you want to track the messages, try something like

    xterm -e tail -f xsession.log

-- 
Pete Forman
Western Geophysical
[email-masked]

---

From: Dan Espen <[email-masked]>
Date: Tue, 12 Nov 1996 13:34:35 -0500

> started by default, that performs a similar function.

FvwmConsole does not perform a similar function:

The FvwmConsole allows the user to type  fvwm commands into xterm, and
have them executed immediately.  These commands are usually specfified
in the .fvwmrc file, or are bound to  menu/mouse items as specified in
that  file.   This tools  is  particularly  useful   for  testing  new
configuration  ideas, or for implementing   temporary changes to  your
environment.

(Chuck, please note the reference  to .fvwmrc which should be .fvwm2rc
or at least .fvwm[2]rc.)

> 3. How do I display them in a window on my X-terminal?

You need  to   run something  as  your  console.  You  can   still use
xconsole, or you  can use one of  the many substitutes including xterm
with the -C flag.

In  general any output that  can't  be directed  to  a tty  will go to
/dev/console.  You can also get output there thru redirection.  Eg.

  echo "hello" > /dev/console

--
Dan Espen                                    Phone: (908) 699-5570
[email-masked]
444 Hoes Lane  Room RRC 1C-214
Piscataway, NJ 08854
--
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 [email-masked].
To report problems, send mail to [email-masked].

---

From: Tim Wadsworth <[email-masked]>
Date: Tue, 12 Nov 1996 18:49:16 GMT

>     exec > $HOME/xsession.log 2>&1

Exactly what I am using, except for the filename.

>     xterm -e tail -f xsession.log

Thanks, that answers 3.

I can now answer 1 & 2 myself -- the messages don't go to different places,
and fbconsole is actually part of openwindows (brokenwindows) .. I was
actually looking at someone else's unredirected output in 
/var/tmp/xdm-errors -- sorry.

Are there any options for FvwmConsole to make it achieve similar to
`xterm -e tail -f xsession.log`, ie. tell it to get its input from a
file, or even a pipe ?

Thanks,

Tim.

---

From: Dan Espen <[email-masked]>
Date: Tue, 12 Nov 1996 13:56:51 -0500

> > everybody else's messages too.

Oops, sorry, missed the part about you using an x-terminal.

The information about FvwmConsole is still true, but forget the part
about xconsole, etc.

---

From: Toshi Isogai <[email-masked]>
Date: Tue, 12 Nov 1996 12:51:17 -0800

>         fbconsole (presumably fbconsole == FvwmConsole?) messages immune

You can redirect outputs when you start fvwm2, something like:

	fvwm2 2>$HOME/fvwm2.errors 1>$HOME/fvwm2.outputs

> 3. How do I display them in a window on my X-terminal?

I experimented a little bit. Others may have better solution, but at 
least it works for me.

Assuming you have a xterm open before starting fvwm2,

Add the following in init function in .fvwm2rc. This will start
FvwmConsole of fvwm side only, not its front end.

	+  "I" Module FvmwConsole -e /bin/sh -c 'sleep 20'

Then, start fvwm without redirection, fvwm2 should reports any errors to
this xterm
	
	fvwm2 &

You have 20 seconds to start FvwmConsole front end.

	/usr/X11/lib/X11/fvwm2/FvwmConsoleC.pl

This should do it. All error messages will show up on the xterm.

I didn't know xterm with -C option doesn't work through xdm. If it does,
things are much easier. "FvwmConsole -C" would do.....

-- 
Toshi Isogai   
KENTEK Information Systems
[email-masked]

---

From: [email-masked] (Albrecht Kadlec)
Date: Wed, 13 Nov 96 19:08:50 +0100

>>>>> Dan Espen writes:

> started by default, that performs a similar function.

D> FvwmConsole does not perform a similar function:

D> The FvwmConsole allows the user to type  fvwm commands into xterm, and
D> have them executed immediately.  These commands are usually specfified
D> in the .fvwmrc file, or are bound to  menu/mouse items as specified in
D> that  file.   This tools  is  particularly  useful   for  testing  new
D> configuration  ideas, or for implementing   temporary changes to  your
D> environment.

> 3. How do I display them in a window on my X-terminal?

related questions below

D> You need  to   run something  as  your  console.  You  can   still use
D> xconsole, or you  can use one of  the many substitutes including xterm
D> with the -C flag.

which are ?

I use:

	*FvwmButtons(10x2, Swallow (UseOld, NoClose, Respawn) "Console" 
		"Exec console -display $HOSTDISPLAY -geometry 70x5-1500-1500")
	
with console being:
	#!/usr/local/lbin/tcsh
	exec xterm -name Console -C ${argv[1-]} &

on my main machine, and
	#!/usr/local/lbin/tcsh
	exec rsh vta_host -n "exec xterm -name Console ${argv[1-]} 
						</dev/null >&/dev/null &"
on any remote machine since I can't access /dev/console from there.

So I have a small window to both 
	show me console messages, if I'm on my main machine
	enter commands (i.e: start netscape & others as I see fit)

I'd like to extend this to:
	show me fvwm2 messages
	enter fvwm2 commands

The latter can be accomplished with FvwmPipe and echoing to that pipe.
The former is the problem.

How do I get xterm to show me not only the messages to the console, but
also messages which are echoed to another pipe/file ???

I could redirect the fvwm2 output to the console, but that's not
acceptable, if somebody else is using that machine (& the console).
I'd find it rather rude if sombody wrote his errors to my console.
(and permissions woiuldn't allow that anyway)

Any suggestions?

Can I redirect /dev/Console to another pipe (say ~/.messages) and also pipe
fvwm2 output there?

Can I get xterm (or any substitute - which ? -) to read special messages
from an arbitrary pipe? 

HELP !!! (been trying this for some time now, but never found a way)
albrecht

(the solution for this problem would eliminate any use of FvwmConsole and
save much screen space)
-- 
If you negotiate the minefield in the drive
And beat the dogs and cheat the cold electronic eyes
And if you make it past the shotgun in the hall
Dial the combination.  open the priesthole
And if i'm in i'll tell you what's behind the wall
				-- Pink Floyd, "The Final Cut"
--
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 [email-masked].
To report problems, send mail to [email-masked].

---

From: Richard Lister <[email-masked]>
Date: Thu, 28 Nov 1996 11:19:07 +0000

On Tue, 12 Nov 1996 18:08:59 GMT
Tim Wadsworth <[email-masked]> 
> How can I achieve a similar effect?

If you want to get the messages from fvwm you could use the 'xsession'
program (from your local X mirror, or ftp.x.org).

This runs as your session manager and also starts the window manager.
For example, as the last line in my ~/.xsession I have:
  xsession -defaultWM fvwm2

xsession has a little window which display fvwm messages, and also
provides a menu to switch between different window managers (very
useful for debugging purposes).

Ric

Richard J. Lister, Research Assistant    
Neural Computing Research Group, Aston University
[email-masked] 
http://www.ncrg.aston.ac.uk/~listerrj/ 
--
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 [email-masked].
To report problems, send mail to [email-masked].