term does not start in linux mint

A friend of mine just experienced a very strange issue. He uses linux mint (I use Ubuntu, and I don’t know if the same problem occurs in Ubuntu).

He tried to run term from the menu, and nothing happened. He tried running term in numerous ways (CTRL-SHIFT-T e.g.), and again, nothing happened.

Fortunately, xterm could start, so we had a toehold. The first thing we did was to take a look at the logs (/var/log). However, we did not see anything informative there, nor did we find anything useful by running dmesg.

Then we tried running uxterm, another application which we thought might work. It failed by opening with a small window containing an error message that said something like “gnome terminal locale not supported” – together with my friend’s user password, shown in the clear! That was a bit scary – it looked as if his system had been hacked in some way.

An internet search of “gnome terminal locale not supported” turned up a forum link which described a problem with locale. My friend typed in locale -a, as suggested in that thread, and saw his user password appear on many of the output lines – also alarming!

So far as we could tell, locale gets its information from environment variables like LC_TIME and LANG. Where were these being set? At this point, it seemed most likely that some environment variables might have been set incorrectly in some bash script. A quick search of my friend’s home directory (we grepped for the password in all files) turned up the culprit – the corrupt setting was in the .dmrc file. My friend had not knowingly changed this file. Somehow, though, it had been edited so that Language was set to his user password.

He edited the file to switch the Language line back to its correct setting, like this:

[Desktop]
Session=gnome
Language=us_EN.utf8

After a reboot of the system just to be extra safe, he was now able to open a terminal using term again.

I hope this helps anyone who might have a similar problem. I found a forum post from someone who appeared to have the exact same problem in linux mint, but the thread was locked, otherwise I would have posted the solution there.

Leave a Reply

Your email address will not be published. Required fields are marked *