Wednesday, January 15, 2014

Using the cubieboard (A10) to display class schedules and updates using chromium-browser in kiosk mode



First of all download an A10 image


The next step is to download and install LiveSuit (http://linux-sunxi.org/LiveSuit), which is an application to flash the NAND.


Start LiveSuite, select the downloaded image and press the FEL key when powering up (the FEL key is the one under the USB OTG port), The CPU automatically enters FEL mode. Livesuit will start to write the image to Nand on board.


After that, you will be able to log into your cubieboard, with the appropriate credentials. In my case linaro/linaro.
Depending on the image you used, you need to resize some partitions


sudo resize2fs /dev/nandc
sudo resize2fs /dev/nandd
sudo resize2fs /dev/nande
sudo resize2fs /dev/nandf


Now we are ready make changes and install software. These are the changes I made


1.) Change default password and root password using passwd
2.) Edit /etc/network/interfaces and set a fixed hardware address
           auto eth0
iface eth0 inet dhcp
   hwaddress ether xx:xx:xx:xx:xx:xx
You could use a generated mac address, which ifconfig will display.


3.) To enable autologin edit /etc/lightdm/lightdm.conf and add
autologin-user=<YOUR USER>
autologin-user-timeout=0


In a terminal run
sudo groupadd autologin
sudo gpasswd -a linaro autologin


4.) Install/uninstall software
sudo apt-get update
sudo apt-get install unclutter xvkbd -y icedtea-6-plugin vino x11-xserver-utils vino openssh-server
sudo apt-get remove xscreensaver


5.) To change the locale settings, run the following commands in a terminal
sudo locale-gen de_DE.UTF-8
export LANG=de_DE.UTF-8
export LC_ALL=de_DE.UTF-8
sudo update-locale
sudo dpkg-reconfigure locales


6.) reconfigure the time zone
sudo dpkg-reconfigure tzdata


7.) Modify your autostart. vi /etc/xdg/lxsession/Lubuntu/autostart


@lxpanel --profile Lubuntu
@pcmanfm --desktop --profile lubuntu
@/usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1
@xset s off
@xset s 0 0
@xset -dpms
@xset s noblank
@ntpdate 0.de.pool.ntp.org
@/usr/lib/vino/vino-server &
@chromium-browser --kiosk --incognito --disable-translate --allow-outadated-plugins --disk-cache-dir=/tmpfs --always-authorize-plugins http://yourwebsite


The xset stuff is there to disable any screen saving mode.
ntpdate updates your time. As an alternative you coud install ntp daemon (apt-get install ntp)
vino-server is a vnc-server, so i can have a remote look at the screen.
An alternative to vino is x11vnc (apt-get install x11vnc), which did not work due to a bug. (It crashed on connect).
The last line starts the browser in kiosk mode and opens a certain website.



8.) If you are using vino, make sure you set appropriate preferences using
vino-preferences


9.) I also had some issues with screen resolution, so i created a xorg.conf in /etc/X11
Section "Monitor"
       Identifier      "Monitor0"
       ModelName    "Monitor Model"
       DisplaySize     240 320
       Option          "DPMS" "false"
       Option       "UseEDID" "false"
EndSection
Section "Device"
       #Option "ShadowFB"      "true"
       Identifier  "Card0"
       Driver      "fbdev"
       Option  "fbdev" "/dev/fb0"
EndSection
Section "Screen"
       Identifier      "Screen0"
       Device     "Card0"
       Monitor     "Monitor0"
    DefaultDepth    24
    SubSection "Display"
           Depth           24       
       Modes   "1280x1024"
    EndSubSection
EndSection

10.) Last thing I did, was create a crontab, which shuts down the cubieboard, a few minutes, before the TV-screen turns off. As the board is hooked up to the TV usb, the TV will turn on the cubieboard again in the morning. Yes, the TV has a timer function, so it turns itself on automatically.

No comments:

Post a Comment