나를 시작하려면 firefox 인스턴스팅됩니다. 내가 만든 두 개의 서비스:
서비스 시작하는 파이어 폭스:
[Unit]
Description=Service running firefox
After=network.target
[Service]
Type=simple
User=me
Environment="DISPLAY=:0"
ExecStart=/usr/bin/firefox --new-window /usr/local/src/index.html
Restart=on-failure
RestartSec=1
TimeoutSec=60
RuntimeMaxSec=infinity
[Install]
WantedBy=multi-user.target
그런 다음 서비스를 보내 F11 명령을 사용하려면 전체 화면. (나는 관리하지 않은 모든 것을 만들기 위해서 하나의 서비스)
[Unit]
Description=Service for firefox fullscreen
After=network.target start_firefox
BindsTo=start_firefox
[Service]
Type=simple
User=me
Environment="DISPLAY=:0"
ExecStart=/usr/bin/xdotool search --sync --onlyvisible --class "Firefox" windowactivate key F11
Restart=on-failure
RestartSec=1
TimeoutSec=60
RuntimeMaxSec=infinity
[Install]
WantedBy=multi-user.target
그러나,그것은 작동하지 않습니다. 로그에서 얻을 두 번째는 서비스:
systemd[1]: Started Service for firefox fullscreen
xdotool[6268]: Error: Can't open display: (null)
xdotool[6268]: Failed creating new xdo instance
systemd[1]: firefox_fullscreen.service: Main process exited, code=exited, status=1/FAILURE
systemd[1]: firefox_fullscreen.service: Failed with result 'exit-code'.
systemd[1]: firefox_fullscreen.service: Service hold-off time over, scheduling restart.
systemd[1]: firefox_fullscreen.service: Scheduled restart job, restart counter is at 4.
systemd[1]: Stopped Service for firefox fullscreen
무엇이 잘못된 것입니까?
나는 실행하려고 이를 통해 ssh 보드에 우분투를 사용하고 연결하여 화면입니다.