Discussion:
x11/xconsole not showing any output
(too old to reply)
Marco Beishuizen
2016-05-29 20:04:13 UTC
Permalink
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 this
does not make a difference.

Thanks in advance,
Marco
--
The eye is a menace to clear sight, the ear is a menace to subtle hearing,
the mind is a menace to wisdom, every organ of the senses is a menace to its
own capacity. ... Fuss, the god of the Southern Ocean, and Fret, the god
of the Northern Ocean, happened once to meet in the realm of Chaos, the god
of the center. Chaos treated them very handsomely and they discussed together
what they could do to repay his kindness. They had noticed that, whereas
everyone else had seven apertures, for sight, hearing, eating, breathing and
so on, Chaos had none. So they decided to make the experiment of boring holes
in him. Every day they bored a hole, and on the seventh day, Chaos died.
-- Chuang Tzu
Polytropon
2016-05-29 20:18:02 UTC
Permalink
Post by Marco Beishuizen
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.
It's a very convenient way to check console messages, other than
repeating "dmesg" in an X terminal and checking what's new. :-)
Post by Marco Beishuizen
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 this
does not make a difference.
Are the console permissions set properly? Check if xdm-config does
have the following (or applying) lines:

DisplayManager._0.setup: /etc/X11/xdm/Xsetup_0
DisplayManager._0.startup: /etc/X11/xdm/GiveConsole
DisplayManager._0.reset: /etc/X11/xdm/TakeConsole

In your case, the paths will probably be different, but check the
content of the GiveConsole and TakeConsole scripts: They make sure
your user will actually be able to read from the console (as it's
initially owned by root, and only has rw-/---/--- permissions).

When you are then logged in, check "ls -l /dev/console", and you
should see something similar to this:

% ll /dev/console
crw------- 1 poly wheel 0, 5 2016-05-29 18:38:20 /dev/console

If this is _not_ the case, xconsole doesn't work as expected.
--
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
Marco Beishuizen
2016-05-29 20:36:26 UTC
Permalink
This post might be inappropriate. Click to display it.
Polytropon
2016-05-29 21:10:22 UTC
Permalink
Post by Marco Beishuizen
Post by Polytropon
Are the console permissions set properly? Check if xdm-config does have
DisplayManager._0.setup: /etc/X11/xdm/Xsetup_0
DisplayManager._0.startup: /etc/X11/xdm/GiveConsole
DisplayManager._0.reset: /etc/X11/xdm/TakeConsole
In your case, the paths will probably be different, but check the
content of the GiveConsole and TakeConsole scripts: They make sure
your user will actually be able to read from the console (as it's
initially owned by root, and only has rw-/---/--- permissions).
chown $USER /dev/console
chmod 622 /dev/console
chown root /dev/console
Should the owner be the user here?
This both looks correct, as far as I can tell. $USER is set when
logging in, and xdm sets the owner correctly (as you have verified);
when logging out, the default owner (root) is restored.
Post by Marco Beishuizen
Post by Polytropon
When you are then logged in, check "ls -l /dev/console", and you
% ll /dev/console
crw------- 1 poly wheel 0, 5 2016-05-29 18:38:20 /dev/console
If this is _not_ the case, xconsole doesn't work as expected.
crw------- 1 marco wheel 0x9 May 29 21:24 /dev/console
This also looks like xdm configuration is not the problem here.
Do you get any error message when manually starting xconsole
from a terminal?
--
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
Marco Beishuizen
2016-05-29 21:46:51 UTC
Permalink
Post by Marco Beishuizen
crw------- 1 marco wheel 0x9 May 29 21:24 /dev/console
This also looks like xdm configuration is not the problem here. Do you
get any error message when manually starting xconsole from a terminal?
When running plain xconsole without options I get: Couldn't open
console. But starting xconsole with "xconsole -file /dev/console" shows no
errors, except that it doesn't display anything. Testing it with something
like "echo test > /dev/console" results in xconsole staying blank, but
switching to ctrl+alt+f1 shows that the output went to console/ttyv0 just
fine.

So I think xconsole doesn't point to /dev/console (ttyv0) but to ttyv8
(where X is) for some reason.
--
QOTD:
"It seems to me that your antenna doesn't bring in too many
stations anymore."
Loading...