Routing "user" facility system messages to xterm

Routing "user" facility system messages to xterm

Post by H. Peter Anv » Sat, 17 May 1997 04:00:00





In newsgroup: comp.os.linux.development.apps

Quote:

> Can someone instruct me on how to route 'user' facility messages such
> as a simple error message generated when executing a non-existent
> application in X?

> I have edited my syslog.conf in almost every imaginable configuration,
> buy can only get selected output (such as ppp and other system level
> messages) to my xterm console (xterm -C ...) output.

> This is clearly a routing problem, as these messages do go to the root
> console that X was started from (I see them once I exit X [I run X with
> openwin]).

> Perhaps these aren't system level messages and can't be routed with
> syslog.conf?

Bingo.  Instead, when you start X, you need to do something like:

startx >& /dev/console           [tcsh]
startx > /dev/console 2>&1    [bash]

        -hpa
--
    PGP: 2047/2A960705 BA 03 D3 2C 14 A8 A8 BD  1E DF FE 69 EE 35 BD 74
    See http://www.zytor.com/~hpa/ for web page and full PGP public key
Always looking for a few good BOsFH.  **  Linux - the OS of global cooperation
        I am Baha'i -- ask me about it or see http://www.bahai.org/

 
 
 

Routing "user" facility system messages to xterm

Post by Albert D. Cahal » Sat, 17 May 1997 04:00:00



Quote:>> Can someone instruct me on how to route 'user' facility messages such
>> as a simple error message generated when executing a non-existent
>> application in X?

>> I have edited my syslog.conf in almost every imaginable configuration,
>> buy can only get selected output (such as ppp and other system level
>> messages) to my xterm console (xterm -C ...) output.

>> This is clearly a routing problem, as these messages do go to the root
>> console that X was started from (I see them once I exit X [I run X with
>> openwin]).

>> Perhaps these aren't system level messages and can't be routed with
>> syslog.conf?

> Bingo.  Instead, when you start X, you need to do something like:

> startx >& /dev/console             [tcsh]
> startx > /dev/console 2>&1         [bash]

What about to $HOME/.x-output from _inside_ the startx script?
--
--
Albert Cahalan <acahalan at cs.uml.edu> My address may be mangled to
avoid junk email. Please check it if you wish to respond to a news post.

 
 
 

Routing "user" facility system messages to xterm

Post by Steve Cahil » Sat, 17 May 1997 04:00:00


Can someone instruct me on how to route 'user' facility messages such
as a simple error message generated when executing a non-existent
application in X?

I have edited my syslog.conf in almost every imaginable configuration,
buy can only get selected output (such as ppp and other system level
messages) to my xterm console (xterm -C ...) output.

This is clearly a routing problem, as these messages do go to the root
console that X was started from (I see them once I exit X [I run X with
openwin]).

Perhaps these aren't system level messages and can't be routed with
syslog.conf?

How can one determine what part of the system is generating these
messages?
Once I determine this, perhaps then I can figure how to route them in X.

Perhaps the runlevel is relevant... the following is an excerpt of my
/etc/inittab:

# Runlevel 4 used to be for an X-window only system, until we discovered
# that it throws init into a loop that keeps your load avg at least 1
all
# the time. Thus, there is now one getty opened on tty6. Hopefully no
one
# will notice. ;^)
# It might not be bad to have one text console anyway, in case something
# happens to X.
x1:4:wait:/etc/rc.d/rc.4

# End of /etc/inittab

Not sure whether my /dev/tty's are pertinent but here's what they look
like when I am running X:

lrwxrwxrwx   1 cahill   users           4 May 16 09:49 console -> tty0
crw--w--w-   1 cahill   users      4,   0 May 16 09:49 tty0
crwx-w----   1 cahill   tty        4,   1 May 16 09:49 tty1
crw-rw-rw-   1 cahill   users      4,   7 May 16 09:49 tty7
crw-rw-rw-   1 cahill   users      4,   8 May 16 08:37 tty8
crwx-w----   1 cahill   tty        3,   0 May 16 09:49 ttyp0
crwx-w----   1 cahill   tty        3,   1 May 16 09:49 ttyp1
crwx-w--w-   1 cahill   users      3,   2 May 16 09:49 ttyp2
crwx-w--w-   1 cahill   users      3,   3 May 16 09:49 ttyp3
crwx-w----   1 cahill   tty        3,   6 May 16 09:52 ttyp6
crwx-w----   1 cahill   tty        3,   7 May 16 10:25 ttyp7
crwx-w----   1 cahill   tty        3,   8 May 16 10:36 ttyp8
crwx-w----   1 cahill   tty        3,   9 May 16 11:44 ttyp9

The xterm console is started from the following line in my
.openwin-init file:

toolwait /usr/bin/X11/xterm -C -T "XT_Console (shicho)" -sb -sl 500 -j
-ls -fn 7x14  -geom 85x8+655+876

Is an 'xconsole' needed for what I am trying to do?

Below is my current, syslog.conf with some of the entries I have
tried, commented out:

# /etc/syslog.conf
# For info about the format of this file, see "man syslog.conf" (the BSD
man
# page), and /usr/doc/sysklogd/README.linux.
#
# NOTE: YOU HAVE TO USE TABS HERE - NOT SPACES.
# I don't know why.
#

*.=info;*.=notice                               /usr/adm/messages
*.=debug                                        /usr/adm/debug
*.warn                                          /usr/adm/syslog

#
# This might work instead to log on a remote host:

#*.err;kern.debug;daemon.info;local2,auth.notice;mail.crit  /dev/console

*.notice                                        /dev/console
#*.err;user.*                                   /dev/tty0
#*.err;user.*                                   /dev/tty1
#*.err;user.*                                   /dev/tty7
#*.*                                            /dev/console

BTW I have man pages on "syslog.conf" and "syslog" but a "man 8 syslogd"
tells me there is no entry for syslogd!

I know there must be something simple I am overlooking.

TIA,

--Steve