Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Starting Chromium In Kiosk Mode From Bash

Programming languages, Coding, Executables, Package Creation, and Scripting.
Post Reply
Message
Author
pietertheron
Posts: 1
Joined: 2014-12-14 16:48

Starting Chromium In Kiosk Mode From Bash

#1 Post by pietertheron »

Hi,

I'm trying to start Chrome in kiosk mode from a systemd service on boot. The 'webserver app' named 'xx' in the samples launches but chromium never comes up.

xx.service :

Code: Select all

[Unit]
Description=xx Service
After=syslog.target

[Service]
Environment="DISPLAY=:0.0"
Type=forking
WorkingDirectory=/usr/bin/xx/
ExecStart=/usr/bin/xx/xx
ExecStartPost=/usr/local/xx/chromium.sh
Restart=on-abort

[Install]
WantedBy=multi-user.target
chromium.sh

Code: Select all

chromium-browser --kiosk http://xx-01.local:8081 &
Can someone please tell me what I'm doing wrong here?

ohZeishi
Posts: 88
Joined: 2014-12-05 19:51

Re: Starting Chromium In Kiosk Mode From Bash

#2 Post by ohZeishi »

ExecStartPost isn't meant for starting long-running processes, so I guess systemd kills chromium-browser after /usr/local/xx/chromium.sh exits. You can see this by putting a sleep 10 at the end of /usr/local/xx/chromium.sh: Then Chromium comes up and gets killed after 10 seconds.
I don't know if you can "detach" Chromium enough that systemd doesn't kill it. But why not start Chromium from its own unit (with the correct ordering and dependencies)?

Post Reply