Error found while loading /home/[username]/.profile

In terminal...

gedit .profile

change this:

mesg n || true

to this:

tty -s && mesg n || true

The .profile for the root account may require a similar (but slightly different) fix.


stty -ixon on .profile

I had that command on my .profile, and it was causing the problem in Ubuntu 17.10.

I had put it there because of the recommendations on this question: https://unix.stackexchange.com/questions/12107/how-to-unfreeze-after-accidentally-pressing-ctrl-s-in-a-terminal