[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#163837: startx: hostname version is displayed



On Tue, Oct 08, 2002 at 08:57:06PM +0200, Beat Bolli wrote:
> 
> When starting X, the hostname version string is displayed. This comes from
> the Xauth setup in startx. The Debian version of hostname outputs its version
> string to stderr. The following patch suppresses this error:
> 
> --- startx.orig	2002-10-04 22:49:05.000000000 +0200
> +++ startx	2002-10-08 20:27:31.000000000 +0200
> @@ -116,7 +116,7 @@
>  # set up default Xauth info for this machine
>  case `uname` in
>  Linux*)
> -	if [ -z "`hostname --version | grep GNU`" ]; then
> +	if [ -z "`hostname --version 2>/dev/null | grep GNU`" ]; then

actually no, what happens is that it outputs its version to
STDERR and nothing at all to STDOUT, so the right thing (apart
from fixing hostname, which would be better IMHO) would be to do

    hostname --version 2>&1 | grep GNU

else stdin will be empty and it'll never grep.

-- 
John Lenton (john@vialibre.org.ar) -- Random fortune:
"How do I love thee?  My accumulator overflows."




Reply to: