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

command lineprofile

When the system loads it gives the following error:

Error found while loading /home/[username]/.profile 
mesg: ttyname failed: inappropriate ioctl for device
As a result the session should not be configured correctly
You should fix the problem as soon as feasible

The output of grep -i mesg for .profile and .bash* is as follows:

$ grep -i mesg .profile
mesg n || true
$ grep -i mesg .bash*
$ 

Best Answer

  • 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.

  • Related Question