3

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

7
  • There is a typo here: systemmd-user-sessions.service. If that is the actual file, fix that for starters! Sep 7, 2018 at 11:52
  • true! changed it!
    – philipp
    Sep 7, 2018 at 11:53
  • Good. If it still doesn't work, edit the question and add relevant error messages. Sep 7, 2018 at 11:54
  • 1
  • 1
    It would be much nicer if you posted the full error log and not just last 5 lines of it (and not as an image, to that end).
    – intelfx
    Sep 19, 2018 at 13:33

1 Answer 1

1

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

allowed_users=anybody
needs_root_rights=yes

in /etc/X11/Xwrapper.conf.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .