starting xconsole on desktop

Is it possible to start xconsole(1) on the desktop? It can be turned by setting it on from XDM. I may have to do this. For convenience, I want to be able to turn it on and off from the desktop, also without restarting my window manager.

xconsole &bg
Code:
couldn't open console
xconsole -file /var/log/dmesg.today & bg
Code:
Couldn't open /var/log/dmesg.today
xconsole -file /dev/console didn't show anything.
doas xconsole
Code:
No protocol specified
Error: Can't open display: :0

Is there another way for the latest output of dmesg to be scrolled to a terminal on my desktop?

less -f /dev/console from root showed nothing. I had to pkill it, to get out of it.
cat /dev/console from root didn't show anything either.


These are older threads on it: Thread cant-run-xconsole-as-non-root-user.61022 (2017), Thread xconsole-failure-in-8-0.9969/ (2010)
 
I got something that would be temporary,
chmod g+r dmesg.today
It still didn't work, as it only output something from dmesg, but not anything that can be used.

Tried temporarily adding this permission to /dev/console, but it didn't work right. If that worked, it would be set in devd.
 
fbtab(5)


Q: When I run xconsole, I get ``Couldn't open console''.
A: If you start X with startx, the permissions on /dev/console will not get changed, resulting in things like xterm -C and xconsole not working.
This is because of the way console permissions are set by default. On a multi-user system, one doesn't necessarily want just any user to be able to write on the system console. For users who are logging directly onto a machine with a VTY, the fbtab file exists to solve such problems.
In a nutshell, make sure an uncommented line of the form
/dev/ttyv0 0600 /dev/console

is in /etc/fbtab and it will ensure that whomever logs in on /dev/ttyv0 will own the console.
Thanks,

I need to try that. I posted it here, bc it's FreeBSD docs.


I found this (very old) -
https://docs.freebsd.org/doc/3.3-RELEASE/usr/share/doc/faq/x.html
search for "Q: When I run xconsole"
There is a link from there - https://www.freebsd.org/cgi/man.cgi?fbtab

I haven't tried.
 
sidetone,

I tried.
I removed a comment from '/dev/console'-related lines in /etc/fbtab and /etc/syslog.conf.
After that xconsole started ok, but nothing is displayed there.

Then I did the following (as stated in /etc/syslog.conf):
Code:
# touch /var/log/console.log
# chmod 644 /var/log/console.log
# /etc/rc.d/syslogd restart
(the recommended /var/log/console.log permissions are 600, but I set 644)

And then in terminal :
Code:
[lanin@freebsd ~]$ tail -F /var/log/console.log
Jun 16 17:54:57 freebsd kernel: Jun 16 17:54:57 freebsd syslogd: exiting on signal 15

In general, I personally prefer the following - just run in the terminal 'tail -F /var/log/messages' :
Code:
[lanin@freebsd ~]$ tail -F /var/log/messages
Jun 16 16:55:30 freebsd upsmon[1555]: UPS pw9130@localhost is unavailable
Jun 16 16:55:35 freebsd upsmon[1555]: Poll UPS [pw9130@localhost] failed - Data stale
Jun 16 16:56:07 freebsd syslogd: last message repeated 6 times
Jun 16 16:58:08 freebsd syslogd: last message repeated 23 times
Jun 16 16:58:18 freebsd syslogd: last message repeated 2 times
Jun 16 16:58:22 freebsd upsd[1542]: mainloop: Interrupted system call
Jun 16 16:58:22 freebsd upsd[2075]: /usr/local/etc/nut/upsd.conf is world readable
Jun 16 16:58:22 freebsd upsd[2075]: /usr/local/etc/nut/upsd.users is world readable
Jun 16 16:58:23 freebsd upsmon[1555]: Poll UPS [pw9130@localhost] failed - Write error: Broken pipe
Jun 16 16:58:28 freebsd upsmon[1555]: Communications with UPS pw9130@localhost established
Jun 16 17:22:53 freebsd su[2174]: BAD SU lanin to root on /dev/pts/3
Jun 16 17:34:39 freebsd su[2216]: lanin to root on /dev/pts/1
Jun 16 17:37:20 freebsd su[2246]: BAD SU lanin to root on /dev/pts/5
Jun 16 17:43:02 freebsd openvpn[1596]: VERIFY OK: depth=1, CN=server
Jun 16 17:43:02 freebsd openvpn[1596]: VERIFY KU OK
Jun 16 17:43:02 freebsd openvpn[1596]: Validating certificate extended key usage
Jun 16 17:43:02 freebsd openvpn[1596]: ++ Certificate has EKU (str) TLS Web Server Authentication, expects TLS Web Server Authentication
Jun 16 17:43:02 freebsd openvpn[1596]: VERIFY EKU OK
Jun 16 17:43:02 freebsd openvpn[1596]: VERIFY OK: depth=0, CN=server
Jun 16 17:43:02 freebsd openvpn[1596]: Outgoing Data Channel: Cipher 'AES-256-CBC' initialized with 256 bit key
Jun 16 17:43:02 freebsd openvpn[1596]: Outgoing Data Channel: Using 160 bit message hash 'SHA1' for HMAC authentication
Jun 16 17:43:02 freebsd openvpn[1596]: Incoming Data Channel: Cipher 'AES-256-CBC' initialized with 256 bit key
Jun 16 17:43:02 freebsd openvpn[1596]: Incoming Data Channel: Using 160 bit message hash 'SHA1' for HMAC authentication
Jun 16 17:43:02 freebsd openvpn[1596]: Control Channel: TLSv1.3, cipher TLSv1.3 TLS_AES_256_GCM_SHA384, peer certificate: 2048 bit RSA, signature: RSA-SHA256
Jun 16 17:54:57 freebsd syslogd: exiting on signal 15
Jun 16 17:54:57 freebsd syslogd: kernel boot file is /boot/kernel/kernel
Jun 16 17:59:20 freebsd kernel: pid 2398 (gnome-photos), jid 0, uid 1001: exited on signal 5
...

EDIT: ...and removed a comment from line starting with 'console.info...' (in /etc/syslog.conf)
EDIT2: to test, run a new terminal, and type in it:
Code:
echo "Hi" > /dev/console
A new line will appear in the terminal in which the 'tail -F /var/log/console.log' command is run.
 
Anybody ever figure this out. I get a console when I run xdm and start xfce that shows me console messages. But, if I add:
Code:
xconsole -geometry 480x100-0-0 -daemon -notify -verbose -fn -exitOnFail &

to .xinitrc and startx, I get an xconsole that says "Couldn't open console.
 
Back
Top