Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 4 Mar 2002 23:10:18 -0600
From:      Bob Giesen <BobGiesen@earthlink.net>
To:        Greg Lehey <grog@lemis.com>, Peter Leftwich <Hostmaster@Video2Video.Com>
Cc:        Peter Ulrich Kruppa <root@pukruppa.de>, FreeBSD Questions <questions@FreeBSD.org>
Subject:   Re: Cannot change X screen resolution
Message-ID:  <E16i7Dw-0004ko-00@hawk.mail.pas.earthlink.net>
In-Reply-To: <20020305141610.E64582@wantadilla.lemis.com>
References:  <20020305120749.B64582@wantadilla.lemis.com> <20020304222820.N96680-100000@earl-grey.cloud9.net> <20020305141610.E64582@wantadilla.lemis.com>

next in thread | previous in thread | raw e-mail | index | archive | help
> > Question, how *DO* you capture the output of the X startup?
>
>   $ startx 2>&1 > /var/tmp/startuplog

   In redirection, order is important.  The above command will send 
stderr output (file descriptor "2") to the console (not to the 
logfile), which is where stdout (file descriptor "1") is going at the 
time the stderr redirection is evaluated.
   If you want errors logged and want to use the stdout-address 
shorthand ("2>&1," rather than typing out a logfile pathname twice), 
you must redirect stderr after redirecting stdout:

$ startx >/var/tmp/startuplog 2>&1

Bob

P.S.  If you're curious about what the programmers deemed standard 
output verus error-class messages (which is sometimes subjective), 
you could, of course, use separate filenames for error messages and 
standard output, e.g.:

$ startx 2>/var/tmp/startuperrorlog >/var/tmp/startuplog


-- 
"Glory is fleeting, but obscurity is forever." -- Napoleon Bonaparte 
(1769-1821)

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E16i7Dw-0004ko-00>