-
-
Notifications
You must be signed in to change notification settings - Fork 504
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 start kiosk mode as non-root #4379
Comments
Hi, I guess you would need to select user |
Hi, Tried again, but this time with the auto start as the root user. That indeed does start the chromium browser. Still I think that is not correct behaviour. It should be possible to run as the dietpi user, or any other user with no other priviledges. |
As I said, this is a limitation at the moment. You can try adding user |
I also tried with |
probably other permissions are required as well. Usually Xorg.0.log will give a hint. |
Just to rule it out: No need to reboot for testing btw, just execute the launcher directly:
And yes, please check In VirtualBox one can btw change the emulated GPU, which could make a difference. E.g. try VMSVGA or VBoxSVGA. |
I have tried all three emulated GPU's in virtual box, including VMSVGA and VBoxSVGA. No improvement with these, I am now using VMSVGA. |
Directly after manually calling the script? 🤔 |
User |
Ah, how could I missed that, of course 😄:
|
I checked that |
That's the error message
Still permission issues |
I found a simple solution, that is to bind the Xorg server to vt1 instead of vt0. This seem to solve the issue. The Xorg server is now running with the user dietpi: |
Ah, yes when running the command/script from a different console/TTY as where the X server shall start on, the user needs to be in
|
I tried with the original |
What is the error message now? |
I get the following results with the original start command and the The log file: |
Strange, as the tty group should permit writes to that tty:
Probably read permissions are required. Could you try:
|
I tried with So: |
Jep that makes sense, those device files are freshly created on boot, so changing them is not permanent. Interesting the read permissions are required. The following will apply it automatically on boot:
|
would it not make more sense to run the kiosk as user |
Okay, so while autologin to desktops (default desktop sessions) works well with #4390, in case of Chromium we have a wrapper script that includes xinit itself. We'd need to extract the essential parts and make a
Actually I tested to skip all flags, aside of
But we might want to add other flags: #2938 #3389
|
I guess following was addressed to @fvbakel
|
Hi,
I am willing to test some of these settings on my virtual box. However, it
will somewhere later this week.
Kind regards,
Frank
Op do 20 mei 2021 00:09 schreef Joulinar ***@***.***>:
… I guess following was addressed to @fvbakel <https://github.com/fvbakel>
Probably you can help me to extract or simplify the script
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#4379 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEYYVDQRKGPK5D7VBCDHG43TOQZJZANCNFSM446X6YZA>
.
|
Thanks. It was not addressed to anyone specific, but just that we should generally review and test the flags and whether we finally need an extra script or whether we put everything into |
By chance I found that using Did a lot of cleanup and changed our autostart script accordingly: f5dedc3 This is how it can be tested: apt install libpam-systemd
systemctl unmask systemd-logind
systemctl start systemd-logind Then in a new session as non-root user: startx /usr/bin/chromium On RPi it needs to be: startx /usr/bin/chromium-browser |
Hi, I ve just tested it on a RPi and on the first try it did not work. In the logfile " /home//.local/share/xorg/Xorg.0.log" I saw errors similar to: I also copied the file ~/.chromium-browser.init from root to the non-root-user in order to adapt the flags of chromium. After doing that and a reboot, it works like a charm.... You probably should add this step to the dietpi-autostart tool (when configuring a non-root-user). |
Which RPi model and which Debian/Raspbian version was this? And in case Chromium was installed already, did you try to reinstall it (to have systemd-logind enabled, e.g.)? |
I just did an upgarde from v7.4.2 to v8.2.2 and from buster to bullseye yesterday according to this howto. And reinstalled chromium after that as well. Btw. on the upgrade to 8.2.2 I needed to do a little manual fix:
But after that I needed to copy the moved flags file back to its former location otherwise chromium was failing to start because of that file missing. But it's a different topic and I didn't look into that further yet (the manual copy was a quick workaround, which was fine for the moment). |
When doing the distro upgrade, did you follow our guide and either rebooted or ran |
As I wrote above, I followed the howto (it looks the same as your link is pointing to). But I did dietpi-update before the distro upgrade. So the issue mentioned above was on buster. Thanks for the hint! But as I said, it was just a side note (nothing to do with this thread actually). I think the user missed to be added to group 'video' is still a bug in dietpi-autostart (when configuring chromium to be started as non-root-user in kiosk mode). |
Please try to reinstall Chromium now after the update to Bullseye, and you can remove You did |
I did reinstall cromium already and thanks for the hint that it's safe tor remove the folder
Regarding the driver: To be hornest, I didn't spend time to look into that yet. I'm using this 52pi display and I didn't install / configure anything specific (except the configuration in |
You could try it with KMS. From what I see those configs do not prevent or force a specific display stack: G_CONFIG_INJECT 'dtoverlay=vc4-f?kms-v3d' 'dtoverlay=vc4-kms-v3d' /boot/config.txt
reboot With this, output to the display is not done via framebuffer device |
Thank you very much for the hint! I just removed the user from the video group and tested it. It works fine that way! However, there seems to be another issue in the autostart script. I don't know, if it was there earlier already (I didn't notice it before), but when doing the latest test I saw following on the boot screen (tried to find, whether it was logged in some file as well but without success):
A quick search on web pointed me to this article. So I tried a quick test by changing the first line of that script file from Any idea on that? Is there maybe someting else wrong with some config? |
Maybe one more thing worth mentioning it: in syslog I noticed this error: Or maybe not related to autologin... It's actually repeated for every user. Not sure, if it's the right way, but I resolved it by installing |
The question is whether is causes any issues. I guess it is as of I however never saw this error on any of my many systems and test systems, strange. Would be interesting to know whether you see it as well on SSH login, or autologin without Chromium startup, or indeed on Chromium start only. |
Creating a bug report/issue
Chromium browser does not autostart in kiosk mode on DietPi_VirtualBox-x86_64-Buster. Using the dietpi-software menu I installed option 113, the Cromium browser auto start option.
Other complete desktop environments are working fine on this same Virtualbox image.
Required Information
cat /boot/dietpi/.version
:dietpi@dietpi1:~$ cat /boot/dietpi/.version
G_DIETPI_VERSION_CORE=7
G_DIETPI_VERSION_SUB=1
G_DIETPI_VERSION_RC=2
G_GITBRANCH='master'
G_GITOWNER='MichaIng'
echo $G_DISTRO_NAME
orcat /etc/debian_version
10.9
uname -a
Linux dietpi1 4.19.0-16-amd64 #1 SMP Debian 4.19.181-1 (2021-03-19) x86_64 GNU/Linux
echo $G_HW_MODEL_NAME
or (EG: RPi3)Virtual Machine (x86_64)
Not applicable
Not applicable, using vmdk file as virtual disk
Additional Information (if applicable)
Chromium
Fresh install
Yes
echo $G_HW_UUID
98f1e04a-a5ff-4df7-81f7-5093138bfc1b
Steps to reproduce
Note that the host OS for virtiual box is a fresh install of Lununtu 21.04.
Expected behaviour
I expected Chromium to autostart after these steps
Actual behaviour
There is an error after the reboot:
Extra details
The text was updated successfully, but these errors were encountered: