summarylogtreecommitdiffstats
path: root/chromium-fullscreen.xinitrc
blob: d9b6a2e14e4b1f339be998105f306f9d3816b3d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/bash

# Get the current resolution
RESOLUTION=`xrandr | grep \* | awk '{print $1}'`

# The URL variuabile where we will store the final address to open
URL=''

# This is usually the case of a Raspberry Pi-like installation ( arm platforms )
if [ -f "/boot/chromium-autostart-url.txt" ]; then
  URL=`cat /boot/chromium-autostart-url.txt`
# This is probably the case of generic setups on x86 platforms
elif [ -f "/home/chromium/chromium-autostart-url.txt" ]; then
  URL=`cat /home/chromium/chromium-autostart-url.txt`
fi

# Disable all energy save features, and leave the monitor always on
xset s off         # don't activate screensaver
xset -dpms         # disable DPMS (Energy Star) features.
xset s noblank     # don't blank the video device

# Hide mouse cursor
unclutter -display :0.0 -noevents -grab -root -reset &

# Clear cache and config before starting the process
rm -Rf .cache .config

# Autostart Chromium in Fullscreen mode
exec /usr/bin/chromium --disable \
    --no-first-run \
    --disable-translate \
    --disable-infobars \
    --disable-suggestions-service \
    --disable-save-password-bubble \
    --disable-session-crashed-bubble \
    --ignore-gpu-blacklist \
    --load-extension=.extensions/disable-x-frame-option,.extensions/aw-snap-reloader \
    --window-position="0,0" \
    --window-size="$RESOLUTION" \
    --kiosk "$URL"