XConsole not showing the console log

Hi,

I recently started to use x11/xdm. After logging in and when X starts, xconsole is also started. I thought it would be nice to follow the console messages in X instead of switching with Ctrl+Alt+F1 all the time.

XConsole is executed in /usr/local/lib/X11/xdm/Xsetup_0 and afaik it should display the messages from /dev/console. But I get the impression that xconsole is linked to ttyv8 (where X is started), instead of ttyv0 (where all the console messages go to).

So how can I configure xconsole so that it shows the messages from /dev/console? I've tried to edit Xsetup_0 with the -file option but then xconsole doesn't start at all.

Thanks in advance,
Marco
 
Last edited by a moderator:
I get the impression that xconsole is linked to ttyv8 (where X is started), instead of ttyv0 (where all the console messages go to).
Try editing /etc/ttys, and swap the ttyv8 line with ttyv0's, if it looks like this ttyv8 "/usr/local/bin/xdm -nodaemon" xterm off secure. This will start xdm from ttyv0
 
Tried this but then X is moving to ttyv9 and the system console stays under ttyv0. XConsole still shows nothing.
 
I have the same issue when echoing whatever to /dev/console.
I am interested in redirecting Warnings and Errors (gtk, etc...) to x11/xconsole. Is this possible given the state of xconsole mentioned by MarcoB. Is this procedure correct?
 
The TTY is not relevant. xconsole(1) simply reads from /dev/console. What's being sent to /dev/console is set in /etc/syslog.conf:
Code:
*.err;kern.warning;auth.notice;mail.crit               /dev/console
 
I had already uncommented this line. For example, I can see kernel messages when I plug a usb.
Is it possible to add an option /etc/syslog.conf to see the echoes that we redirect to /dev/console?.

I don't know if redirecting warnings and errors to the /dev/console is a common practice, but I think is a good idea to see there all warnings notices, given that I launch gtk applications in subshells with x11/xterm in a x11-wm/w9wm environment.
It is a bit annoying to see all these prints in my working terminal emulator.

Thank you for your attention SirDice.
 
Is it possible to add an option /etc/syslog.conf to see the echoes that we redirect to /dev/console?
I'm not exactly sure what you mean by that. But if you want to generate your own messages look into logger(1).

I don't know if redirecting warnings and errors to the /dev/console is a common practice, but I think is a good idea to see there all warnings notices, given that I launch gtk applications in subshells with x11/xterm in a x11-wm/w9wm environment.
Note that not all applications use syslog(3). Some just open their own log files. You probably don't want to send too much to the console. Alternatively, it's common to enable this line:
Code:
# uncomment this to enable logging of all log messages to /var/log/all.log
# touch /var/log/all.log and chmod it to mode 600 before it will work
#*.*                                            /var/log/all.log
But again, this won't log everything because not all applications use syslog(3).
 
I'm not exactly sure what you mean by that. But if you want to generate your own messages look into logger(1).
This is exactly what I was trying to point when I said 'echoing'. Seems to be the clean way to log messages.
Alternatively, it's common to enable this line:
Code:
# uncomment this to enable logging of all log messages to /var/log/all.log
# touch /var/log/all.log and chmod it to mode 600 before it will work
#*.* /var/log/all.log
I tried this, and I changed the -file option in x11/xconsole to /var/log/all.log, but it eats my resources. I don't know why, but this way you can see all messages including the messages you send through logger().

But given that it is very demanding of resources I will redirect the Warnings to /dev/null in my day to day.

To keep it simple, who wants to redirect messages to /dev/console there's no way to show up it in x11/xconsole. Instead try creating the /var/log/all.log suggested by SirDice or use the already existing /var/log/messages in the -file option, using logger() to log the messages.

Thank you so much.
 
Back
Top