How do I set the Dashboard to Auto-Print?

Introduction

If you have the BART Dashboard setup at your headquarters, you may want to print out the alerts automatically. 

How to setup Auto-Print

PC 

1. Download and install the latest Google Chrome browser.

2. Create a new shortcut for your Chrome web browser

  • Navigate to your desktop
  • Right-click on the Google Chrome shortcut
  • Copy and paste the shortcut, giving your new one the name 'Google Chrome Auto-Print'


3. Edit the properties of your new shortcut

  • Ensure Google Chrome isn't running - make sure you close down all instances of the program
  • Right-click on your new shortcut
  • Select 'Properties' from the toolbar
  • Select the 'Shortcut' tab from the properties dialogue box


4. Click your mouse cursor inside the 'Target:' text field and navigate to the end

Please note: Paths displayed in the text field may differ depending on the location of where Google Chrome has been installed on your computer.


5. At the end of the path, add in the text below (ensuring there is a space before the first dash):

--kiosk-printing

In our example, our new Target: path would be:

"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --kiosk-printing


For fullscreen mode, you would use:

"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --kiosk-printing --kiosk "https://www.bart.emerg.com.au/dashboard"


6. Restart Google Chrome

Before any changes will take effect, you will need to restart your browser


7. Open Google Chrome

  • Double-click on your new Google Chrome shortcut to open the browser
  • Log into the BART Dashboard as you would normally


8. Ensure you have enabled 'Auto-Print' within the Dashboard

  • Click on the settings icon at the top of the screen
  • Make sure the 'Auto-Print' toggle button is 'On' and glowing green




Mac

Open terminal (under 'Applications > Utilities) and enter the following:

open -a "Google Chrome" --args --kiosk-printing https://www.bart.emerg.com.au/dashboard


Alternatively for full screen:
open -a "Google Chrome" --args --kiosk-printing –kiosk https://www.bart.emerg.com.au/dashboard


Raspberry Pi

  1. Get IP address of device by pressing and holding Ctrl  Alt  F1 to get to command prompt

  2. Type in: ifconfig

  3. SSH from PC/Mac using putty on PC or terminal on Mac, for example -  ssh pi@<IP address>
    User: pi
    Pass: raspberry

  4. Type the following commands:
    sudo apt-get update
    sudo apt-get install cups
    sudo usermod -a -G lpadmin pi
    sudo chown /etc/cups/cupsd.conf

  5. Upload provided Files:
    Using ssh client, eg winscp or FileZilla copy the following files:
    - copy cupsd.conf to /etc/cups
    - copy start_chromium_browser to /home/pi/scripts

    - OR -

    Edit manually:

    nano /scripts/start_chromium_browser
    “Add --kiosk-printing after —kiosk”

    sudo nano /etc/cups/cupsd.conf

    Replace: 
    # Listen localhost:631

    With: 
    Port 631

    Add "Allow @local" in between the following sections:
    < Location / >
    < Location /admin >
    < Location /admin/conf >

    For example:
    < Location / >
    # Restrict access to the server...
    Order allow,deny
    Allow @local
    < /Location >

  6. Open browser on your PC or Mac to:
    http://<ip address>:631

    Please note: Network printers should work without drivers set.

    For direct connected printers Follow rest of guide here:
    https://www.howtogeek.com/169679/how-to-add-a-printer-to-your-raspberry-pi-or-other-linux-computer/

  7. Reboot your Raspberry Pi in dashboard by pressing F1

  8. Click the hamburger icon at top right and select 'Print'. Your printer should appear in the dialog; printing this will save your selection