Reputation: 1763
I am trying to run chromium browser in kiosk mode in raspberry pi 3(Official Jessie ).
Here is i've added in my autostart file
@point-rpi
@xset s noblank
@xset s off
@xset -dpms
@chromium-browser --kisok www.fb.com
This works fine but some problem occured.
Browser is not opened in full window also the address bar is still present in chromium
So how can i remove above two items
Upvotes: 10
Views: 45945
Reputation: 726
For full kiosk mode, you might want to hide the Chromium scrollbars, always, for a webpage. This does not disable scrolling on a touchscreen. It just disables the scrollbars.
Using the --enable-features flag with chromium-browser did the trick for me.
--enable-features=OverlayScrollbar,OverlayScrollbarFlashAfterAnyScrollUpdate,OverlayScrollbarFlashWhenMouseEnter
And this is my full command:
/usr/bin/chromium-browser --kiosk --noerrdialogs --enable-features=OverlayScrollbar --disable-restore-session-state http://10.10.0.16:8123
Also, to hide the mouse cursor entirely, I have changed the X command on my raspbian in /etc/lightdm/lightdm.conf from xserver-command=X
to xserver-command=X -nocursor
Upvotes: 14
Reputation: 31
Create a user, op in this example, for autologin at boot
adduser op
usermod –a –G op op
usermod –a –G users op
usermod –a –G audio op
usermod –a –G video op
Configure the autologin by creating the file /etc/systemd/system/[email protected]/autologin.conf with the following content
[Service]
ExecStart=
ExecStart=-/sbin/agetty --autologin op --noclear %I 38400 linux
Enable autologin with the following command
systemctl enable [email protected]
Impersonate the op user with the following command
sudo su - op
Insert at the end of the /home/op/.bashrc the following lines
if [ $(tty) == "/dev/tty1" ]; then
while true; do startx -- -nocursor; echo "Again [$?]..."; done
fi
Create the file /home/op/.xinitrc with the following content
chromium-browser --window-size=7000,7000 --start-fullscreen --kiosk -app=http://www.fb.com/
Reboot
Upvotes: 2
Reputation: 21
For those arriving here from Google:
The answer to this question will vary, depending on how you have setup Chromium to automatically run (using OpenBox, Xsession, etc). The answer will also vary depending on what version of Raspbian you are running (Full, Lite, or Super Lite).
I would recommend using the following article to correctly set up your Raspberry Pi to perform this action: https://blockdev.io/raspberry-pi-2-and-3-chromium-in-kiosk-mode/ .
NOTE: While this article is great at walking you through how to correctly setup your pi to run in a proper kiosk mode, you will need to change the "sed"/"@sed" command(s) if you don't wish to be prompted about Chromium not exiting correctly. To fix this, please change your "sed" (or "@sed") command(s) to the following:
If you are supposed to use "@sed", then please provide a "@" before each of the commands above.
Upvotes: 2
Reputation: 162
Other way to hide cursor in Raspbian is by using unclutter
sudo apt-get update
sudo apt-get install unclutter
then in the script, insert this line:
unclutter &
Upvotes: 1
Reputation: 236
I had a similar issue ... I eventually used this in a .xinitrc file in the home directory.
#Disable DPMS.
xset -dpms
xset s off
xset s noblank
#Lets remove a lock file that could be caused due to a crash.
rm /home/pi/.config/chromium/SingletonLock
while true; do
# Clean up previously running apps, gracefully at first then harshly
killall -TERM chromium-browser 2>/dev/null;
killall -TERM matchbox-window-manager 2>/dev/null;
sleep 2;
killall -9 chromium-browser 2>/dev/null;
killall -9 matchbox-window-manager 2>/dev/null;
# Launch window manager without title bar.
exec matchbox-window-manager -use_titlebar no -use_cursor no -theme bluebox &
# Run unclutter
unclutter &
# Launch browser.
chromium-browser --incognito --kiosk --noerrdialogs --disable-translate --disable-cache --disk-cache-dir=/dev/null --disk-cache-size=1 --app=http://URL_TO_GO_TO
done;
I use the matchbox windows manager and had to make some other tweaks, but this is what I am using.
Upvotes: 5
Reputation: 589
Try changing to this
#@xscreensaver -no-splash # comment this line out to disable screensaver
@xset s off
@xset -dpms
@xset s noblank
@chromium-browser --incognito --kiosk http://www.fb.com/
Upvotes: 3