Follow the instructions below to set up the first and any additional terminals. Just pay attention to minor differences in configuration for additional terminals which will be noted in the steps.
- Raspberry Pi 3 with built-in wi-fi
- Micro SD card (minimum 4 GB) and an adapter to insert the card into a computer
- A computer with SSH client (all Macs have the Terminal app, on Windows you can use PuTTY)
- A DHCP-enabled network (preferably with Bonjour as well)
Important! While most of this setup can be done offline, the Pi must be connected to a network with access to the internet for the installation of node.js and Node RED.
- Download FullPageOS (direct download link).
- Unzip the image and "burn" it to your Micro SD card like any other Raspberry Pi image.
- Before ejecting the Micro SD card from the computer, configure the wi-fi connection for FullPageOS by editing
fullpageos-network.txt
on the root of the flashed card. (This can of course be configured or updated later by plugging the micro SD card into any computer again.) - Insert the Micro SD card into a Raspberry Pi and connect the Pi to a power adapter (and network cable if you didn't configure wi-fi in step 3).
- Wait a moment for the Pi to boot and then log on to the Pi via SSH:
ssh [email protected]
(default password is "raspberry").
Please note: The address fullpageos.local
is only available if your router supports Bonjour. If you can't connect to the Pi using the command in step 5, log in to your router and determine the Pi's assigned IP address in the router's list of connected devices, then replace fullpageos.local
with the IP address.
- Run
sudo raspi-config
. - Select option 1 and change password to something other than "raspberry" (you need to relaunch raspi-config after this step)
- Select option 2 and set hostname of machine to
t1
. (For additional terminals set hostname tot2
,t3
, etc. Also be aware that this changes the.local
address you use to SSH into the Pi) - Select option 4, then on the next screen option 1 and then locate
sv_SE.UTF-8 UTF-8
in the list, press Space to select it and then Return to continue. When prompted on the next screen, chooseen_GB.UTF-8
as the system default.
- Copy and paste the following command into the SSH session with your Pi to automatically install both node.js and Node RED:
bash <(curl -sL https://raw.githubusercontent.com/node-red/raspbian-deb-package/master/resources/update-nodejs-and-nodered)
(Heads up! This process will probably take 10-20 minutes depending on the speed of your internet connection.) - When installation is completed, set Node RED to autostart:
sudo systemctl enable nodered.service
Open /boot/fullpageos.txt
with vi
, vim
or nano
(i.e. nano /boot/fullpageos.txt
) and replace the URL in this file with: http://t1.local:1880/chat?id=1
. (When setting up additional terminals, change ?id=1
to ?id=2
, ?id=3
, etc.)
Please note: If your router doesn't support Bonjour as mentioned above, you will need to replace t1.local
in the URL with the IP address that was assigned to the first terminal in your setup.
Run sudo nano /etc/default/keyboard
and set XKBLAYOUT="se"
(Ctrl+X and then Y and Return to save).
Then also run sudo nano ~/.profile
and add setxkbmap se
to the bottom of the file and save.
To disable modifier keys and prevent user from using keyboard shortcuts like Ctrl+W to close the tab, run sudo nano /usr/share/X11/xkb/symbols/pc
to open default keymap file. Then set the value inside brackets for the following lines to NoSymbol
:
key <LCTL> { [ Control_L ] };
key <LWIN> { [ Super_L ] };
key <RTSH> { [ Shift_R ] };
key <RCTL> { [ Control_R ] };
key <RWIN> { [ Super_R ] };
Like this:
key <LCTL> { [ NoSymbol ] };
key <LWIN> { [ NoSymbol ] };
key <RTSH> { [ NoSymbol ] };
key <RCTL> { [ NoSymbol ] };
key <RWIN> { [ NoSymbol ] };
- Open a browser on a computer connected to the same network as the Pi and go to http://t1.local:1880. (If you are setting up an additional terminal change
t1
in this address tot2
or whatever the hostname is for the terminal you are configuring.) - Click the "hamburger" menu in top right, point your cursor to Import and then click Clipboard.
- Copy the contents of t1.flow and paste it in the text area. Click Import and then click anywhere in the flow to drop all drop all the imported nodes into the flow. (For additional terminals after the first one, copy the contents of tx.flow instead.)
- Click Deploy to deploy the code. Done!
- SSH into the PI and run command
rm -rf ~/.config/chromium/Singleton*
to prevent "profile in use" message from Chromium. Then reboot the Pi withsudo reboot
and the Pi should restart into the chat page, ready to go. That's all!