Oh that's a terrific tip. Very helpful. Thanks!markol wrote: Fri Jul 08, 2022 4:54 amKSystemLog provides an easy way to control the reading and the monitoring of log files. Indeed, sometimes you only need to analyze some existing log lines. In this case, you cannot tolerate the appearance of a new line. You can deactivate the monitoring of log files by clicking on the Stop button. This stops the opened log files from being updated while still letting them get filled by other processes.
How can I retrieve messages that splash on the screen, just before shutdown? [Solved]
Re: How can I retrieve messages that splash on the screen, just before shutdown?
Re: How can I retrieve messages that splash on the screen, just before shutdown?
Thanks alot for that extensive help guide. I dont know if I will succeed in making this all work, because I have zero experience with the terminal. But many thanks for posting this helpful guide. Cheers!Stuart_M wrote: Fri Jul 08, 2022 4:41 pm I know you were asking about a way to "look back what these messages were", but I do not believe that is possible from the system logs because the file system is being dismounted as part of the shutdown (halt) procedure.
There are other ways to record this information such as taking a video or image of the screen during shutdown or using a video capture card (from another computer?) to record the video output from the motherboard, etc., but they are not really practical.
I found a way that will pause the end of the rapidly scrolling text that occurs during a shutdown or restart. While it will NOT write that information to a log file, it will pause the text so it can be read and then "Enter" is used to complete the shutdown (halt).
Re: How can I retrieve messages that splash on the screen, just before shutdown?
That's what I figured and that is why I tried to make it as simple as possible. Even though it's a somewhat long post, all that is needed is to run four commands in the order given. I know it works with MX-21 Xfce but I have not tested it with MX-21 KDE (I would think it should work).SO2001 wrote: Thu Jul 14, 2022 10:33 am I dont know if I will succeed in making this all work, because I have zero experience with the terminal.
In the hopes of making it easier to follow I consolidated my Post #10 here. The only thing that needs to be done is to run the below four commands in a Terminal in the order given. For each command there are basically only two steps needed to get it into the Terminal:
- Highlight everything inside the code window by clicking on "SELECT ALL" and then right-click over the highlighted text and select "Copy" (another way is to press Ctrl+C after the text is highlighted to copy).
- Now Paste what was just copied into a Terminal. This is done by right-clicking on the Terminal and select "Paste" (another way to paste in a Terminal is by using Ctrl+Shift+V [press the Control + Shift + V keys together).
- When pasting the commands from the 1st and 4th code window below into the Terminal, you will be prompted to accept pasting. This is because those two commands contains line-feeds (similar to what the "Enter" key does) and is a security concern with unknown commands. The commands are safe to use so accept the prompt by clicking the "Paste" button in the warning window.
All four commands will require you to enter your User password after the command is run. This is because those commands use "sudo" for elevated privileges (files are being modified in the root directory). Just follow the prompts in the Terminal.
Code: Select all
sudo tee /etc/init.d/pause_hook <<!
#! /bin/sh
### BEGIN INIT INFO
# Provides: pause_hook
# Required-Start:
# Required-Stop: halt reboot
# Default-Start:
# Default-Stop: 0 6
# X-Stop-After: umountroot
# X-Interactive: true
# Short-Description: Pause before halt or reboot
# Description:
### END INIT INFO
do_stop () {
[ -r /etc/pause_hook.conf ] && . /etc/pause_hook.conf
[ "\$PAUSE_HOOK_ENABLED" = true ] && read -p "Press Enter to continue" reply
}
case "\$1" in
start)
# No-op
;;
restart|reload|force-reload)
echo "Error: argument '\$1' not supported" >&2
exit 3
;;
stop)
do_stop
;;
*)
echo "Usage: \$0 start|stop" >&2
exit 3
;;
esac
!
Code: Select all
sudo chmod -c 755 /etc/init.d/pause_hook
Code: Select all
sudo update-rc.d pause_hook defaults
Code: Select all
sudo tee /etc/pause_hook.conf <<!
PAUSE_HOOK_ENABLED=true
!
If you later decide you don't want the pause during shutdown/restart then just comment out the only line that appears in /etc/pause_hook.conf (see the last paragraph of Post #10). If you need help/clarification please ask.