diff --git a/Software/Development/Environment/Qt/Embedded/Qt_Embedded_说明.md b/Software/Development/Environment/Qt/Embedded/Qt_Embedded_说明.md index 81c571c..09d6a15 100644 --- a/Software/Development/Environment/Qt/Embedded/Qt_Embedded_说明.md +++ b/Software/Development/Environment/Qt/Embedded/Qt_Embedded_说明.md @@ -138,9 +138,11 @@ chkconfig --list | grep mydemo [Unit] Description=MyDemo # After=syslog.target -After=network.target -After=multi-user.target +# After=network.target +# After=multi-user.target # After=graphical.target +After=plymouth-quit-wait.service +# After=systemd-logind.service [Service] RestartSec=2s @@ -155,13 +157,19 @@ Restart=always WantedBy=multi-user.target ``` -也可以视情况将 After=multi-user.target 修改为 After=graphical.target。 +也可以使用 After=graphical.target。 然后使用 systemctl 命令控制服务: ```bash -systemctl enable mydemo -systemctl start mydemo -systemctl stop mydemo -systemctl disable mydemo +sudo systemctl enable mydemo +sudo systemctl start mydemo +sudo systemctl stop mydemo +sudo systemctl disable mydemo +``` + +如果 Screen 的虚拟终端遮蔽了 QPA 应用程序,则可以将其关闭: + +```bash +sudo systemctl mask getty@tty1.service ```