如何防止X11为tty7设置opost?

时间:2016-09-25 10:14:35

标签: linux graphics terminal x11

美好的一天:

我的带有i915显卡的Ubuntu 16.04.1机器对tty2有以下设置:

速度38400波特; line = 0; -brkint -imaxbel iutf8

虽然tty7的设置(X11的终端是)

速度38400波特; line = 0; min = 1;时间= 0; ignbrk -brkint -icrnl -imaxbel -opost -onlcr -isig -icanon -iexten -echo -echoe -echok -echoctl -echoke

在xinit / startx期间,可能X11 / lightdm会为tty7生成那些设置。如何更改X11 / lightdm为tty生成的终端设置?

干杯,

达尼

1 个答案:

答案 0 :(得分:0)

如果X在tty7上运行,则不会将其用于shell登录。但是你可以改变终端属性(它是否有用取决于你使用它的用途)。

假设您拥有权限,例如,以 root

运行
stty opost </dev/tty7

也就是说,重定向在终端上打开一个有效的文件描述符。你可能会看到这样的东西:

$ sudo su -
[sudo] password for whoever: 
# stty -a </dev/tty7
speed 38400 baud; rows 25; columns 80; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>;
eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R;
werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;
-parenb -parodd cs8 -hupcl -cstopb cread -clocal -crtscts
ignbrk -brkint ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -ixon -ixoff
-iuclc -ixany -imaxbel -iutf8
-opost -olcuc -ocrnl -onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
-isig -icanon -iexten -echo -echoe -echok -echonl -noflsh -xcase -tostop -echoprt
-echoctl -echoke
# stty opost </dev/tty7
# stty -a </dev/tty7
speed 38400 baud; rows 25; columns 80; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>;
eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R;
werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;
-parenb -parodd cs8 -hupcl -cstopb cread -clocal -crtscts
ignbrk -brkint ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -ixon -ixoff
-iuclc -ixany -imaxbel -iutf8
opost -olcuc -ocrnl -onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
-isig -icanon -iexten -echo -echoe -echok -echonl -noflsh -xcase -tostop -echoprt
-echoctl -echoke