/root/.bashrc
# 下面是自己写的启动后自动执行的指令
# 如果是非交互式 shell,直接退出,避免执行 scp 和 sftp 指令(运行的是非交互式 shell )时重复执行这些指令。
[[ $- != *i* ]] && return
fbset -fb /dev/fb0 -g 1920 1080 1920 1080 32
# 只使能 HDMI 显示,关闭另外两个显示。
xrandr --auto --output HDMI-1 --primary --pos 0x0
xrandr --output LVDS-1 --off
xrandr --output DSI-1 --off
# 提供远程桌面
tightvncserver :1 -geometry 1920x1080 -depth 24
# 更新系统时间
systemctl start ntp
# 关于显示重要指令
systemctl stop display-manager # 关闭 X11 显示服务器
#systemctl start display-manager # 重启 X11 显示服务器 (1/4)
#xrandr --auto --output HDMI-1 --primary --pos 0x0 # 重启 X11 显示服务器 (2/4)
#xrandr --output LVDS-1 --off # 重启 X11 显示服务器 (3/4)
#xrandr --output DSI-1 --off # 重启 X11 显示服务器 (4/4)