A strange stdin error started coming recently while logging in Ubuntu GUI as root. While this is actually a bug which was assumed by ubuntu developers while creating .profile file. The main culprit is the

mesg n

line at the end of this file. This line assumes that you are logging in as terminal user and not GUI user and therefore it needs to be modified to the following condition

if `tty -s`; then

mesg n

fi

Hope some of you find it useful to remove this error.

Ubuntu stdin tty error while login as root

2 thoughts on “Ubuntu stdin tty error while login as root

  • August 13, 2015 at 11:35 am
    Permalink

    I think there is an error:
    if `tty -s`; then

    mesg n

    if<—————— should be fi

    Reply
  • October 1, 2015 at 3:38 am
    Permalink

    It worked. thanx a many.

    Reply

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.