cat /DietPi/dietpi/.versionG_DIETPI_VERSION_CORE=6
G_DIETPI_VERSION_SUB=18
G_DIETPI_VERSION_RC=14
G_GITBRANCH=master
G_GITOWNER=Fourdee
echo $G_DISTRO_NAME or cat /etc/debian_version9.6
uname -aLinux DietPi 4.14.79-v7+ #1159 SMP Sun Nov 4 17:50:20 GMT 2018 armv7l GNU/Linux
echo $G_HW_MODEL_DESCRIPTION or (EG: RPi3)RPi 3 Model B (armv7l)
YES
dietpi-bugreport IDce5fdb5b-eab0-4c43-aab5-03dfac604491
When system boots, it's still in terminal saying:
/DietPi/dietpi/login: line 125: /var/lib/dietpi/dietpi-software/installed/chrome-autostart.sh: No such file or directory
@davidhq
Many thanks for the report 👍
I'll try to replicate.
@davidhq
Just a quick question, have you installed Chromium in dietpi-software? Although you can select the autostart option, it will not install the software, that needs to be done in dietpi-software.
Hi! You are right, sorry, didn't realize this... maybe you could add a small comment that this has to be done? I mean, it is obvious but maybe someone (like me) would assume this is already in base image and you just set it to autostart...
So from this perspective the issue is solved but if you don't mind I'd like to add a small question: everything works except I cannot make use of full horizontal resolution from self-standing Chromium on DietPi... I tried everything... I'm using Waveshare 10.1" 1280×800 HDMI touchscreen... works fine on Raspbian with GUI... here on DietPi when it boots I can also see some text extended accoss the full width... so at least in "text mode" on basic hardware level, software is able to use the full width.
Here is the issue on Chromium:
I tried everything I could by editing /DietPi/config.txt and /DietPi/dietpi.txt
in latter there is no much to do:
SOFTWARE_CHROMIUM_RES_X=1280
SOFTWARE_CHROMIUM_RES_Y=800
in the former I tried every possible combination of these settings:
disable_overscan=1
framebuffer_width=1280
framebuffer_height=800
and settings from waveshare support document, namely:
max_usb_current=1
hdmi_group=2
hdmi_mode=87
hdmi_cvt 1280 800 60 6 0 0 0
hdmi_drive=1
max_usb_current=1
hdmi_group=2
hdmi_mode=27
hdmi_drive=1
I'm starting Chromium with:
CHROMIUM_OPTS='--kiosk --test-type --incognito --start-maximized --disable-pinch --overscroll-history-navigation=0 --window-size=$RES_X,$RES_Y --app-window-size=$RES_X,$RES_Y'
Thank you for any tips...
Something else that is interesting and suggests that the missing setting could be somewhere in where you manage the starting of Chromium?
When I tap outside of "acknowledged" area, I get an "X" instead of a normal (/text entry) pointer cursor..
Seems that in general the whole area is enabled, just Chromium cannot really expand into it... Another issue as you can see is the general border all around which also is not being able to be used... I confirm that all of this is not present when trying on Raspbian (Chromium under normal GUI environment)
Good point about autostart vs installed software.
Where a certain software install is required, we should check for install status and in case inform user, offering to run the install directly via whiptail menu.
@davidhq
Please try editing:
/var/lib/dietpi/dietpi-software/installed/chromium-autostart.sh
Change the following line to below:
CHROMIUM_OPTS='--kiosk --test-type --incognito --disable-pinch --overscroll-history-navigation=0 --window-size=$RES_X,$RES_Y --start-fullscreen'
Save changes and reboot, see if that resolves the issue.
--window-size=$RES_X,$RES_Y --start-fullscreen@davidhq
~If you could confirm the follow change works on your system, i'd be grateful:~
@davidhq
Found the issue, was able to replicate with ASUS TB, solution is to copy and paste all the below code into terminal:
cat << _EOF_ > /var/lib/dietpi/dietpi-software/installed/chromium-autostart.sh
#!/bin/bash
#Autostart run script for Kiosk mode, based on @AYapejian https://github.com/Fourdee/DietPi/issues/1737#issue-318697621
# - Please see $HOME/.chromium-browser.init (and /etc/chromium.d/custom_flags) for additional egl/gl init options
# Command line switches https://peter.sh/experiments/chromium-command-line-switches/
# --test-type gets rid of some of the chromium warnings that you may or may not care about in kiosk on a LAN
# --pull-to-refresh=1
# --ash-host-window-bounds="400,300"
# - Resolution to use for kiosk mode, should ideally match current system resolution
RES_X=\$(grep -m1 '^[[:blank:]]*SOFTWARE_CHROMIUM_RES_X=' /DietPi/dietpi.txt | sed 's/^[^=]*=//')
RES_Y=\$(grep -m1 '^[[:blank:]]*SOFTWARE_CHROMIUM_RES_Y=' /DietPi/dietpi.txt | sed 's/^[^=]*=//')
CHROMIUM_OPTS="--kiosk --test-type --window-size=\$RES_X,\$RES_Y --start-fullscreen --start-maximized --window-position=0,0"
# - If you want tablet mode, uncomment the next line.
#CHROMIUM_OPTS+=' --force-tablet-mode --tablet-ui'
# - Add URL for first run:
URL=\$(grep -m1 '^[[:blank:]]*SOFTWARE_CHROMIUM_AUTOSTART_URL=' /DietPi/dietpi.txt | sed 's/^[^=]*=//')
CHROMIUM_OPTS+=" --homepage \$URL"
#Find absolute filepath location of Chromium binary.
FP_CHROMIUM=\$(which chromium)
if [[ ! \$FP_CHROMIUM ]]; then
# - Assume RPi
FP_CHROMIUM="\$(which chromium-browser)"
fi
xinit \$FP_CHROMIUM \$CHROMIUM_OPTS
_EOF_
testing right now, first run wasn't successful, when I replaced the new autostart file, chromium didn't start, device stayed in terminal... I'll try to find the reason and let you know
it actually did work, I made a mistake... so, for now it looks much better... will test some more if there is any other problems, otherwise I think this resolves the issue....
My report: works great but I still need to hide the mouse cursor, is there a good way to put:
xserver-command = X -nocursor
somewhere? I used to put this in /etc/lightdm/lightdm.conf before...
And doing this:
xinit -nocursor $FP_CHROMIUM $CHROMIUM_OPTS
causes Chromium to not boot :(
Fatal IO error 11 (Resource temporarily unavailable) on X server ":0" ...
@davidhq
Try:
apt-get install unclutter -y
Then add the following line before xinit $FP_CHROMIUM $CHROMIUM_OPTS
sleep 5 && unclutter -idle 0.1 &
Cursor should disappear after 5.1 seconds.
As the original issue is now resolved. I'll mark this as closed. However, please reopen if required.
@davidhq
Please let us know if unclutter works for you, if so, we can add it into the code:
https://github.com/Fourdee/DietPi/issues/2298#issuecomment-443406683
OK, thank you.
Regarding unclutter: I didn't want to use that since I have experience with this better solution as mentioned:
Can you please see where and how this can be achieved here, then you could add option for that...
@Fourdee are there maybe any new hints on how to hide the cursor without "polling"?
thank you
I resolved the issue by going back to official Raspbian Desktop release...
I was very surprised when I started booting two equivalent tablets side by side and official release was quite a few seconds faster to display my site contents. Also the black screen with nothing happening (which could confuse users) was shown for much less time.
So I guess this is not a project I'm very interested in anymore but thank you for teaching me a few things. Good luck!
Could also be true that when you try to make things easier for a lot of people, you fall on your face and nothing really works in the project anymore... don't know, just guessing... anyway good luck again.
@davidhq
~Might I ask how you installed Chromium kiosk mode on Raspbian? By comparing the start scripts we might be able to identify conflicts with the -nocursor option.~
Ah lol simple solution: Use xinit $FP_CHROMIUM -nocursor $CHROMIUM_OPTS, since this is no native xinit option, but a specific chromium option 😉!
The boot time btw might be a current issue due to some boot script reorder: https://github.com/Fourdee/DietPi/issues/2476
@Fourdee
The hidden cursor is kinda reasonable with a touch screen (or even without?). With keyboard + mouse the kiosk mode does not make any sense? Sorry never worked with this and not much idea how/when you use it to have only a single website opened without address bar, besides if you only want to see some status information 🤔.
So we could either add this option by default, or check for attached touch screen to auto-enable, or leave this to user choice via dietpi.txt?
Also I noticed something quite strange on my last tests before I purge DietPi from all raspberries... background image (jpg) on my sites were pixelated (= of a bit lower quality than usual)... I was worried that one of the tablet screens is worse quality - bad grid - but thankfully it was only something screwed up in dietpi (again)... also text size was different, I was wondering why different font size on official raspbian and dietpi... again dietpi thing was "out of the ordinary"... I wish you all the best with project and "I'm outta here" ;) did learn a few interesting things though - thank you
Most helpful comment
it actually did work, I made a mistake... so, for now it looks much better... will test some more if there is any other problems, otherwise I think this resolves the issue....