1

I use LinuxMint21, and I go in TTY only when I have an issue with my X session.

Today, I went to a TTY, and I saw messages about sysrqd, partially disabled (was not expected), and I have some upgrade to do with fwupdmgr.

I don't talk about the sourced files, like /etc/issue and such, but messages broadcasted like wall only in TTY (like sysrqd when I hit them keyboard shortcuts).

Is there a way or a hack to have those important broadcast messages in my terminal emulator?

I use xfce4-terminal 0.8.10

TIA.

  • Well, first of all, this is not a "pseudo-terminal", this is a terminal emulator. Secondly, are the messages you are talking about visible on login or randomly pop up? If the first one is true, there is a super easy fix and an easy fix. – Savchenko Dmitriy Mar 18 '23 at 19:22

2 Answers2

1

Today, I went to a TTY, and I saw messages about sysrqd, partially disabled

That was not just any TTY, that was probably the console. Unix (and hence Linux) machines have a single device designated as the console. It gets hidden almost immediately after the kernel starts on modern Linux systems configured as dektop devices but you can get still get back there by pressing ctrl + alt + f1. However some versions of linux are configured to pipe messages to another virtual TTY accessible via ctrl+alt+f?

Messages are sent there initially by the kernel itself via the dmesg buffer (there is also a dmesg command which shows the current buffer contents) amd later by the syslog service (typically rsyslogd). Everything the syslog service writes to the console will usually appear in a log as well.

It is technically possible to redirect console messages to program running in a X Window desktop - SunOS workstation would do this - but I've got no idea how it was implemented and a quick Google failed to turn up anything signficant.

symcbean
  • 5,008
  • 2
  • 25
  • 37
0

Assuming you are asking about a terminal emulator (FYI xfce4-terminal is a terminal emulator, not a PTY), you probably see stuff that appears upon execution of /etc/profile and stuff /etc/profile.d. You could just go into Edit -> Preferences -> Run command as login shell and toggle that on. You should start seeing pretty much the same things you do in a TTY.

Oh and also nobody stops you from adding lines of source /etc/profile.d/thingyouneed.sh to your ~/.bashrc or the autoexec for whatever shell your are using. This way you could cherry-pick scripts to run, i. e. not to get a wall of text every time you fire up a terminal.

  • I think you don't get the point. I would like to intercept the messages like `wall` that I get on `TTY`. It's dynamic and not in `/etc/profile*` – Mévatlavé Kraspek Mar 18 '23 at 20:47