-
-
Notifications
You must be signed in to change notification settings - Fork 495
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DietPi-Software | Chromium: Allow to use app mode instead of kiosk mode #2938
Comments
@meeki007 Note to self: https://peter.sh/experiments/chromium-command-line-switches/ |
Well I'd love to contrib to this but I have no Idea where to find /var/lib/dietpi/dietpi-software/installed/chromium-autostart.sh on the dev branch. is chromium-autostart.sh generated by a scrip somewhere? I have the Dev Branch forked. standing by for direction. |
It does not show the prompt as it is running in app mode.
|
@meeki007 |
Okay, first I was thinking, that without
Now trying to replicate the error prompt:
@meeki007 Testing
Testing
Testing with: --noerrdialogs: 🈴 Does not solve it, as it is no error prompt, just a hint to restore last session. Btw found the request to automatically disable session prompt in kiosk mode: https://bugs.chromium.org/p/chromium/issues/detail?id=438755 Okay it seems that when using the app mode, this mostly overrides the kiosk mode. As those have different behaviours, I'm not gonna implement this as default for now. So app mode and kiosk mode are two different things. Changing the mode will make users face different behaviour suddenly. |
OK I now see what made the error dialog disappear. I did not have to use any tricks so I looked at all my switches im using. The combination needed to get no errordialog is --incognito --kiosk I just noticed it in my current line. sorry my mistake. |
@meeki007 |
Been in Java script land for the last 2 years. Build some crazy stuff in BASH for lighthouse-puppy-linux years ago. Give me 6hrs im enjoying the bash challenge. Let me write in some checks and a user box for adding command-line-switches with a recommended input and change at your own risk thing warning. Then you can clean up my bash if needed. |
@meeki007 |
Oh the screen resolution thing is on my mind I was going to ask you later but might as well now. Issue - Build kiosk on a test rig with a 1280 x 720 screen installing dietpi so i had to fix that by hand as well it would save me some time to know where and what is writing them values to dietpi.txt |
Just having fun learning the G_WHIP_MENU system ATM |
This is not automatically changed, besides on RPi when changing the resolution: https://github.com/MichaIng/DietPi/blob/dev/dietpi/dietpi-config#L979-L980
Sadly there is no generic way to estimate the current screen resolution, otherwise we would have automated that. |
Auto detecting the screen resolution using methods to pull data from hdmi
So...... ummmm i think I broke some brains eh? |
installing fresh version of dietpi on: Putting chrome on hold as i may have found a solution for detecting screen resolution or ignoring it if no hdmi data can be pulled. This is fun. |
@meeki007
Found: https://packages.debian.org/stretch/edid-decode
|
Correct :) However I'm compiling this >>> http://www.polypux.org/projects/read-edid/ Easy-er doc to read for it http://manpages.ubuntu.com/manpages/trusty/man1/get-edid.1.html |
Okay so on RPi we can do auto detection and use the dietpi.txt entries as fallback.
Perhaps do this when having dietpi.txt entries set to "auto" but still allow to set custom resolution? Although why would someone want to have Chromium not fill the full screen... 😄 |
ummm I had to this once. Auto Detection PI +1 but..... check the config.txt for user set resolution as many do Always have box with resolution detected or user set displayed with the ability to change it hmmm So No point on us both writing BASH at the same time on the same thing. ....... |
its about dang time i contributed to DietPI got 30+ units running it ATM in a industrial refrigeration and food warehouse. Running temp, pressure, nitro sensors, light poles, camera motion sensors work with node-red to alarm system so if wind not person triggering door sends video etc. Diet pi is my goto Kinda a heavy user of the dietpi :) |
I would start working/helping on this (coding way) for v6.26 and am just collecting infos/ideas for now.
Yeah reasonable to always have the dietpi.txt values as fallback if auto detection fails, e.g. binary not available or no valid integers were returned (after mawk scraping). |
Sound's Good: This may take some time as I'm going about learning your code the way it will stick in my brain. Then I put it in my notes for building the code.
Have no fear the questions will come if i dead end somewhere Thanks for your support at the start. Got me motivated to dig deep |
@meeki007 In case of scripts and other non-interactive shells, where globals are not loaded: This |
As reference since this should be merged, when we touch Chromium options: #2575 (comment)
|
oh code added .txt to end |
Just for reference: https://dietpi.com/phpbb/viewtopic.php?f=11&t=6070 |
Hi Guys, sorry for coming back to this after such a long time :) The original post started with a request to hide error dialog's on Chromium while using the Kiosk mode. I see |
@Joulinar
|
@MichaIng |
It seems the order of the switches matters. e.g. adding --app overrides --kiosk. Also, I found that --noerrdialogs needed to be appended to the end (I mistakenly put it at the start where it didn't appear to take effect). |
Jep app overriding kiosk is also what I found, but was not able to have it the other way round, hence not sure if the order counts. What counts about the order is that one needs to take care to not add an argument/option to the xinit command, hence it must be applied after the chromium command/binary. --noerrdialogs at least has no effect on the prompt to restore last session as this is no error 😉. |
I just discovered that you can get Chromium to start at the correct resolution if you wrap it in a script. Basically:
Finally, in the "real" Chromium script you can fetch the resolution with
Unrelated, but useful to know: you can also start
Edit: the last point seems to have vanished after a reinstall. 🤔 |
DietPi version - v6.24.1
Distro version - stretch
Kernel version - 4.19.42-v7+
SBC device - RPi 3 Model B+
Power supply used - 5.1v 2a
SDcard used - 32gb Samsung evo plus
Software title:
/DietPi/dietpi/dietpi-autostart
/var/lib/dietpi/dietpi-software/installed/chromium-autostart.sh
Steps to reproduce
Expected behavior
Should not have warnings pop up on a Kiosk device.
User may not have a mouse to click the warning away.
Suggest changing --homepage to --app
/var/lib/dietpi/dietpi-software/installed/chromium-autostart.sh
# - Add URL for first run: URL=$(grep -m1 '^[[:blank:]]*SOFTWARE_CHROMIUM_AUTOSTART_URL=' /DietPi/dietpi.txt | sed 's/^[^=]*=//') CHROMIUM_OPTS+=" --app $URL"
Tested and running fine in my environment.
The text was updated successfully, but these errors were encountered: