User Tools

Site Tools


cammos-rpi-displays

This is an old revision of the document!


Setting up a raspberry pi Status screen/sign/display

This page describes how to set up a raspberri pi to connect to a projector/tv/screen and boot up directly into a web browser with periodic update of a web page (or pdf). You can optionally load up multiple tabs and enable tab slideshow so the screens cycle through.

Start by:

  1. Load the img onto an sd card (using dd on linux or Win32DiskImager on windows).
  2. Boot up your raspberry pi, and load a terminal.

Change default password

The default password for the “pi” user on Raspbian is “raspberry”. Type the following to change it.

sudo passwd pi

Static IP instructions

This is optional, samba and vnc will work fine on DHCP settings.

  1. Type this to change the network settings:
    sudo nano /etc/network/interfaces
  2. Comment out the line:
    iface eth0 inet dhcp

    by adding a “#” to the start

  3. Add the following making sure you change the IP address for the different PI
    #Section added for Static IP
    
    auto eth0
    
    iface eth0 inet static
    address 10.106.228.231 #(Change to the IP you require)
    gateway 10.106.224.250
    netmask 255.255.248.0
    network 10.106.228.0
    broadcast 10.106.228.255
  4. Save and exit nano.
  5. Restart new network configuration by typing the following:
    sudo /etc/inet.d/networking restart

SAMBA instructions:

Note this is only useful if the rpi is going to be located on the same LAN as the computer that will be uploading files to it. Alternately openssh-server can be used with no further changes (ie filezilla or winscp from windows) as this is pre-installed and working by default on Raspbian.

  1. type this to install samba server:
    sudo apt-get install samba
  2. edit the smb.conf with this:
    sudo nano /etc/samba/smb.conf
  3. up the top of that file somewhere is workgroup= WORKGROUP make a new line underneath that with “netbios name = BLAH” where blah is what you want to call the raspberry pi on the samba network
  4. go to the very bottom of the file and paste this
    [sampleshare]
       comment = cammo fixme
       writeable = yes
       force user = pi
       create mask = 644
       path = /home/pi/sampleshare
       guest ok = yes
  5. Save and exit.
  6. Create the directory referenced by that share with:
    mkdir /home/pi/sampleshare
  7. Restart samba with:
    sudo /etc/init.d/samba restart

Autostarting firefox/iceweasel

  1. Type this to install iceweasel:
    sudo apt-get install iceweasel
  2. Type:
    mkdir -p ~/.config/lxsession/LXDE-pi
    nano ~/.config/lxsession/LXDE-pi/autostart
  3. Add this line:
    @iceweasel
  4. Save and exit

I found the fix from a comment on this page: http://www.raspberry-projects.com/pi/pi-operating-systems/raspbian/gui/auto-run-browser-on-startup

Setting up Tab mix plus

  1. Install tab mix plus addon in Iceweasel Addons.
  2. Under addons, tabmix preferences, menu:
    1. In the “Tab context menu” tab, enable “reload every”.
    2. In the “Shortcuts” tab, scroll down to “Toggle tabs slideshow”, click in the textbox and press CTRL+F9.
    3. Press close.
  3. Load the PDF you want to display (file:///home/pi/sampleshare/blah.pdf).
  4. Go to preference, general, and press “Use Current Page” for home page (for convenience only) but then set “restore windows and tabs from last time” otherwise the reload every setting for the tabs doesn't get restored.
  5. Rightclick the tab and set reload every to the required time.
  6. Press F11 to go fullscreen (this setting will be remembered between reboots).
  7. Close firefox/iceweasel (to make sure settings get saved) and reboot the raspberry pi to test.

Switching on Tab Mix Plus Tab Slideshow after bootup

There seems to be no setting to have slideshow mode active by default on start. To solve this we'll script xdotool to send the CTRL+F9 keystroke to firefox after it has loaded. Note: for this to work, you need to have completed setting this keybinding in the instructions above for Setting up Tab Mix Plus.

  1. Install xdotool:
    sudo apt-get install xdotool
  2. Create a script with:
    nano activate_slideshow.sh
  3. Paste the following commands into the script:
    #!/bin/bash
    
    # delay to let firefox/iceweasel load
    sleep 120
    
    #find what windowID firefox/iceweasel is using
    WID=`xdotool search "Iceweasel" | head -1`
    
    #activate the window
    xdotool windowactivate --sync $WID
    
    #send CTRL+F9 to it to start the tab slideshow feature of tab mix plus
    xdotool key "ctrl+F9"
  4. Make the script executable with:
    chmod +x activate_slideshow.sh
  5. Edit the LXDE autostart file:
    nano ~/.config/lxsession/LXDE-pi/autostart
  6. Add the following line to the end:
    ~/activate_slideshow.sh

Setting firefox to auto load tabs after crash without confirmation

If the Raspberry pi is unsafely shut down (ie power pulled), firefox will come back with a crash recovery page. This increases the maximum number of “crashes” before this is displayed.

  1. go to about:config in the address bar, press “I'll be careful”
  2. Search for browser.sessionstore.max_resumed_crashes and set it to 100

VNC instructions

  1. Install x11vnc:
    sudo apt-get install x11vnc
  2. Set password for the first time type:
    x11vnc -usepw
  3. Enter password twice, enter to store in default location, then CTRL+C to quit x11vnc after its fired up.
  4. Type the following to edit the autostart file (make sure the directory exists first)
    nano ~/.config/lxsession/LXDE-pi/autostart
  5. Add the line:
    @x11vnc -forever -usepw
  6. Save and exit.
  7. Reboot and test.

Setting the Display to portrait mode

  1. Type the following
     sudo nano /boot/config.txt
  2. Add (or edit) the following line:
    display_rotate=1
  3. Save and exit.
  4. Reboot and test.

Turning off screen blanking

  1. Type the following to edit the autostart file (make sure the directory exists first)
    nano ~/.config/lxsession/LXDE-pi/autostart
  2. Add the lines:
    xset s off
    xset -dpms
  3. Save and exit.
  4. Reboot and test.
cammos-rpi-displays.1428553678.txt.gz · Last modified: 2015/04/09 12:27 by snarg