I'm using my raspi as a mini meteo station which (for now) only measure humidity and temperature, and I want it to display those infos on a little screen. Considering technologies I can handle, the appropriate way would be to launch a web browser in full screen, pointing to a localhost project.
The screen is connected on the HDMI port and I'm connecting to the rpi by SSH (KiTTY for Windows 10). Since I only installed some GUI packages (mostly
openbox I think) on a headless rpi, it boots on the CLI which displays perfectly on the screen. I use my rpi as a server and for some hobbyist domotic so installing a full GUI environment would be an overkill. Besides, I know this can be done and I'd like to improve my little understanding of the rpi's linux.
After hours of research, I came to launch the following script with the command
#!/bin/sh export DISPLAY=:0 chromium-browser --app=http://localhost --start-fullscreen
Despite the browser successfully displaying my HTML
hello world, I have two big problems here:
this only works if I run the script from the rpi CLI (I plugged a keyboard to try), and not from the SSH, even with sudo (it says that
parse_vt_settings: Cannot open /dev/tty0 (Permission denied)). I still can stop it with
pkill xfrom the SSH though. I'm logged as
pion both Pi and SSH.
the window only takes half the screen width but all the available height. I uncommented
/boot/config.txtand rebooted, and the windows was full-screen, but with a crappy little resolution. I'm not sure it comes from chromium or some lower-level windows managing.
I installed quite a bunch of packages (I cannot remember the whole list) during my research of a solution so I hope it didn't mess around the config, but I'm a bit scared to lose other stuff if I restart from scratch.
ADDITIONAL INFO: (with links that didn't really helped me, but it could be because I don't really know everything I am doing)
exec openboxthrows the message "Openbox-Message: Failed to open the display from the DISPLAY environment variable" like here and event reboot the CLI (
.bash_profileis ran). If I run this after the
startxcall it only adds a top bar to my chromium windows.
sudo Xorg -configurelists 8 video drivers and says that there is "No devices to configure. Configuration failed" like here. There is no