List Info

Thread: console messages in X screwing up the screen




console messages in X screwing up the screen
user name
2006-05-09 00:50:10
I'm trying to set up my Mystic CC for use as an X-terminal.
 I was reading 9.18 of the FAQ, which says:

9.18  How do I keep console messages from messing up my X
screen?
You need to either run xconsole or else run an xterm with
the "-C" option. Even then, you need to have the
    options         UCONSOLE
line uncommented in your config file (the GENERIC config is
set up this way). Due to a bug in xconsole, you may also
need to have your X startup scripts chown the console to
yourself and make it readable by you.
You can also edit /etc/syslog.conf to redirect syslog output
to wherever you would like it to go.

Question 1: my xterm gives the warning "utmp_update:
/dev/ttyp0: Is not owned by you" when I launch it. 
The xconsole says "Couldn't open console".  I
installed the aterm package I built on my other box, but
when I try to launch I get "aterm: can't load color
''White'', colorID = 0, (29)" twice before it
aborts.  Are these related?  What is going on?

Question 2: what is this "config" file it speaks
of?  Another page says this has something to do with how the
kernel is compiled?

Question 3: how do I chown the console?  Is this something I
put in my personal X scripts, or a system X script, or what?

Thanks,
Tim
-- 
Tim & Alethea
console messages in X screwing up the screen
user name
2006-05-16 23:42:20
thelarsons3cox.net wrote:
> I'm trying to set up my Mystic CC for use as an
X-terminal.  I was reading 9.18 of the FAQ, which says:
> 
> 9.18  How do I keep console messages from messing up my
X screen?
> You need to either run xconsole or else run an xterm
with the "-C" option. Even then, you need to
have the
>     options         UCONSOLE
> line uncommented in your config file (the GENERIC
config is set up this way). Due to a bug in xconsole, you
may also need to have your X startup scripts chown the
console to yourself and make it readable by you.
> You can also edit /etc/syslog.conf to redirect syslog
output to wherever you would like it to go.
> 
> Question 1: my xterm gives the warning
"utmp_update: /dev/ttyp0: Is not owned by you"
when I launch it.  The xconsole says "Couldn't open
console".  I installed the aterm package I built on my
other box, but when I try to launch I get "aterm:
can't load color ''White'', colorID = 0, (29)"
twice before it aborts.  Are these related?  What is going
on?
> 
> Question 2: what is this "config" file it
speaks of?  Another page says this has something to do with
how the kernel is compiled?
> 
> Question 3: how do I chown the console?  Is this
something I put in my personal X scripts, or a system X
script, or what?

Does nobody bother running X on mac68k?  Anyone?  Anyone? 
Bueller?


Tim
-- 
Tim & Alethea
christtrek.org
console messages in X screwing up the screen
user name
2006-05-17 14:48:28


Hi,

I used to run X on mac 68k but I just ignored the console
messages.  Still..

The config file is the kernel config file.  When you do a
uname it tells
you what config file was used.

NetBSD bellinzona 3.0 NetBSD 3.0 (GENERIC) #0: Mon Dec 19 0

In this case this system used GENERIC.

It is possible that UCONSOLE is not turned on anymore.  You
can see what your 
kernel config file was by typing:

strings /netbsd | grep _CFG_

and then look for the string UCONSOLE.

Mine starts as follows (for a sparc system):

_CFG_### START CONFIG FILE "GENERIC"
_CFG_# $NetBSD: GENERIC,v 1.169.4.2 2005/08/14 21:14:04 riz
Exp $
_CFG_#
_CFG_# GENERIC machine description file
_CFG_# 
_CFG_# This machine description file is used to generate the
default NetBSD
_CFG_# kernel.  The generic kernel does not include all
options, subsystems
_CFG_# and device drivers, but should be useful for most
applications.
_CFG_#
_CFG_# The machine description file can be customised for
your specific
_CFG_# machine to reduce the kernel size and improve its
performance.
_CFG_#
_CFG_# For further information on compiling NetBSD kernels,
see the config(8)
_CFG_# man page.
_CFG_#
_CFG_# For further information on hardware support for this
architecture, see
_CFG_# the intro(4) man page.  For further information about
kernel options
_CFG_# for this architecture, see the options(4) man page. 
For an explanation
_CFG_# of each device driver in this file see the section 4
man page for the
_CFG_# device.
_CFG_
_CFG_include \011"arch/sparc/conf/std.sparc"
_CFG_
_CFG_options \011INCLUDE_CONFIG_FILE\011# embed config
file in kernel binary
_CFG_
_CFG_#ident \011\011"GENERIC-$Revision: 1.169.4.2
$"
_CFG_
_CFG_maxusers\01132


To have the X startup scripts chown the console would
probably require that you be
root.  What you want is

chown youruserid /dev/console

but you can most likely only do that as root.

I've never used aterm.

Probably better would be to change syslog.conf so it didn't
try to print to
the console.  OTOH, you might lose that key message that
explained why it crashed.

The key line would be something like:

*.err;kern.*;auth.notice;authpriv.none;mail.crit       
/dev/console


Change that /dev/console to something else, say
/var/log/messages.


Good luck!

cheers

bruce

On Tue, May 16, 2006 at 06:42:20PM -0500, Tim & Alethea
Larson wrote:
> thelarsons3cox.net wrote:
> >I'm trying to set up my Mystic CC for use as an
X-terminal.  I was reading 
> >9.18 of the FAQ, which says:
> >
> >9.18  How do I keep console messages from messing
up my X screen?
> >You need to either run xconsole or else run an
xterm with the "-C" option. 
> >Even then, you need to have the
> >    options         UCONSOLE
> >line uncommented in your config file (the GENERIC
config is set up this 
> >way). Due to a bug in xconsole, you may also need
to have your X startup 
> >scripts chown the console to yourself and make it
readable by you.
> >You can also edit /etc/syslog.conf to redirect
syslog output to wherever 
> >you would like it to go.
> >
> >Question 1: my xterm gives the warning
"utmp_update: /dev/ttyp0: Is not 
> >owned by you" when I launch it.  The xconsole
says "Couldn't open 
> >console".  I installed the aterm package I
built on my other box, but when 
> >I try to launch I get "aterm: can't load
color ''White'', colorID = 0, 
> >(29)" twice before it aborts.  Are these
related?  What is going on?
> >
> >Question 2: what is this "config" file
it speaks of?  Another page says 
> >this has something to do with how the kernel is
compiled?
> >
> >Question 3: how do I chown the console?  Is this
something I put in my 
> >personal X scripts, or a system X script, or what?
> 
> Does nobody bother running X on mac68k?  Anyone? 
Anyone?  Bueller?
> 
> 
> Tim
> -- 
> Tim & Alethea
> christtrek.org

-- 
edoneelsdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org
console messages in X screwing up the screen
user name
2006-05-17 19:05:42
At 18:42 Uhr -0500 16.5.2006, Tim & Alethea Larson
wrote:
>thelarsons3cox.net wrote:

[snip]

(Tim, your Thunderbird setup is borken. I get long, unbroken
lines here,
almost unreadable.)

>Does nobody bother running X on mac68k?  Anyone? 
Anyone?  Bueller?

Sure do. Let's see...

>>I'm trying to set up my Mystic CC for use as an
X-terminal.  I was reading
>>9.18 of the FAQ, which says:
>>
>>9.18  How do I keep console messages from messing up
my X screen?
>>You need to either run xconsole or else run an xterm
with the "-C" option.
>>Even then, you need to have the
>>    options         UCONSOLE
>>line uncommented in your config file (the GENERIC
config is set up this
>>way). Due to a bug in xconsole, you may also need to
have your X startup
>>scripts chown the console to yourself and make it
readable by you.
>>You can also edit /etc/syslog.conf to redirect
syslog output to wherever
>>you would like it to go.

Do you use startx etc., or do you use xdm? Because the
latter executes
GiveConsole and TakeConsole scripts that make sure you own
all the
important bits after you have logged in. (If you want to set
up an X
terminal, you most likely want xdm.)

If you log in as an unprivileged user, obviously you cannot
change
ownership of /dev/console. You could probably get away with
'chmod 666
/dev/console' and/or 'chmod u+s /usr/X11R6/bin/xconsole'
for testing.

>>Question 1: my xterm gives the warning
"utmp_update: /dev/ttyp0: Is not
>>owned by you" when I launch it.  The xconsole
says "Couldn't open
>>console".  I installed the aterm package I
built on my other box, but when
>>I try to launch I get "aterm: can't load
color ''White'', colorID = 0,
>>(29)" twice before it aborts.  Are these
related?  What is going on?
>>
>>Question 2: what is this "config" file
it speaks of?  Another page says
>>this has something to do with how the kernel is
compiled?

The text file that defines the kernel configuration, see
e.g.
/usr/src/sys/arch/mac68k/conf/GENERIC. The NetBSD.org
website has
information on how to configure and compile a kernel.

>>Question 3: how do I chown the console?  Is this
something I put in my
>>personal X scripts, or a system X script, or what?

As I said, if you use xdm, it does that for you. My
/etc/X11/xdm/Xsetup_0
script then starts xconsole,

#!/bin/sh
#
# $XConsortium: Xsetup_0,v 1.3 93/09/28 14:30:31 gildea Exp
$
# $Id: Xsetup_0.sh,v 1.1 2004/07/18 15:00:18 hauke Exp $
xhost +localhost
xconsole -geometry 480x130-0-0 -daemon -notify -verbose -fn
fixed -exitOnFail

though I don't know whether the distributed version does
this, too.

I can send you my xdm setup as sample, if it helps any.

	hauke


--
"It's never straight up and down"     (DEVO)


console messages in X screwing up the screen
user name
2006-05-18 04:43:54
Bruce O'Neel wrote:
> I used to run X on mac 68k but I just ignored the
console messages.  Still..

Hard to ignore them when they muck up the display!

> The config file is the kernel config file.  When you do
a uname it tells
> you what config file was used.
> 
> NetBSD bellinzona 3.0 NetBSD 3.0 (GENERIC) #0: Mon Dec
19 0
> 
> In this case this system used GENERIC.
> 
> It is possible that UCONSOLE is not turned on anymore. 
You can see what your 
> kernel config file was by typing:
> 
> strings /netbsd | grep _CFG_
> 
> and then look for the string UCONSOLE.

Possible, but I'm using 2.1 on another system without these
problems.

> Mine starts as follows (for a sparc system):
[snip]
> 
> To have the X startup scripts chown the console would
probably require that you be
> root.  What you want is
> 
> chown youruserid /dev/console
> 
> but you can most likely only do that as root.

And it would likely complain if another user were to start
X, right?

> I've never used aterm.

I like the semi-transparent windows...at least when feh
works to paint a 
picture on the root window.

> Probably better would be to change syslog.conf so it
didn't try to print to
> the console.  OTOH, you might lose that key message
that explained why it crashed.
> 
> The key line would be something like:
> 
> *.err;kern.*;auth.notice;authpriv.none;mail.crit       
/dev/console

What exactly is syslog.conf doing?  I understand this line
must be 
making certain types of things output to /dev/console, but I
don't 
understand what/why/how.

> Change that /dev/console to something else, say
/var/log/messages.

So it's possible to make it output to a file rather than
/dev/console? 
That would be great...I could capture the errors for
posterity (if 
necessary) that way!  Do I need to restart for this to take
effect?

Thanks!  This is even better than using xconsole, IMO.

Tim

-- 
Tim & Alethea
christtrek.org
console messages in X screwing up the screen
user name
2006-05-18 04:53:49
Hauke Fath wrote:
> At 18:42 Uhr -0500 16.5.2006, Tim & Alethea Larson
wrote:
>> thelarsons3cox.net wrote:
> 
> [snip]
> 
> (Tim, your Thunderbird setup is borken. I get long,
unbroken lines here,
> almost unreadable.)

I think that was the webmail, actually.

>> Does nobody bother running X on mac68k?  Anyone? 
Anyone?  Bueller?
> 
> Sure do. Let's see...
> 
>>> I'm trying to set up my Mystic CC for use as
an X-terminal.  I was reading
>>> 9.18 of the FAQ, which says:
>>>
>>> 9.18  How do I keep console messages from
messing up my X screen?
>>> You need to either run xconsole or else run an
xterm with the "-C" option.
>>> Even then, you need to have the
>>>    options         UCONSOLE
>>> line uncommented in your config file (the
GENERIC config is set up this
>>> way). Due to a bug in xconsole, you may also
need to have your X startup
>>> scripts chown the console to yourself and make
it readable by you.
>>> You can also edit /etc/syslog.conf to redirect
syslog output to wherever
>>> you would like it to go.
> 
> Do you use startx etc., or do you use xdm? Because the
latter executes
> GiveConsole and TakeConsole scripts that make sure you
own all the
> important bits after you have logged in. (If you want
to set up an X
> terminal, you most likely want xdm.)

I would love to set this machine up with xdm.  It's
supposed to be my 
color X terminal for all my headless machines.  (At least
until I can do 
the same with Xnest on my Mac.)  But I want to make sure
everything 
works first, so I don't lock myself out somehow -- I'm not
sure I know 
how to set up xdm properly.

> If you log in as an unprivileged user, obviously you
cannot change
> ownership of /dev/console. You could probably get away
with 'chmod 666
> /dev/console' and/or 'chmod u+s
/usr/X11R6/bin/xconsole' for testing.

I will give these a whirl...thanks!

>>> Question 1: my xterm gives the warning
"utmp_update: /dev/ttyp0: Is not
>>> owned by you" when I launch it.  The
xconsole says "Couldn't open
>>> console".  I installed the aterm package
I built on my other box, but when
>>> I try to launch I get "aterm: can't load
color ''White'', colorID = 0,
>>> (29)" twice before it aborts.  Are these
related?  What is going on?
>>>
>>> Question 2: what is this "config"
file it speaks of?  Another page says
>>> this has something to do with how the kernel is
compiled?
> 
> The text file that defines the kernel configuration,
see e.g.
> /usr/src/sys/arch/mac68k/conf/GENERIC. The NetBSD.org
website has
> information on how to configure and compile a kernel.

Eeek!  Compiling a kernel might be a bit beyond me???

>>> Question 3: how do I chown the console?  Is
this something I put in my
>>> personal X scripts, or a system X script, or
what?
> 
> As I said, if you use xdm, it does that for you. My
/etc/X11/xdm/Xsetup_0
> script then starts xconsole,
> 
> #!/bin/sh
> #
> # $XConsortium: Xsetup_0,v 1.3 93/09/28 14:30:31 gildea
Exp $
> # $Id: Xsetup_0.sh,v 1.1 2004/07/18 15:00:18 hauke Exp
$
> xhost +localhost
> xconsole -geometry 480x130-0-0 -daemon -notify -verbose
-fn fixed -exitOnFail
> 
> though I don't know whether the distributed version
does this, too.
> 
> I can send you my xdm setup as sample, if it helps any.

Please do!  I try to read xdm howtos but much of it is over
my head.  A 
good example would sure help.  I want to be able to log into
itself 
(which uses DHCP) and a couple machines at static IPs on my
home LAN. 
It will be my "show box" too, so if it could
discover other machines 
when I'm a guest on other LANs as well, that would be a
great bonus.


Thanks,
Tim

-- 
Tim & Alethea
christtrek.org
console messages in X screwing up the screen
user name
2006-05-18 08:57:42
Hi,

For what it's worth, the NetBSD 3.0 xdm setup (on SPARC)
seems
to get this right as well.  Not that that guarantees the
m68k one
is the same though...

cheers

bruce

On Wed, May 17, 2006 at 09:05:42PM +0200, Hauke Fath wrote:
> At 18:42 Uhr -0500 16.5.2006, Tim & Alethea Larson
wrote:
> >thelarsons3cox.net wrote:
> 
> [snip]
> 
> (Tim, your Thunderbird setup is borken. I get long,
unbroken lines here,
> almost unreadable.)
> 
> >Does nobody bother running X on mac68k?  Anyone? 
Anyone?  Bueller?
> 
> Sure do. Let's see...
> 
> >>I'm trying to set up my Mystic CC for use as
an X-terminal.  I was reading
> >>9.18 of the FAQ, which says:
> >>
> >>9.18  How do I keep console messages from
messing up my X screen?
> >>You need to either run xconsole or else run an
xterm with the "-C" option.
> >>Even then, you need to have the
> >>    options         UCONSOLE
> >>line uncommented in your config file (the
GENERIC config is set up this
> >>way). Due to a bug in xconsole, you may also
need to have your X startup
> >>scripts chown the console to yourself and make
it readable by you.
> >>You can also edit /etc/syslog.conf to redirect
syslog output to wherever
> >>you would like it to go.
> 
> Do you use startx etc., or do you use xdm? Because the
latter executes
> GiveConsole and TakeConsole scripts that make sure you
own all the
> important bits after you have logged in. (If you want
to set up an X
> terminal, you most likely want xdm.)
> 
> If you log in as an unprivileged user, obviously you
cannot change
> ownership of /dev/console. You could probably get away
with 'chmod 666
> /dev/console' and/or 'chmod u+s
/usr/X11R6/bin/xconsole' for testing.
> 
> >>Question 1: my xterm gives the warning
"utmp_update: /dev/ttyp0: Is not
> >>owned by you" when I launch it.  The
xconsole says "Couldn't open
> >>console".  I installed the aterm package
I built on my other box, but when
> >>I try to launch I get "aterm: can't load
color ''White'', colorID = 0,
> >>(29)" twice before it aborts.  Are these
related?  What is going on?
> >>
> >>Question 2: what is this "config"
file it speaks of?  Another page says
> >>this has something to do with how the kernel is
compiled?
> 
> The text file that defines the kernel configuration,
see e.g.
> /usr/src/sys/arch/mac68k/conf/GENERIC. The NetBSD.org
website has
> information on how to configure and compile a kernel.
> 
> >>Question 3: how do I chown the console?  Is
this something I put in my
> >>personal X scripts, or a system X script, or
what?
> 
> As I said, if you use xdm, it does that for you. My
/etc/X11/xdm/Xsetup_0
> script then starts xconsole,
> 
> #!/bin/sh
> #
> # $XConsortium: Xsetup_0,v 1.3 93/09/28 14:30:31 gildea
Exp $
> # $Id: Xsetup_0.sh,v 1.1 2004/07/18 15:00:18 hauke Exp
$
> xhost +localhost
> xconsole -geometry 480x130-0-0 -daemon -notify -verbose
-fn fixed -exitOnFail
> 
> though I don't know whether the distributed version
does this, too.
> 
> I can send you my xdm setup as sample, if it helps any.
> 
> 	hauke
> 
> 
> --
> "It's never straight up and down"    
(DEVO)
> 
> 

-- 
edoneelsdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org
console messages in X screwing up the screen
user name
2006-05-18 09:10:23
Hi,

On Wed, May 17, 2006 at 11:43:54PM -0500, Tim & Alethea
Larson wrote:
<snip>
> >
> >The key line would be something like:
> >
> >*.err;kern.*;auth.notice;authpriv.none;mail.crit   
    /dev/console
> 
> What exactly is syslog.conf doing?  I understand this
line must be 
> making certain types of things output to /dev/console,
but I don't 
> understand what/why/how.
> 
> >Change that /dev/console to something else, say
/var/log/messages.
> 
> So it's possible to make it output to a file rather
than /dev/console? 
> That would be great...I could capture the errors for
posterity (if 
> necessary) that way!  Do I need to restart for this to
take effect?

The syslog call looks like:

syslog(int priority, const char *message, ...);

where priority is a constant like:

LOG_ERR

When you opened the syslog you gave an id, like say mail or
kern.

These messages are passed to the syslogd daemon which, when 
started, reads syslogd.conf.

If you kill -HUP it the config file is reread.

What syslog does is that any message that from anyone (mail,
kern, sshd, etc)
that is sent with the priority of err is shipped the the
file specified, 
in this case /dev/console.  Ditto for anymessage send from
the auth facility
with the priority of notice, etc.

Without thinking too hard I think that

auth.notice;authpriv.none        /var/log/authlog
*.err;kern.*;mail.crit        /dev/console

would stop the annoying su and failed login messages to the
console and put
them (possibly duplicated) in /var/log/authlog.  The kernel
messages and anything
sent with err will still mess up the x display.  OTOH, you
probably want those
anyway since that might be your only way of deciding what
fubared and caused
the system to crash.

I'd personally move mail.crit to /var/log/messages but I'm
not a big mail person.

If you feel like reading man pages and playing syslog can
send the messages
off to another system, and that system can write them to
it's disk which
is pretty cool.

cheers

bruce



-- 
edoneelsdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org
console messages in X screwing up the screen
user name
2006-05-21 10:38:41
Hauke Fath wrote:
> ownership of /dev/console. You could probably get away
with 'chmod 666
> /dev/console' and/or 'chmod u+s
/usr/X11R6/bin/xconsole' for testing.

I did this latter step, and it solves the problem as long as
xconsole is 
running.  I'll experiment with some of the other
suggestions as time allows.



Thanks!
Tim
-- 
Tim & Alethea
christtrek.org
console messages in X screwing up the screen
user name
2006-05-24 12:01:01
Hauke Fath wrote:
>> thelarsons3cox.net wrote:
>>> I'm trying to set up my Mystic CC for use as
an X-terminal.
> 
> Do you use startx etc., or do you use xdm? Because the
latter executes
> GiveConsole and TakeConsole scripts that make sure you
own all the
> important bits after you have logged in. (If you want
to set up an X
> terminal, you most likely want xdm.)

So far I'm using startx just to play with the config for
the apps and my 
personal environment.  I'd like to move to xdm though.

> If you log in as an unprivileged user, obviously you
cannot change
> ownership of /dev/console. You could probably get away
with 'chmod 666
> /dev/console' and/or 'chmod u+s
/usr/X11R6/bin/xconsole' for testing.

I did the chmod to xconsole so that the screen didn't bork.
 Then I also 
changed syslog.conf to not send the auth messages to the
console. 
(Thanks, Bruce!)  Since those are the only ones I see
day-to-day, the 
problem is solved now.

>>> Question 1: my xterm gives the warning
"utmp_update: /dev/ttyp0: Is not
>>> owned by you" when I launch it.  

I've tried to read up on what utmp_update is, but it makes
no sense to 
me yet.

>>> Question 3: how do I chown the console?  Is
this something I put in my
>>> personal X scripts, or a system X script, or
what?
> 
> As I said, if you use xdm, it does that for you. My
/etc/X11/xdm/Xsetup_0
> script then starts xconsole,
> 
> #!/bin/sh
> #
> # $XConsortium: Xsetup_0,v 1.3 93/09/28 14:30:31 gildea
Exp $
> # $Id: Xsetup_0.sh,v 1.1 2004/07/18 15:00:18 hauke Exp
$
> xhost +localhost
> xconsole -geometry 480x130-0-0 -daemon -notify -verbose
-fn fixed -exitOnFail
> 
> though I don't know whether the distributed version
does this, too.
> 
> I can send you my xdm setup as sample, if it helps any.

Could you, please?  I'm having a hard time understanding
the 
relationships between all the various pieces that go into an
X system, 
because everything is so abstracted and distinct.  It's
great because it 
allows the network transparency, but it makes it more
confusing too.  I 
tried merely enabling xdm=YES in my rc.conf but I'm not
sure what all 
the defaults do.  I tried reading the xdm man page to
understand the 
whole X initiation process, but there's A LOT there!

 From what I understand so far, you can make boxes openly
broadcast for 
X connections, or you can restrict connections to other
machines that 
know about them specifically, or you can disallow X
connections 
altogether.  Obviously you can connect to yourself too. 
I'd want to set 
up this machine (conrad) to work with all three modes,
supplying a login 
prompt containing itself, specific machines that I've
opened to conrad, 
as well as "open" machines on the LAN.

This stuff is pretty general to X, so if there's a more
proper forum for 
this, just let me know.


Thanks,
Tim

-- 
Tim & Alethea
christtrek.org
[1-10]

about | contact  Other archives ( Real Estate discussion Medical topics )