任务:在 openSUSE 机器上启动时启动 Chromium
问题:我认为问题是我想启动一个 GUI 程序
到目前为止:
Mon Aug 14; 06:45:00; marton;/etc/systemd ; $
Mon Aug 14; 06:45:00; marton;/etc/systemd ; $ ls -l
total 24
-rw-r--r-- 1 root root 529 Mar 15 07:20 bootchart.conf
-rw-rw-r-- 1 root root 138 Aug 14 06:34 chorm_start.service
-rw-r--r-- 1 root root 768 Mar 15 07:20 journald.conf
-rw-r--r-- 1 root root 709 Mar 15 07:20 logind.conf
drwxr-xr-x 1 root root 772 Aug 14 05:16 system
-rw-r--r-- 1 root root 1196 Mar …Run Code Online (Sandbox Code Playgroud) 我像这样为 x0vncserver 创建了 systemd 单元
[Unit]
Description=Remote desktop service (VNC)
After=graphical.target
[Service]
Type=forking
User=user
ExecStart=/usr/bin/sh -c '/usr/bin/x0vncserver -display :0 -rfbport 5900 -passwordfile /home/user/.vnc/passwd &'
[Install]
WantedBy=multi-user.target
Run Code Online (Sandbox Code Playgroud)
并启用它运行但它失败了。然后我意识到当我尝试使用 x0vncserver 加载原始桌面时,我只能在完全加载桌面本身后才能这样做。所以我必须设置系统单元在加载桌面后运行,但是如何?或者任何定时方式来设置它?虽然使用桌面会话工具可能是可能的,但是任何 systemd 方式解决方案?
我的 default.target 是
# systemctl 获取默认值 图形目标