I am creating a web-kiosk setup to launch a browser.
I have a user “kiosk” where this runs fine. My issue is this attempts to run as root as well. It obviously fails, and goes into a restart loop. Am I missing something? I thought these should only run as a regular user.
[root@DvZ1CO4N:~]# journalctl --user -u kiosk-chrome
Jun 06 19:26:28 DvZ1CO4N systemd[4379]: kiosk-chrome.service: Failed with result ‘exit-code’.
Jun 06 19:26:30 DvZ1CO4N systemd[4379]: kiosk-chrome.service: Scheduled restart job, restart counter is at 2602.
Jun 06 19:26:30 DvZ1CO4N systemd[4379]: Starting Start Chrome in Kiosk Mode…
Jun 06 19:26:30 DvZ1CO4N systemd[4379]: Started Start Chrome in Kiosk Mode.
Jun 06 19:26:30 DvZ1CO4N chromium[47953]: [47953:47953:0606/192630.801461:ERROR:content/browser/zygote_host/zygote_host_impl_linux.cc:105] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
Jun 06 19:26:30 DvZ1CO4N systemd[4379]: kiosk-chrome.service: Main process exited, code=exited, status=1/FAILURE
systemd.user.services.kiosk-chrome = {
description = “Start Chrome in Kiosk Mode”;
enable = true;
wantedBy = [ “default.target” ];
requires = [ “graphical-session.target” ];
after = [ “graphical-session.target” ];
serviceConfig = {
Environment = [
“DISPLAY=:0”
“XAUTHORITY=/home/kiosk/.Xauthority” # Very important!
“XCURSOR_THEME=blank”
];
ExecStart = “${pkgs.chromium}/bin/chromium --kiosk --no-first-run --disable-pinch ${jsonConfig.homepage or “about:blank”}”;
Restart = “always”;
RestartSec = 2;
};
};