Subject: FVWM: a silly question

From: "Sergei Gerasenko" <[email-masked]>
Date: Mon, 17 May 1999 17:50:53 -0400

Hi everybody,
I have a rather stupid question but I haven't been able to figure out where startx keeps its output. Does anybody know?
Thanx anyway,
    Sergei Gerasenko

---

From: Bob Woodside <[email-masked]>
Date: Mon, 17 May 1999 18:35:26 -0400

> Sergei Gerasenko wrote:
> 
> Hi everybody,
> I have a rather stupid question but I haven't been able to figure out
> where startx keeps its output. Does anybody know?

	First...please see if Outlook Express has an option to send just plain
ASCII text instead of html. It's considered rude to send inline html to
mailing lists, where many of the recipients (often by choice) use e-mail
clients that don't like html. 

	Now...on to your question. startx is just a shell script that invokes
xinit. It doesn't put its output anyplace special, which means that it
will just get written to the console from which you invoked it.

	A common practice is to modify startx to suit your own preferences. I
do this to have the stdout/stderr output redirected to /dev/console to
that I can view the output with xconsole or some such tool while X is
running. To do this, look for a line - probably the last line in startx
- that looks something like this:

	xinit $clientargs -- $serverargs

and modify it to look like this:

	xinit $clientargs -- $serverargs >/dev/console 2>&1

- 
- Bob
--
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: [email-masked] (Paul D. Smith)
Date: 18 May 1999 10:05:57 -0400

>> Hi everybody, I have a rather stupid question but I haven't been
  >> able to figure out where startx keeps its output. Does anybody
  >> know?

  bw> 	Now...on to your question. startx is just a shell script that
  bw> invokes xinit. It doesn't put its output anyplace special, which
  bw> means that it will just get written to the console from which you
  bw> invoked it.

  bw> 	A common practice is to modify startx to suit your own
  bw> preferences. I do this to have the stdout/stderr output redirected
  bw> to /dev/console to that I can view the output with xconsole or
  bw> some such tool while X is running. To do this, look for a line -
  bw> probably the last line in startx - that looks something like this:

  bw> 	xinit $clientargs -- $serverargs

  bw> and modify it to look like this:

  bw> 	xinit $clientargs -- $serverargs >/dev/console 2>&1

I don't like changing system scripts like startx, since it makes package
managers (Debian, RPM, etc.) nervous.

Also, I switch between XDM (which wants ~/.xsession) and vanilla startx
(which wants ~/.xinitrc) fairly regularly.

What I do is this:

  * In ~/.xinitrc:

      . $HOME/.xrc

  * In ~/.xsession:

      . $HOME/.xrc

  * In ~/.xrc:

      # This is the X startup script...
      #

      exec >$HOME/.Xerrorlog 2>&1

      # Do some stuff!

      exec fvwm2

Note I use bash; if you don't use a Bourne-ish shell (then switch!  No
no no that's not it... :) you may need to rewrite some or all of the
above.  I don't really know how to do it in csh.

The trick in ~/.xrc is the exec; if you don't give a filename arg to
exec, it modifies the stdout/stderr of the current process (the shell).
Thus you can redirect all subsequent output to wherever you like (here I
use a file).  See the man page for sh (or bash or whatever).

Lastly I exec the window manager so when it exits, my X session exits.

HTH!

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <[email-masked]>         Network Management Development
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist
-------------------------------------------------------------------------------
   These are my opinions---Nortel Networks takes no responsibility for them.
--
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: Dominik Vogt <[email-masked]>
Date: Tue, 18 May 1999 16:39:59 +0200

> Lastly I exec the window manager so when it exits, my X session exits.

Wow, I didn't know you can do it this complicated ;-)
I simply use an alias:

  alias x="startx $* > ~/.X.err 2>&1"

It's less keystrokes to restart X too.

Bye

Dominik ^_^

-- 
Dominik Vogt, Hewlett-Packard GmbH, Dept. BVS
Herrenberger Str.130, 71034 Boeblingen, Germany
phone: 07031/14-4596, fax: 07031/14-3883, [email-masked]
--
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: [email-masked] (Paul D. Smith)
Date: 18 May 1999 11:48:29 -0400

%% Dominik Vogt <[email-masked]> writes:

  dv> Wow, I didn't know you can do it this complicated ;-)
  dv> I simply use an alias:

  dv>   alias x="startx $* > ~/.X.err 2>&1"

  dv> It's less keystrokes to restart X too.

Can't work with XDM.  And XDM gives even _less_ keystrokes to restart X :)

---

From: Dominik Vogt <[email-masked]>
Date: Tue, 18 May 1999 19:21:09 +0200

> Can't work with XDM.  And XDM gives even _less_ keystrokes to restart X :)

Okay, but as a wm developer using xdm is a bit uncomfortable :)

Bye

Dominik ^_^

---

From: [email-masked]
Date: 19 May 1999 00:00:45 +0200

>       . $HOME/.xrc

Alternatively: ln -s .xinitrc .xsession

kai
-- 
Abort this operation?   [Abort]  [Cancel]