Git Product home page Git Product logo

fullpageos's Introduction

FullPageOS

image

A Raspberry Pi distribution to display one webpage in full screen. It includes Chromium out of the box and the scripts necessary to load it at boot. This repository contains the source script to generate the distribution out of an existing Raspbian distro image.

FullPageOS started as a fork from OctoPi, but then joined the distros that use CustomPiOS.

Donate

FullPageOS is 100% free and open source and maintained by Guy Sheffer. If it's helping your life, your organisation or makes you happy, please consider making a donation. It means I can code more and worry less about my balance. Any amount counts.

paypal

Where to get it?

The official mirror is here

Nightly builds are available here (currently built on demand)

How to use it?

  1. Unzip the image and install it to an SD card like any other Raspberry Pi image
  2. Configure your WiFi by editing fullpageos-wpa-supplicant.txt on the first partition of the flashed card when using it like a flash drive
  3. Boot the Pi from the SD card
  4. Log into your Pi via SSH (it is located at fullpageos.local if your computer supports bonjour or the IP address assigned by your router), default username is "pi", default password is "raspberry" and change the password using the passwd command. Consider also changing the vnc password as well by x11vnc -storepasswd.

Requirements

  • Raspberry Pi 2 and newer or device running Armbian. Older Raspberry Pis are not currently supported. See Raspberry Pi and Raspberry Pi.
  • SD card, 4GB or larger, Class 10. (Early June 2020 was the image size 3GB.)
  • 2A power supply

Features

  • Loads Chromium at boot in full screen
  • Webpage can be changed from /boot/fullpageos.txt
    • You can use variable {serial} in the url to get device's serialnumber in the URL
  • Default app is FullPageDashboard, which lets you add multiple tabs changes that switch automatically.
  • Ships with preconfigured X11VNC, for remote connection (password 'raspberry')
  • Specify a custom Splashscreen that gets displayed in the booting process instead of Kernel messages/text

Developing

Requirements

  1. qemu-arm-static
  2. CustomPiOS
  3. Downloaded Raspbian image.
  4. root privileges for chroot
  5. Bash
  6. realpath
  7. sudo (the script itself calls it, running as root without sudo won't work)
  8. jq (part of CustomPiOS dependencies)

Build FullPageOS From within FullPageOS / Raspbian / Debian / Ubuntu ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

FullPageOS can be built from Debian, Ubuntu, Raspbian, or even FullPageOS. Build requires about 2.5 GB of free space available. You can build it by issuing the following commands:

sudo apt install coreutils p7zip-full qemu-user-static

git clone https://github.com/guysoft/CustomPiOS.git
git clone https://github.com/guysoft/FullPageOS.git
cd FullPageOS/src/image
wget -c --trust-server-names 'https://downloads.raspberrypi.org/raspios_lite_armhf_latest'
cd ..
../../CustomPiOS/src/update-custompios-paths
sudo modprobe loop
sudo bash -x ./build_dist

Building FullPageOS Variants ~~~~~~~~~~~~~~~~~~~~~~~~

FullPageOS supports building variants, which are builds with changes from the main release build. An example and other variants are available in the folder src/variants/example.

To build a variant use:

sudo bash -x ./build_dist [Variant]

Building Using Docker

See Building with docker entry in wiki

Building Using Vagrant

There is a vagrant machine configuration to let build FullPageOS in case your build environment behaves differently. Unless you do extra configuration, vagrant must run as root to have nfs folder sync working.

Make sure you have a version of vagrant later than 1.9!

If you are using older versions of Ubuntu/Debian and not using apt-get from the download page.

To use it:

sudo apt-get install vagrant nfs-kernel-server virtualbox
sudo vagrant plugin install vagrant-nfs_guest
sudo modprobe nfs
cd FullPageOS/src/vagrant
sudo vagrant up

After provisioning the machine, it's also possible to run a nightly build which updates from devel using:

cd FullPageOS/src/vagrant
run_vagrant_build.sh

To build a variant on the machine simply run:

cd FullPageOS/src/vagrant
run_vagrant_build.sh [Variant]

Usage

  1. If needed, override existing config settings by creating a new file src/config.local. You can override all settings found in src/config. If you need to override the path to the Raspbian image to use for building OctoPi, override the path to be used in ZIP_IMG. By default, the most recent file matching *-raspbian.zip found in src/image will be used.
  2. Run src/build_dist as root.
  3. The final image will be created in src/workspace

Remote access

Remote GUI access can be achieved through VNC Viewer. Get the IP of your raspberry hostname -I via SSH.

The password is raspberry and is independent of password you have set for your user(s). Change the password by x11vnc -storepasswd via SSH.

Install Chrome Extensions

Press ctrl + t, it will open a new tab.

You can either install extensions from Chrome Web Store or install your own extension.

If you wish to install your own extension then you can transfer the build files via tools like rcp, rsync etc.

Example:

rsync -av <extension-build-folder>/ [email protected]:extensions/<extension-name>/

Code contribution would be appreciated!

fullpageos's People

Contributors

adamjgreen avatar arrow768 avatar asdf1nit avatar bitbyt3r avatar foosel avatar guysoft avatar hroncok avatar jadyndev avatar janzert avatar jonaslorander avatar lewisgoddard avatar mariogrip avatar mschmidt291 avatar mweimerskirch avatar nikolaev-rd avatar norfeldt avatar nosyjoe avatar novicms avatar pedrosimeao-7egend avatar rademacs avatar scelfo avatar semanticfire avatar t-knapp avatar tailorvj avatar tanarosch avatar tcaddy avatar vivekanand1101 avatar xvilo avatar yamlcase avatar zarya avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fullpageos's Issues

Use Synergy with FullPageOS

I have been following the guide at http://www.etcwiki.org/wiki/Install_Synergy_Raspberry_Pi_3_-_June_2016 to install Synergy on my pi with FullPageOS.
But i seem to get stuck on how to get the "autostart file" ~/.config/autostart/synergy.desktop
to autostart?

If i type cynergyc 192.198.1.22 manually in putty the Pi connects to my synergy server, but how do i get it to autostart. I guess FullPageOS bypasses the ability to have that kind of autostart file, but i guess there is another way to autostart the line /usr/local/bin/synergyc 192.168.1.22

Exit Chromium

Is there a way to exit chromium once booting has completed? I need to troubleshoot some networking issues and can't get back to the command line locally.

corrupt cmdline.txt after unplug/plug power cable

Hi,

When testing power loss (unplug/plug power cable), the cmdline.txt get corrupted and the Pi cannot boot. see attached png.

corrupt

And we need to install the img via Win32DiskImager

Regards from french Alps
Emmanuel

Cursor not hiding

I've noticed that the Cursor doesn't seem to be hiding itself after loading web page.

Wifi not working from fullpageos-network file

Tried to configure WIFI from the fullpageos-network file but does not work.

If i go to X server and configure from graphical screen it works and remains configurated for next reboots.

If i go to /etc/network/interfaces and edit there the same lines i have in fullpageos-network it works.

uncommented the lines IFACE - SSID - PASSWORD

Black screen with only cursor

Great project.

I just can't make it start - using wired ethernet Pi, using everything as supplied (latest build) just get black screen with cursor on it. Can SSH in so network working.

Not sure what else to try - any help welcome.
Cheers David

is it "Raspbian Compatible" ?

I mean, does this distro only run SSH & Chrome at startup, or is this still possible to install scripts, and why not quit chrome or run other applications in other sessions ?

For example, this could allow to run a local web server, and display its main view via Chrome at startup. But the HTML could still be editable directly from the Pi, or via a WebIDE, etc.

thanks !

Chromium refresh after disconnecting

I have couple of Raspberries loading a specific webpage containing an image slider with never ending loop.

This is working like a charm, UNLESS Raspberry gets disconnected for some reason.

Chromium just says "Error 105 (net;;ERR_NAME_NOT_RESOLVED): Unable to resolve the server's DNS address". And it stays that way until I manually refresh the page or reboot.

So, can I make Chromium refresh page automatically, let's say when Raspberry detects DHCP back online or just refresh every 10 minutes?

Chromium config

Where can I find the config for the autoloading chromium?

add fullpageos-webroot-redirect-url.txt settings file

Currently, when accessing http://fullpageos.local the default lighttpd page is displayed in the browser. For the sake of HTTP management of the device, or even a simple info page, I think it would be great if we add another settings file on the SD card that defines the URL to redirect from web root.
index.php should be updated to read the parameter from /boot/fullpageos-webroot-redirect-url.txt and redirect the browser.
Meanwhile, I'm directing my browser to http://fullpageos.local/FullPageDashboard/ for page rotation management (on Windows using FireFox since chrome can't see fullpageos.local)

FullPageOS 0.6.0 RC1

Hey,
The long delays FullPageOS 0.6 first release candidate.
The image should work on the new RaspberryPi 3, it takes up half of the size, and packs an up to date chromium browser with a new tool that lets you add multiple tabs.

Would be nice if people can confirm it works for them, or not:

Image:
http://docstech.net/FullPageOS/2016-05-27_2016-05-10-fullpageos-jessie-lite-0.6.0.zip
Md5:
http://docstech.net/FullPageOS/2016-05-27_2016-05-10-fullpageos-jessie-lite-0.6.0.zip.md5

No Refresh - Feature Request

Hi,
I am really enjoying the OS you have put together for raspberry pi! One feature I would like to see added is the automatic refresh. I have been playing with it for sometime and not been in getting this to work. I know someone else mentioned this in October, but I wanted to see where it currently stands.

Thank you for putting together a great program!

Not quite FullPage Dashboards

I loaded up the the most recent Jesse version onto my Rpi 2.

In order to get the HDMI to work I had to change the config to uncomment:
hdmi_force_hotplug=1

The result can be seen here:
Image can be viewed here

I have used different monitors with fresh install on a new SD card. Same results.

The mouse can move over the full range of the screen. It IS fullscreen. The dashboards appear to be smashed into 10% of the screen.

Any ideas?

Not going full screen - No refresh

The page shown is maximized with only title bar and and the browser border visible.

Checked all the script files in the home folder and seems ok , tried to change kiosk mode to fullscreen mode in chromium but nothing happened.

If i insert a keyboard and press F11 it goes correctly full screen. Looks like the refreshing and F5 keystroke script written in the scripts folder are not working.

After some changes i installed again the untouched image in the SD card to see if something i´ve changed was forcing this issue but the problem seems to appear from scratch. On first boot the page goes maximized but not fullscreen.

I couldnt check the refresh one after first boot because i have not internet connection.

How to serve a local file?

I'm using version 0.5.0 on a Pi model B and trying to serve a file on the SD card but Chromium keeps giving me an error 'FILE_NOT_FOUND'. I might just be getting the URL format wrong, I'm not sure. In fullpageos.txt I've set the following:
file:///~/test/index.html

Any clues? Many thanks.

ARM6-variant Discussion

So... after working for some time. Getting annoyed at my Raspian Lite still having a Display Manager. I took the challenge, and made something only using matchbox-window-manager, unclutter, midori and xorg/xinit/xtools.

And - I'm controlling it all with Init.d:

#! /bin/sh
# Author: Daniel H. Hemmingsen <[email protected]>

### BEGIN INIT INFO
# Provides:          fullpageos
# Required-Start:    $remote_fs $syslog
# Required-Stop:     $remote_fs $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: FullPageOS start/stop init.d script.
# Description:       FullPageOS start/stop init.d script. Handles all the stuff needed to boot up FullPageOS. Midori is the browser, unclutter hides the mouse and matchbox-window-manager is the Window Manager.
### END INIT INFO

case "$1" in
  start)
    echo "Starting X Display in the background..."
    X :0 &
    sleep 2
    export DISPLAY=:0

    echo "Disabling annoying default X behaviour..."
    xset s off
    xset -dpms
    xset s noblank

    echo "Starting Unclutter in the background..."
    /usr/bin/unclutter &

    echo "Starting Matchbox Window Manager in the background..."
    /usr/bin/matchbox-window-manager &

    echo "Starting Midori..."
    /usr/bin/midori -e Fullscreen -a https://google.com
    ;;
  stop)
    echo "Stopping Unclutter"
    killall unclutter

    echo "Stopping Matchbox Window Manager"
    killall matchbox-window-manager

    echo "Stopping Midori"
    killall midori

    echo "Stopping Xorg"
    killall Xorg
    ;;
  *)
    echo "Usage: /etc/init.d/fullpageos {start|stop}"
    exit 1
    ;;
esac

exit 0

So now, I can simply do service fullpageos start/stop. I haven't installed the webserver yet, since this was just testing the actual FullPageOS. (Where we get content from in the browser, is something different. But simply installing this like we already do; would be a-ok.)

On my old Raspberry Pi. I could get some pretty low RAM usage. (Remember, no webserver yet. But should be fine.)

pi@raspberrypi:~ $ free -h
             total       used       free     shared    buffers     cached
Mem:          434M       192M       242M       4.9M        10M       108M
-/+ buffers/cache:        73M       361M
Swap:          99M         0B        99M

Of course, this is not done yet. I would check for $network in the script and check for if the lighttpd server is up, etc.

But what do you guys think, at least for older devices only running on ARM6? I would be happy to hear your thoughts.

Full page Electron?

Hey! I think it would be cool if it could boot up an electron app.

Would it be easy to do that?

Edit

Source code is much smaller than I though it would be, looks like a fork would be appropriate for electron.

/home/pi/.vnc/passwd is not created on 0.6.0 RC1

As mentioned in #24 , the file seems to be missing. Even though the build logs syays:

18:07:34 + sed -i 's/#autologin-user=.*/autologin-user=pi/g' /etc/lightdm/lightdm.conf
18:07:34 + sudo -u pi /home/pi/scripts/setX11vncPass raspberry
18:07:35 sudo: unable to resolve host vagrant-ubuntu-trusty
18:07:35 spawn x11vnc -storepasswd
18:07:35 Enter VNC password: raspberry
18:07:35 
18:07:35 Verify password:    
18:07:35 Write password to /home/pi/.vnc/passwd?  [y]/n y
18:07:35 
18:07:35 + echo 'exit 0'

Current workaround is running again:

sudo -u pi /home/pi/scripts/setX11vncPass raspberry

Hide Cursor

If this is to be used for digital signage, is there a way to hide the cursor? Right now the page loads but there is a cursor right in the middle of the screen.

Build error during image resize

While using the build script I run into this error ( end of log )

Initial idea, language issue ??

Unmounting /opt/FullPageOS/FullPageOS/src/workspace/mount...
Resizing partition 2 on 2016-05-27-raspbian-jessie.img to minimal size + 200 MB
e2fsck 1.42.9 (4-Feb-2014)
Stap 1: Controle van inodes, blokken, en groottes
Stap 2: Controle van mappenstructuur
Stap 3: Controle van verbindingen tussen mappen
Stap 4: Controle van verwijzingsaantallen
Stap 5: Controle van groepssamenvattingen
/dev/loop0: 92508/305824 bestanden (0.1% niet-aaneengesloten), 523896/1220096 blokken
/opt/FullPageOS/FullPageOS/src/common.sh: regel 309: * 4096: syntaxfout: operator verwacht (het onjuiste symbool is "* 4096")

Please share your public dashboards

Dear FullPageOS users, we'd like to showcase (and use for tests) your public dashboards. If you are running any public IoT, monitoring or whatever monitor on FullPageOS, please share it with us in the comments below and we'll use it for our tests.

Kind regards,
Tailor

20160609-freeboard

Why Octoprint

Good work indeed!

What is the reasoning behind using Octoprint as base?

Thanks,

Rainbow Square

I have a brand new Raspberry Pi 3. I images my SD card using v.5 and modified the wifi config and start URL but when I boot it up, all I get is a rainbow square. This was a CanaKit which is using a 2.5A power supply so I know it has access to enough power. Any other ideas what might be going on here?

Cannot access raspberrypi.local on 0.6 RC1

When trying to access raspberrypi.local via vnc I didn't get an answer from the raspberry pi, so I looked up the DHCP host list on my router and it seems to recognize the FullPageOS raspberry pi as host name fullpageos.
20160602-fullpageos-dhcp-hostname
I actually tried to access it as well without success, so I tried the IP address given by DHCP and it worked.
Another problem I found is the VNC password isn't set to raspberry. I had to SSH into the pi and run
/home/pi/scripts/setX11vncPass raspberry
20160602-fullpageos-vnc-password

When accessing the pi via HTTP I got the default Apache landing page instead of the dashboard
20160602-fullpageos-apache-default

Addendum: I found out I could connect to fullpageos.local via some clients on Win 8.1, such as FireFox and MinGW bash shell

New Tab Stuck Full Screen

When I open a new tab in FullPageOS and make it full screen by pressing F11 pressing F11 again to exit fullscreen does nothing.

Nightly Build Gets black screen on RaspberryPi 1/Zero/B+

I get a back screen with a cursor after the boot messages. I first tried changing the webpage in fullpageos.txt to no avail.

I can ssh to the Pi and can ping google from it so I know that I have internet connection to the pi.

If I kill Xorg and then try to restart the service from ./run_onepageos I get a list of several error messages that it cannot open the display.

xset: unable to open display ""
xset: unable to open display ""
xset: unable to open display ""
matchbox: can't open display! check your DISPLAY variable.
14/01/2016 04:40:36 passing arg to libvncserver: -rfbauth
14/01/2016 04:40:36 passing arg to libvncserver: /home/pi/.vnc/passwd
14/01/2016 04:40:36 x11vnc version: 0.9.13 lastmod: 2011-08-10 pid: 953
14/01/2016 04:40:36 XOpenDisplay("") failed.
14/01/2016 04:40:36 Trying again with XAUTHLOCALHOSTNAME=localhost ...
14/01/2016 04:40:36
14/01/2016 04:40:36 *** XOpenDisplay failed. No -display or DISPLAY.
14/01/2016 04:40:36 *** Trying ":0" in 4 seconds. Press Ctrl-C to abort.
14/01/2016 04:40:36 *** 1 2 3 4
14/01/2016 04:40:40 XOpenDisplay(":0") failed.
14/01/2016 04:40:40 Trying again with XAUTHLOCALHOSTNAME=localhost ...
14/01/2016 04:40:40 XOpenDisplay(":0") failed.
14/01/2016 04:40:40 Trying again with unset XAUTHLOCALHOSTNAME ...
14/01/2016 04:40:40

14/01/2016 04:40:40 ***************************************
14/01/2016 04:40:40 *** XOpenDisplay failed (:0)

*** x11vnc was unable to open the X DISPLAY: ":0", it cannot continue.
*** There may be "Xlib:" error messages above with details about the failure.

This is with the latest nightly build, I'll try the october build to see if I can get that working.

I think it might be trivial to note that I am using a Pi Zero.

Cheers.

Locale and timezone not in parameters

Right now, there is only a standard locale and timezone available.

I'm working on a config extension to solve this:

$FULLPAGEOS_OVERRIDE_TIMEZONE
$FULLPAGEOS_OVERRIDE_LOCALE

pull request will follow

Choppy Video

We are looking to use this for digital signage and occasionally we will have a short promo video play. We are using this as a test video (https://graftechnology.com/video/) but the video is really choppy. I set the GPU_MEM to 448 since that's the max for a 1GB Raspberry Pi 3 but it's still choppy. Any ideas how to get things running smoother? Thanks!

Removing lighthttpd

I'm running a NodeJS app on my Pi and don't have a need for lighthttpd/PHP. Is there a way to remove lighthttpd without building a FullPageOS variant?

I can do this, but is there a cleaner or recommended approach?

$ sudo apt-get remove lighttpd

Graphics acceleration?

Hi, I'm curious if your OS supports any sort of graphics acceleration on the Pi? I recall trying to use Chromium on an older Pi and it was painfully slow to work with. I also seem to remember some developers were working on a more modern X server that supported some of the acceleration available in the Pi's GPU or something similar.

Thanks and I'm excited to try your OS on some projects!

Websites Not Loading

I am having a issue where when I try to add another tab it does not seem to load the page, it is just blank. I have tried it with multiple websites and for some reason only one website has been able to load. I can however connect through VNC with no problems and also hit F1 and log into a website that way. The site I am trying to get working is local on the network and I am adding the http:// in front of it so I know that is not the problem. Any idea on what would be causing this issue?

Thanks

Add remote VNC setup

I would like to bundle VNC remote connection.

I have scripts that would use x11vnc, however I am not sure how to store the password in a safe way.

unclutter instead of xdotools

Looking through the code, I noticed FullPageOS is using xdotools to move the mouse off the screen. I would just argue that unclutter would be a bit more clean - and probably more lightweight. Is xdotools used for anything else?

FullPageOS/src/filesystem/home/pi/scripts/run_onepageos

#!/bin/bash
xset s off         # don't activate screensaver
xset -dpms         # disable DPMS (Energy Star) features.
xset s noblank     # don't blank the video device

matchbox-window-manager &
unclutter &
x11vnc -many -rfbauth /home/pi/.vnc/passwd &
while true
do
    if [ $(curl -sL -w "%{http_code}\\n" "http://localhost/FullPageDashboard" -o /dev/null) == "200" ]; then
      (sleep 15 ; /home/pi/scripts/fullscreen) &
      chromium-browser --kiosk --app=$(head -n 1 /boot/fullpageos.txt)
    fi
    sleep 1
done

raspbian-jessie-lite: Missing lsof package

Just a little heads up, if you want to build FullPageOS yourself. You'll be missing lsof. At least if you run the latest version of the Jessie Lite version of Raspbian. (As of writing this.)

A simple sudo apt-get install lsof will fix this.

I would suggest adding this to the README.rst. At least the chroot_script will be happy then. 👍

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.