The cmdline_args input to eel.start appear to be ignored. Specifically I have tried the following: --kiosk, --start-fullscreen, and --disable-pinch, none of these appear to be acknowledged when chromium is launched.
My exact lines of code are:
eel.init('web')
eel.start('attendanceKiosk.html', mode='chromium', cmdline_args=['--start-fullscreen' '--disable-pinch'], block=False)
Note I have tried 'chrome' and 'chromium-browser' as the mode, as well as trying the command without a specified mode. When chrome is used the application opens maximized, whereas when chromium is used the application opens in a minimized configuration. I achieve the desired behavior when launching chromium-browser with the flags from the command line.
Try closing all chrome's windows and testing your program again
Note: _Chrome will not start on fullscreen mode if another chrome windows is active for security reasons._
That is very clearly not the problem as the python script runs right after startup before Chrome is launched.
I see this issue, in my case that was caused because i have chromium installed so even i put "chrome" as the mode it opens a chromium instance.
Chromium do not work arguments like --kiosk
Solution for me was to uninstall chromium and only have chrome, now --kiosk parameter works as it now opens an instance of google chrome
This is not a bug of this library.
You need to and --no-sandbox flag to cmdline_args if you run your script in root.
When you start chromium-browser in terminal by
sudo chromium-browser,
you will get this error:
Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
When run chromium-browser with --no-sandbox flag, I got warning:
Stability and security will suffer
I don't know what will happen later.
It sounds like you've got to the bottom of this so I'll close it off for now. Thanks :)
I got the same pb..
Eel version: last
OS: raspbian 10 (buster) running on RPi 3
Browser chromium
=> as a workaroud I decided to change the .xinitrc with the following config (I have a small 483x320 TFT and use 5555 port)
chromium-browser http://localhost:5555 \
--window-size=480,320 \
--window-position=0,0 \
--start-fullscreen \
--kiosk \
--incognito \
--noerrdialogs \
--disable-translate \
--no-first-run \
--fast \
--fast-start \
--disable-infobars \
--disable-features=TranslateUI \
--disk-cache-dir=/dev/null \
--overscroll-history-navigation=0 \
--disable-pinch \
--disable-quic \
--enable-tcp-fast-open \
--disable-gpu-compositing
I got the same pb..
Eel version: last
OS: raspbian 10 (buster) running on RPi 3
Browser chromium=> as a workaroud I decided to change the .xinitrc with the following config (I have a small 483x320 TFT and use 5555 port)
chromium-browser http://localhost:5555
--window-size=480,320
--window-position=0,0
--start-fullscreen
--kiosk
--incognito
--noerrdialogs
--disable-translate
--no-first-run
--fast
--fast-start
--disable-infobars
--disable-features=TranslateUI
--disk-cache-dir=/dev/null
--overscroll-history-navigation=0
--disable-pinch
--disable-quic
--enable-tcp-fast-open
--disable-gpu-compositing
Maybe you can try to add one more flag: --no-sandbox
I got the same pb..
Eel version: last
OS: raspbian 10 (buster) running on RPi 3
Browser chromium
=> as a workaroud I decided to change the .xinitrc with the following config (I have a small 483x320 TFT and use 5555 port)
chromium-browser http://localhost:5555
--window-size=480,320
--window-position=0,0
--start-fullscreen
--kiosk
--incognito
--noerrdialogs
--disable-translate
--no-first-run
--fast
--fast-start
--disable-infobars
--disable-features=TranslateUI
--disk-cache-dir=/dev/null
--overscroll-history-navigation=0
--disable-pinch
--disable-quic
--enable-tcp-fast-open
--disable-gpu-compositingMaybe you can try to add one more flag: --no-sandbox
Hi, yes but it did not work using directly the cmd line args using the run command from the source code in the chrome.py file
https://github.com/samuelhwilliams/Eel/blob/master/eel/chrome.py
def run(path, options, start_urls):
if options['app_mode']:
for url in start_urls:
sps.Popen([path, '--app=%s' % url] +
options['cmdline_args'],
stdout=sps.PIPE, stderr=sps.PIPE, stdin=sps.PIPE)
else:
args = options['cmdline_args'] + start_urls
sps.Popen([path, '--new-window'] + args,
stdout=sps.PIPE, stderr=sys.stderr, stdin=sps.PIPE)
So I decided to remove this code and to configure directly the .xinitrc inside the rpi.
And then the kiosk mode worked.
@antonymarion
eel.start('mypage.html', mode='chromium', cmdline_args=['--start-fullscreen', '--no-sandbox', '--kiosk', '--disable-pinch'], block=False)
work for me, I use raspbian buster in RPI4.
OK I will try.
It did not work, maybe the reason is I am using console autologin mode, to save ressources on a rpi3.
Did you use console autologin?