Updating docs & scripts for rc5.
This commit is contained in:
parent
13ebba0a59
commit
eb666b3782
@ -10,18 +10,17 @@ Press `F11` to exit the full screen mode, and `Ctrl + L` to focus the location b
|
|||||||
|
|
||||||
Chromium is configured to remember the URL where you left off (and all logins, etc), so this might be all the configuration you need to do!
|
Chromium is configured to remember the URL where you left off (and all logins, etc), so this might be all the configuration you need to do!
|
||||||
|
|
||||||
## Getting to a terminal
|
|
||||||
|
|
||||||
You can get to a virtual terminal by pressing `Ctrl + Alt + F2`, and logging in with username `pi` and password `raspberry`. Use `Ctrl + Alt + F1` to switch back to Chromium.
|
|
||||||
|
|
||||||
## System configuration
|
## System configuration
|
||||||
|
|
||||||
Use `sudo raspi-config` in the terminal to do things like:
|
You can access the `raspi-config` utility by pressing `Ctrl + Alt + F2`. With it, you can do things like:
|
||||||
|
|
||||||
* Join a WiFi network
|
* Join a WiFi network
|
||||||
* Change the system timezone
|
|
||||||
* Change your keyboard layout
|
* Change your keyboard layout
|
||||||
|
* Change the system timezone
|
||||||
* Enable SSH access (it's disabled by default for security reasons)
|
* Enable SSH access (it's disabled by default for security reasons)
|
||||||
|
* Change the password (see above)
|
||||||
|
|
||||||
|
Pressing `Ctrl + Alt + F1` takes you back to Chromium.
|
||||||
|
|
||||||
## Automating things
|
## Automating things
|
||||||
|
|
||||||
@ -32,11 +31,28 @@ There's a few commonly useful snippets already on the crontab, such as:
|
|||||||
* **Automatically reloading the active page every hour**. If the page you're displaying doesn't automatically update itself, this is effectively the same as hitting `Ctrl + R` every hour. Very crude. Very effective.
|
* **Automatically reloading the active page every hour**. If the page you're displaying doesn't automatically update itself, this is effectively the same as hitting `Ctrl + R` every hour. Very crude. Very effective.
|
||||||
* **Cycling between open tabs every 5 minutes**. Same as above, but for `Ctrl + Tab`. Note that if you use both at the same time, you can combine them, to send the reload command *just before* sending the tab cycle command. This causes the pages to reload while they're in the background, so the user never sees it happening.
|
* **Cycling between open tabs every 5 minutes**. Same as above, but for `Ctrl + Tab`. Note that if you use both at the same time, you can combine them, to send the reload command *just before* sending the tab cycle command. This causes the pages to reload while they're in the background, so the user never sees it happening.
|
||||||
|
|
||||||
Use `crontab -e` to check these out, enable the ones you want, or customize them to your heart's content.
|
Press `Ctrl + Alt + F3` to get to a virtual terminal, use `crontab -e` to check these out, enable the ones you want, or customize them to your heart's content.
|
||||||
|
|
||||||
|
Again, pressing `Ctrl + Alt + F1` takes you back to Chromium.
|
||||||
|
|
||||||
## Customizing Chromium
|
## Customizing Chromium
|
||||||
|
|
||||||
Because you're running a fully-featured Chromium, you can customize it further by [installing browser extensions](https://chrome.google.com/webstore/category/extensions). For instance, [Tampermonkey](https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo) can be useful for injecting custom JS or CSS to a page you're displaying.
|
Because you're running a fully-featured Chromium, you can customize it further by [installing browser extensions](https://chrome.google.com/webstore/category/extensions). For example:
|
||||||
|
|
||||||
|
* **[Tampermonkey](https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo)** can be useful for injecting custom JS or CSS to a page you're displaying.
|
||||||
|
* **[Ignore X-Frame headers](https://chrome.google.com/webstore/detail/ignore-x-frame-headers/gleekbfjekiniecknbkamfmkohkpodhe)** can help you if you need to `<iframe>` a site that doesn't want to be framed.
|
||||||
|
|
||||||
|
Finally, further tweaks can be made by changing the [Chromium command line switches](https://peter.sh/experiments/chromium-command-line-switches/) in `~/.xsession`. For example:
|
||||||
|
|
||||||
|
```
|
||||||
|
--unsafely-treat-insecure-origin-as-secure=http://shady.example.com,http://another.example.com --user-data-dir=/home/pi/.config/chromium
|
||||||
|
```
|
||||||
|
|
||||||
|
Adding these options will allow you to mix secure (i.e. HTTPS) origins with insecure ones (you need to specifically white-list them). Sometimes you need stuff like this to pull together all the bits and pieces of your dashboard from different origins. We're not saying you should. But you can.
|
||||||
|
|
||||||
|
## Username and password
|
||||||
|
|
||||||
|
If you need to login to a shell, the default username and password are `pi` and `raspberry`, as is tradition for Raspberry Pi. The `pi` user also has `sudo` access.
|
||||||
|
|
||||||
## Adjusting your resolution
|
## Adjusting your resolution
|
||||||
|
|
||||||
|
|||||||
@ -5,3 +5,8 @@ if [ "$(tty)" == "/dev/tty1" ]; then
|
|||||||
# Redirect any output so it doesn't briefly appear when starting X
|
# Redirect any output so it doesn't briefly appear when starting X
|
||||||
exec startx >/dev/null 2>&1
|
exec startx >/dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# If this is a tty, and the one where we want to run raspi-config, do so
|
||||||
|
if [ "$(tty)" == "/dev/tty2" ]; then
|
||||||
|
sudo raspi-config
|
||||||
|
fi
|
||||||
|
|||||||
@ -30,12 +30,13 @@ find .config/chromium/ -name "Last *" | xargs rm
|
|||||||
|
|
||||||
# Start and detach Chromium
|
# Start and detach Chromium
|
||||||
# http://peter.sh/experiments/chromium-command-line-switches/
|
# http://peter.sh/experiments/chromium-command-line-switches/
|
||||||
chromium-browser --start-fullscreen --disable-infobars &
|
# Note that under matchbox, starting in full-screen without a window size doesn't behave well when you try to exit full screen (see https://unix.stackexchange.com/q/273989)
|
||||||
|
chromium-browser --start-fullscreen --window-size=1920,1080 --disable-infobars &
|
||||||
|
|
||||||
# Hide Chromium while it's starting/loading the page
|
# Hide Chromium while it's starting/loading the page
|
||||||
wid=`xdotool search --sync --onlyvisible --class chromium`
|
wid=`xdotool search --sync --onlyvisible --class chromium`
|
||||||
xdotool windowunmap $wid
|
xdotool windowunmap $wid
|
||||||
sleep 10 # give the web page time to load
|
sleep 15 # give the web page time to load
|
||||||
xdotool windowmap $wid
|
xdotool windowmap $wid
|
||||||
|
|
||||||
# Finally, switch process to our window manager
|
# Finally, switch process to our window manager
|
||||||
|
|||||||
@ -56,7 +56,11 @@ echo "This may take a long time"
|
|||||||
echo "You may be prompted for your password by sudo"
|
echo "You may be prompted for your password by sudo"
|
||||||
sudo dd bs=1m count="$SD_SIZE_ZERO" if=/dev/zero of="$DISK"
|
sudo dd bs=1m count="$SD_SIZE_ZERO" if=/dev/zero of="$DISK"
|
||||||
|
|
||||||
question "Flash Raspbian Lite (2018-06-27-raspbian-stretch-lite.zip) with Etcher, then re-mount the card (press enter when ready)"
|
question "Prepare baseline Raspbian:"
|
||||||
|
echo "* Flash Raspbian Lite with Etcher"
|
||||||
|
echo "* Eject the SD card"
|
||||||
|
echo "* Mount the card back"
|
||||||
|
echo "(press enter when ready)"
|
||||||
read
|
read
|
||||||
|
|
||||||
working "Updating /boot/cmdline.txt"
|
working "Updating /boot/cmdline.txt"
|
||||||
@ -117,7 +121,10 @@ working "Enabling auto-login to CLI"
|
|||||||
SUDO_USER=pi
|
SUDO_USER=pi
|
||||||
ssh "sudo systemctl set-default multi-user.target"
|
ssh "sudo systemctl set-default multi-user.target"
|
||||||
ssh "sudo sed /etc/systemd/system/autologin@.service -i -e \"s#^ExecStart=-/sbin/agetty --autologin [^[:space:]]*#ExecStart=-/sbin/agetty --autologin $SUDO_USER#\""
|
ssh "sudo sed /etc/systemd/system/autologin@.service -i -e \"s#^ExecStart=-/sbin/agetty --autologin [^[:space:]]*#ExecStart=-/sbin/agetty --autologin $SUDO_USER#\""
|
||||||
|
# Set auto-login for TTY's 1-3
|
||||||
ssh "sudo ln -fs /etc/systemd/system/autologin@.service /etc/systemd/system/getty.target.wants/getty@tty1.service"
|
ssh "sudo ln -fs /etc/systemd/system/autologin@.service /etc/systemd/system/getty.target.wants/getty@tty1.service"
|
||||||
|
ssh "sudo ln -fs /etc/systemd/system/autologin@.service /etc/systemd/system/getty.target.wants/getty@tty2.service"
|
||||||
|
ssh "sudo ln -fs /etc/systemd/system/autologin@.service /etc/systemd/system/getty.target.wants/getty@tty3.service"
|
||||||
|
|
||||||
working "Setting timezone"
|
working "Setting timezone"
|
||||||
ssh "(echo '$TIMEZONE' | sudo tee /etc/timezone) && sudo dpkg-reconfigure --frontend noninteractive tzdata"
|
ssh "(echo '$TIMEZONE' | sudo tee /etc/timezone) && sudo dpkg-reconfigure --frontend noninteractive tzdata"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user