加载/home//.profile时发现错误

系统加载时会出现以下错误:

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 

.profile.bash*grep -i mesg的输出如下:

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

terminal ……

 gedit .profile 

改变这个:

 mesg n || true 

对此:

 tty -s && mesg n || true 

root帐户的.profile可能需要类似(但略有不同)的修复。

stty -ixon on .profile

我在.profile上有这个命令,它导致了Ubuntu 17.10中的问题。

由于这个问题的建议,我把它放在那里: https : //unix.stackexchange.com/questions/12107/how-to-unfreeze-after-accidentally-pressing-ctrl-s-in-a-terminal