1. 将tty1的登录执行命令改为startx命令, 在未登录状态下执行startx命令
mkdir -p /etc/systemd/system/getty@tty1.service.d
echo "[Service]" > /etc/systemd/system/getty@tty1.service.d/override.conf
echo "ExecStart=" >> /etc/systemd/system/getty@tty1.service.d/override.conf
echo "ExecStart=-/usr/bin/startx" >> /etc/systemd/system/getty@tty1.service.d/override.conf
systemctl enable getty@tty1.service
2. 修改默认startx指定的client的xinitrc文件
vi /etc/X11/xinit/xinitrc
//注释掉原先的, 加上自己的. 先获取屏幕分辨率,再全屏显示
//cdos-desktop-cloud是应用程序名
#. /etc/X11/Xsession
size=`xrandr | grep "connected" | awk '{print $3}'`
cdos-desktop-cloud -geometry $size
参考:
startx 启动的过程_zhangna的博客-优快云博客_startx
xorg - what does startx command do? - Ask Ubuntu
Automatically Login on Debian 9.2.1 Command Line - Unix & Linux Stack Exchange