TransWikia.com

start chromium on startup using systemd

Unix & Linux Asked on December 14, 2020

I am having trouble to start chromium within openbox within xorg on startup, using systemd.

I have a script that starts everything:

#/opt/kiosk.sh
#!/bin/bash

xset -dpms
xset s off
openbox-session &
start-pulseaudio-x11

chromium-browser --kiosk --no-first-run  'http://thepcspy.com'

typing (as root):

sudo -u kioskuser startx /etc/X11/Xsession /opt/kiosk.sk --

starts the browser just as it should be.

How can I accomplish this via systemd

Right now I have:

 #/etc/systemd/system/kiosk.service

 [Unit]
 After=systemd-user-sessions.service

 [Service]
 User=kioskuser
 StartExec=/bin/bash -c 'startx /etc/X11/Xsession /opt/kiosk.sk --'

 [Install]
 WantedBy=multi-user.target

But it does not work. Any Ideas?

Here the resulting error:

enter image description here

One Answer

I missed to install xserver-xorg-legacy and to put:

allowed_users=anybody
needs_root_rights=yes

in /etc/X11/Xwrapper.conf.

Answered by philipp on December 14, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP