Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

--lxde not Working with Raspi 4 in autostart session mode #28

Open
hriekehof opened this issue Mar 26, 2020 · 9 comments
Open

--lxde not Working with Raspi 4 in autostart session mode #28

hriekehof opened this issue Mar 26, 2020 · 9 comments
Labels

Comments

@hriekehof
Copy link

hriekehof commented Mar 26, 2020

Hi,

the tool works really great 馃憤 However, i currently have a small problem with a Rapsi 4. When i run this command from the command line in the Raspi Desktop /usr/bin/grafana-kiosk --URL ${dashboard} --login-method local --username xxx --password xxx --kiosk-mode full --lxde
The Kiosk starts fine without any problems. The command line output looks like this:

2020/03/26 14:19:30 path: /home/pi
2020/03/26 14:19:30 command: /usr/bin/lxpanel
2020/03/26 14:19:30 arg0: --profile
2020/03/26 14:19:30 Waiting for command to finish...
2020/03/26 14:19:30 Command finished with error: exit status 1
2020/03/26 14:19:30 path: /home/pi
2020/03/26 14:19:30 command: /usr/bin/pcmanfm
2020/03/26 14:19:30 arg0: --desktop
2020/03/26 14:19:30 Waiting for command to finish...
2020/03/26 14:19:30 path: /home/pi
2020/03/26 14:19:30 command: /usr/bin/xset
2020/03/26 14:19:30 arg0: --desktop
2020/03/26 14:19:30 Waiting for command to finish...
2020/03/26 14:19:30 path: /home/pi
2020/03/26 14:19:30 command: /usr/bin/xset
2020/03/26 14:19:30 arg0: s
2020/03/26 14:19:30 Waiting for command to finish...
2020/03/26 14:19:30 path: /home/pi
2020/03/26 14:19:30 command: /usr/bin/xset
2020/03/26 14:19:30 arg0: -dpms
2020/03/26 14:19:30 Waiting for command to finish...
2020/03/26 14:19:30 path: /home/pi
2020/03/26 14:19:30 command: /usr/bin/xset
2020/03/26 14:19:30 arg0: s
2020/03/26 14:19:30 Waiting for command to finish...
2020/03/26 14:19:30 DISPLAY not set, autosetting to :0.0
2020/03/26 14:19:30 DISPLAY= :0.0
2020/03/26 14:19:30 XAUTHORITY not set, autosetting
2020/03/26 14:19:30 XAUTHORITY= /home/pi/.Xauthority
2020/03/26 14:19:30 Launching local login kiosk
2020/03/26 14:19:30 path: /home/pi
2020/03/26 14:19:30 command: /usr/bin/unclutter
2020/03/26 14:19:30 arg0: -display
2020/03/26 14:19:30 Waiting for command to finish...
2020/03/26 14:19:35 Command finished with error: exit status 1
2020/03/26 14:19:35 KioskMode: Fullscreen
2020/03/26 14:19:35 Navigating to  http://grafana.docker.schoeps.local/d/DGlkbBXWz/fertigung-kapsel?kiosk=1&autofitpanels

When i use the same command in the autostart file in the .config/lxsession/LXDE-pi/autostart and reboot. The Dashboard does not startup. I just see a very small black desktop.
Without the --lxde option everything works fine but than the screensaver turns on at a certain point.
When i'm than running the same command in the lxde desktop the command line output looks like this.

2020/03/26 14:04:42 path: /home/pi
2020/03/26 14:04:42 command: /usr/bin/lxpanel
2020/03/26 14:04:42 arg0: --profile
2020/03/26 14:04:42 Waiting for command to finish...
2020/03/26 14:04:42 Command finished with error: exit status 1
2020/03/26 14:04:42 path: /home/pi
2020/03/26 14:04:42 command: /usr/bin/pcmanfm
2020/03/26 14:04:42 arg0: --desktop
2020/03/26 14:04:42 Waiting for command to finish...

I use the grafana-kiosk.linux.armv7 binary on a raspi 4. Maybe this helps.

@thirdgen88
Copy link

thirdgen88 commented Apr 5, 2020

Also, great job on the tool.. Similar experience as above, but on latest Raspbian on a Rasp Pi 2 Model B.. Using it with the 7" Touchscreen display.

I'm wondering if this has something to do with the unclutter command not exiting? It does not start as a bg process on its own.

@thirdgen88
Copy link

thirdgen88 commented Apr 5, 2020

I've gotten around this issue for myself by putting the following contents in the ~/.config/lxsession/LXDE-pi/autostart file (note that my URL is to a playlist, thus the -playlist flag as well):

@xset s off
@xset -dpms
@xset s noblank
@/usr/local/bin/grafana-kiosk.linux.armv7 -URL <grafana url> -login-method local -username <username> -password <password> -kiosk-mode full -playlist

I was able to verify the screensaver / power saving settings via an ssh session by running:

xset -display 0:0 q

... and taking a look at the Screen Saver and DPMS (Energy Star) sections.

One interesting note is that I originally had a call to unclutter in the autostart file, but noticed a zombie unclutter process alongside the regular one with this output in the ~/.xsession-errors:

...
/usr/bin/unclutter: someone created a sub-window to my sub-window! giving up

It appears that something is already launching unclutter without the extra specification in the autostart (and without the -lxde flag) so I omitted that and all is working as intended. Hope this helps!

@hriekehof
Copy link
Author

@thirdgen88 thanks so much. The different autostart does the trick for me.

@briangann
Copy link
Collaborator

i'll have to get a raspberry 4, seems like there's multiple issues (might be 64-bit related)

@briangann
Copy link
Collaborator

just checking - are you running 32bit or 64bit on your pi4?

@SoMuchForSubtlety
Copy link

Same issue on a pi 3B running 32 bit raspbain. If lxde is enabled the browser window never starts.

@briangann
Copy link
Collaborator

my pi3 isn't doing this:

pi@pi-kiosk-1:~/kiosk $ uname -a
Linux pi-kiosk-1 5.10.60-v7+ #1449 SMP Wed Aug 25 15:00:01 BST 2021 armv7l GNU/Linux
pi@pi-kiosk-1:~/kiosk $ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

do you have an example startup command? i'm using the config/yaml option.

my new pi4 was hit by a power surge/lightning, will have to get a new one.

@SoMuchForSubtlety
Copy link

SoMuchForSubtlety commented Sep 14, 2021

pi@pi-kiosk:~ $ uname -a
Linux pi-kiosk 5.10.60-v7+ #1449 SMP Wed Aug 25 15:00:01 BST 2021 armv7l GNU/Linux
pi@pi-kiosk:~ $ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
pi@pi-kiosk:~ $ cat /home/pi/.config/lxsession/LXDE-pi/autostart
@xset s off
@xset -dpms
@xset s noblank
@/usr/bin/grafana-kiosk -c=/home/pi/config.yaml
pi@pi-kiosk:~ $ cat /home/pi/config.yaml 
general:
  kiosk-mode: full
  autofit: false
# lxde: true
# lxde-home: /home/pi

target:
  login-method: local
  username: administrator
  password: hunter2
  playlists: true
  URL: https://foobar.com/playlists/play/1
  ignore-certificate-errors: false

If I uncomment the lxde settings in the config, it will no longer work.

@penguineer
Copy link
Contributor

I've had the same issue with a Raspberry Pi 2 and ended up fixing it with the changes in #91, tho I guess that the panels are initiated by the lxde autostart.

Earlier tests also hinted that JWM might be a better choice for a window manager that is basically not used.

@github-actions github-actions bot added the stale label Mar 7, 2023
@briangann briangann added no stalebot exempt from stale bot and removed stale labels Mar 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
grafana-kiosk
  
To do
Development

No branches or pull requests

5 participants