1

I'm trying to get following to work. Unfortunately, everything I tried so far did not.

  • I have a Raspberry Pi 4 with Raspbian (Buster) installed.
  • I have 3 users (root, pi and "kiosk"). The user "kiosk" is no sudoer (and should never be).
  • auto-login to GUI for user "kiosk" is in effect

Now I want for the user "kiosk" (and only for this user) to auto-start chromium.

So far I tried the following

  1. Added "LXDE-kiosk" folder in /etc/xdg/lxsession/, copied contents of /etc/xdg/lxsession/LXDE and adjusted autostart file. However chromium was not started on reboot..
  2. I added a script to home/kiosk which should start a chromium browser and called it in crontab with a @reboot entry. This did not work either. Later I found out that no GUI app should be startet via cron.

To be honest, I don't understand why the first option did not work. Is it even possible to have different autostart options for different users? When adjusting the "LXDE-pi autostart" file, everything works as expected.

(Edit: I also tried it with the old location /home/kiosk/.config/lxsession/LXDE/autostart with no luck).

0
1

The first option did not work because LXDE-pi is not a folder belonging to the user pi, despite the name. It's a folder with a global config for a desktop environment profile called LXDE-pi.

I'd concentrate on getting /home/kiosk/.config/lxsession/LXDE/autostart to work. Put a simple script there which creates a file in /tmp or something similar, and see if that works. If not, find out why. Most likely, it's because you're still using the LXDE-pi profile and the path should be /home/kiosk/.config/lxsession/LXDE-pi/autostart.

AFAIK another option is to create a *.desktop file in /home/kiosk/.config/autostart.

Once a simple script works, try out Chromium. My advice is to run it interactively with kiosk user in the beginning, to make sure it can run at all.

1
  • Thank you very much. Indeed /home/kiosk/.config/lxsession/LXDE-pi/autostart (so changing to LXDE-pi) did the trick. Great. :) – Andreas Jul 24 '20 at 11:42
1

Install gnome-tweeks. There is an option called Startup Applications there. Click on the + to add your startup apps. I'm using rpi4.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.