Results 1 to 6 of 6

Thread: Error when found when loading /root/.profile: stdin: is not a tty

  1. #1
    Join Date
    Sep 2013
    Beans
    1

    Error when found when loading /root/.profile: stdin: is not a tty

    I received this error message after enabling graphical root login at login menu and I don't know what it means nor how to address the "problem" ("problem" because everything seems to work fine)
    Attached Images Attached Images

  2. #2
    Join Date
    Mar 2006
    Location
    Williams Lake
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Error when found when loading /root/.profile: stdin: is not a tty

    Quote Originally Posted by sterlingbutters View Post
    I received this error message after enabling graphical root login at login menu and I don't know what it means nor how to address the "problem" ("problem" because everything seems to work fine)
    Why do you want to log in as root graphically?

  3. #3
    Join Date
    May 2014
    Location
    Germany
    Beans
    158
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Error when found when loading /root/.profile: stdin: is not a tty

    1. This thread should have been posted in a support forum, not in the Linux & OS chat.

    2. The two previous posters are right: there's a reason why graphical root login is disabled by default - it's a bad idea. Apart from the security risk (any program you run will have full control over your computer), any mistake you make could have deadly consequences for your system. If you want to run a graphical application as root, the correct procedure would be:
    Code:
    ALT+F2 (this lets you enter a command in Unity)
    gksudo <application>
    Replace <application> with the name of the program you want to run. gksudo is the graphical equivalent of the commandline sudo; for technical reasons you are encouraged not to use the normal sudo to run graphical apps.

    3. To get back to your original question: I don't how to fix your problem, but I can give you a brief explanation. stdin is the standard input stream; it takes text that the user inputs on the commandline and passes it on to whatever program asked for it. Usually it points to a terminal (tty), but it can be redirected to other devices, which seems to have happened here. Why or wherefore I do not know, but if you stick to the advice in point 2) you hopefully won't get the error again

  4. #4
    Join Date
    Sep 2006
    Location
    France.
    Beans
    Hidden!
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: Error when found when loading /root/.profile: stdin: is not a tty

    Thread moved to General Help.
    | My old and mostly abandoned blog |
    Linux user #413984 ; Ubuntu user #178
    J'aime les fraises.
    Nighty night me lovelies!

    | Reinstalling Ubuntu ? Please check this bug first ! |
    | Using a ppa ? Please install ppa-purge from universe, you may need it should you want to revert packages back |
    | No support requests / username changes by PM, thanks. |
    [SIGPIC][/SIGPIC]

  5. #5
    Join Date
    Jun 2014
    Beans
    Hidden!

    Re: Error when found when loading /root/.profile: stdin: is not a tty

    Quote Originally Posted by sterlingbutters View Post
    I received this error message after enabling graphical root login at login menu and I don't know what it means nor how to address the "problem" ("problem" because everything seems to work fine)
    The problem is in /root/.profile file. At the end of that file you have:
    Code:
    mesg n


    But it doesn't works in graphical mode because (taken from man mesg) "mesg assumes that its standard input is connected to your terminal".

    Change it to:
    Code:
    if `tty -s`; then
       mesg n
    fi

  6. #6
    Join Date
    Dec 2010
    Beans
    5

    Re: Error when found when loading /root/.profile: stdin: is not a tty

    I got the same problem, and thanks fprietog for supplying the correct answer.

    Thanks to all how pointed out that it is unsafe to login graphically as root.

    You know, I love Linux. And the one of the reasons is that I decide how I want toconfigure the box and not some company like microsoft or cannonical.
    I hope it stays this way.

    BTW this should be treated as a bug, because it assumes a non-graphical login

    Regards,
    Nico

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •