Hi all. I've got a new laptop and have installed Mint MATE on it. (previously i used Ubuntu 10).
I have a weird issue that happens periodically. I often tail log files (with tail -f so they update dynamically) and sometimes when lots of logging is scrolling past quickly while i'm viewing it, the following happens:
- the computer totally freezes for a few seconds
- when it comes back, the colours are messed up in my terminal: it seems like all the colours have changed to a different colour. (I'm using Mate Terminal 1.1). This "messing up" doesn't happen the same way every time - it seems random. I can change the ansi colour for my terminal to yellow ("\[\033[0;33m\]") for example and it comes out looking red.
- sometimes this affects my desktop apps: for example in geany or gedit, the syntax colouring has been swapped to different colours (sometimes resulting in unreadable combinations like very dark grey on black)
- restarting the terminal and affected apps makes no difference: the only way i've found to cure it is to reboot.
I mentioned this to a colleage and he theorized that some combination of characters was coming through in the logs and being interpreted as some kind of command sequence by tail, or terminal, or something. Kind of vague and very hard to investigate.
Any ideas anyone? has anyone else encountered this?
Grateful for any advice! thanks for reading.
Colors get messed up, i think when tailing log files
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Colors get messed up, i think when tailing log files
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
-
- Level 1
- Posts: 15
- Joined: Fri Mar 18, 2011 6:07 am
Re: Colors get messed up, i think when tailing log files
Are they system log files or logs from something else? Check to see if the log file is executable.
I had a similar problem recently using cat on some non-human-readable files. Terminal titles changing and all sorts.
Fixed the whole folder with:
I had a similar problem recently using cat on some non-human-readable files. Terminal titles changing and all sorts.
Fixed the whole folder with:
Code: Select all
chmod -R a-x+X
Re: Colors get messed up, i think when tailing log files
Hi - thanks.
They're from a ruby on rails app.Fishbowler wrote:Are they system log files or logs from something else?
Ah, one of the files i've been tailing is executable. (just noticed that) I'll change it and see if the problem recurs. Thanks!Fishbowler wrote: Check to see if the log file is executable.
Re: Colors get messed up, i think when tailing log files
This just happened again, and the log file definitely wasn't executable. :/
Any more ideas, anyone?
Any more ideas, anyone?
- catweazel
- Level 19
- Posts: 9763
- Joined: Fri Oct 12, 2012 9:44 pm
- Location: Australian Antarctic Territory
Re: Colors get messed up, i think when tailing log files
That can happen if the logs contain control codes. I'd be inclined to open the file in a gui text editor and scan for odd-looking characters then remove them. If that fixes the issue then your theorising friend was right.
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.