Using autostart hangs

All questions and problems regarding LXDE components including LXSession, LXAppearance, GPicView, Leafpad, LXTerminal, Xarchiver, LXNM to be discussed here.

For PCManFM questions, please ask in the dedicated forum below.
Locked
snatchy
Posts: 1
Joined: Thu Aug 05, 2021 5:47 pm

Using autostart hangs

Post by snatchy »

I'm using two touchscreens with a Pi 4, so have this script to map the USB interfaces with the displays:

Code: Select all

xinput map-to-output 8 HDMI-1
xinput map-to-output 7 HDMI-2
This works great, until I put it into `/home/pi/.config/lxsession/LXDE-pi/autostart`, but then it just boots to blank screens.

I've tried inserting a `sleep` in case it wasn't ready to do it, and also I have tried prefixing with `@`

Code: Select all

@sleep 60
@xinput map-to-output 8 HDMI-1
@xinput map-to-output 7 HDMI-2
but neither made a difference, and also calling it as a script like

Code: Select all

@. /home/pi/mapdisplays
...but still nothing. What am I doing wrong?
drooly
Posts: 791
Joined: Mon Apr 08, 2013 6:45 am

Re: Using autostart hangs

Post by drooly »

So, do I understand correctly:
  • a graphical login hangs as soon as you add these commands
  • without these commands the graphical login does not hang
  • the commands work fine executed by themselves
???

You can always try appending an ampersand to each command, like so:

Code: Select all

xinput map-to-output 8 HDMI-1 &
xinput map-to-output 7 HDMI-2 &
although I don't think this is what's causing this error.

Please define "hangs" - What _exactly_ happens? Anything in the logs?
Show us a part of

Code: Select all

journalctl -b
for the relevant timespan.
Locked