0

我设置了一个用户服务以将 chomium 作为信息亭运行:

[Unit]
# prodtab Chromium kiosk launcher service
Description=Chromium kiosk auto launch service
Requires=graphical-session.target
After=network.target network-online.target graphical-session.target

[Service]
Type=simple
ExecStartPre=/bin/sh -c 'until ping -c1 google.com; do sleep 1; done;'
ExecStartPre=/bin/echo "kiosk starting"
ExecStart=/usr/bin/chromium-browser --kiosk --incognito --disable-pinch --overscroll-history-navigation=0 --aggressive-cache-discard --disable-cache --disable-translate https://google.com
Restart=always
RestartSec=3
TimeoutStartSec=20

[Install]
WantedBy=multi-user.target

如果我手动使用 systemctl 启动和停止它,它工作正常,但在系统启动时它不起作用,journalctl 给我这个错误:

Sep 23 21:51:08 user-9876-4678A sh[2302]: 64 bytes from lhr25s32-in-x0e.1e100.net (2a00:1450:4009:81e::200e): icmp_seq=1 ttl=116 time=6.59 ms
Sep 23 21:51:08 user-9876-4678A sh[2302]: --- google.com ping statistics ---
Sep 23 21:51:08 user-9876-4678A sh[2302]: 1 packets transmitted, 1 received, 0% packet loss, time 0ms
Sep 23 21:51:08 user-9876-4678A sh[2302]: rtt min/avg/max/mdev = 6.594/6.594/6.594/0.000 ms
Sep 23 21:51:08 user-9876-4678A echo[2304]: kiosk starting
Sep 23 21:51:08 user-9876-4678A systemd[1316]: Started Chromium kiosk auto launch service.
Sep 23 21:51:18 user-9876-4678A chromium-browser[2305]: [2305:2329:0923/215118.939837:ERROR:zygote_communication_linux.cc(276)] Failed to send GetTerminationStatus message to zygote
Sep 23 21:51:18 user-9876-4678A chromium-browser[2305]: [2305:2329:0923/215118.943918:ERROR:zygote_communication_linux.cc(276)] Failed to send GetTerminationStatus message to zygote
Sep 23 21:51:18 user-9876-4678A systemd[1316]: Stopping Chromium kiosk auto launch service...
Sep 23 21:51:18 user-9876-4678A systemd[1316]: Stopped Chromium kiosk auto launch service.
4

0 回答 0