On Tue, May 18, 1999 at 10:05:57AM -0400, Paul Smith wrote:
> %% Bob Woodside <proteus_at_pcnet.com> writes:
> 
>   >> 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?
> 
>   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.
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, dominik_vogt_at_hp.com
--
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 majordomo_at_fvwm.org.
To report problems, send mail to fvwm-owner_at_fvwm.org.
Received on Tue May 18 1999 - 09:41:04 BST