├── CONTRIBUTING.md ├── LICENCE.md ├── README.md ├── class-sd-cards.md ├── cover.png ├── images ├── Dvi-cable.jpg ├── HDMI-Connector.jpg ├── Raspberry-Pis.jpg ├── SD-Formatter.jpg ├── SD1.png ├── SD2.png ├── Vga-cable.jpg ├── all-the-things.png ├── etcher.gif ├── noobs.png ├── noobs1.png ├── noobs2.png ├── plug-in.gif ├── raspberry-pi.png ├── siteHome.png ├── usb1.png ├── usb2.png ├── vnc_firefox.png ├── vnc_ie.png ├── wifi2.png ├── winscp1.png ├── winscp3.png ├── winscp4.png ├── winscp5.png └── winscp6.png ├── meta.yml ├── networked-solutions.md ├── software.md ├── vnc-browser-guide.md ├── vnc-classroom-guide.md ├── vncboot └── vncproxy /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | All contributions are assumed to be licensed under the same license as the source, i.e. CC BY-SA. This license must remain in all derivatives of this work. 4 | 5 | ## Issues 6 | 7 | If you find a mistake, bug or other problem, please [open an issue](https://github.com/raspberrypilearning/teachers-classroom-guide/issues) in this repository. 8 | 9 | ## Pull Requests 10 | 11 | If you fix a mistake, bug or problem or have something to contribute, please create a pull request for each modification. Please consider grouping modifications sensibly, i.e. don't bundle typo fixes in the same pull request as code changes, instead file them separately. 12 | 13 | Please note that sometimes things are done for pedagogical reasons so changes which make sense from a software engineering perspective (reducing duplication or making use of more advanced programming language features) may not be suitable to maintain the intended educational value. 14 | 15 | ## Derivatives 16 | 17 | The licence must remain in all derivatives of this work. 18 | 19 | ## Licence 20 | 21 | Unless otherwise specified, everything in this repository is covered by the following licence: 22 | 23 | [![Creative Commons License](http://i.creativecommons.org/l/by-sa/4.0/88x31.png)](http://creativecommons.org/licenses/by-sa/4.0/) 24 | 25 | ***Teachers Classroom Guide*** by the [Raspberry Pi Foundation](http://www.raspberrypi.org) is licensed under a [Creative Commons Attribution 4.0 International Licence](http://creativecommons.org/licenses/by-sa/4.0/). 26 | 27 | Based on a work at https://github.com/raspberrypilearning/teachers-classroom-guide 28 | -------------------------------------------------------------------------------- /LICENCE.md: -------------------------------------------------------------------------------- 1 | # Licence 2 | 3 | Unless otherwise specified, everything in this repository is covered by the following licence: 4 | 5 | [![Creative Commons License](http://i.creativecommons.org/l/by-sa/4.0/88x31.png)](http://creativecommons.org/licenses/by-sa/4.0/) 6 | 7 | ***Teachers Classroom Guide*** by the [Raspberry Pi Foundation](http://www.raspberrypi.org) is licensed under a [Creative Commons Attribution 4.0 International Licence](http://creativecommons.org/licenses/by-sa/4.0/). 8 | 9 | Based on a work at https://github.com/raspberrypilearning/teachers-classroom-guide 10 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # A teachers' guide to using Raspberry Pi in the classroom 2 | 3 | [NOTE: This resource is no longer maintained and has been replaced by **teachers-guide**] 4 | 5 | ![](cover.png) 6 | 7 | If you would like to use Raspberry Pis in your classroom, then there are a number of ways to do this outlined in this guide. Some solutions repurpose existing classroom kit in order to minimise further expense. 8 | 9 | ## Getting started with Raspberry Pi 10 | 11 | It's recommended that you first read [this guide to learn how to set up a standalone Raspberry Pi](https://www.raspberrypi.org/learning/quick-start-guide/worksheet/) for the first time, if you're new to using the device, before reading on. 12 | 13 | One way to use Raspberry Pi in the classroom is as a standalone device that students can use outside of the school network to create programs and electronic projects, without the risk of breaking expensive equipment or taking down an entire school network. It's an environment that allows for the freedom of failure, and it's through failing that students learn. If a file system becomes corrupted then it's okay, as you can always start again with a fresh SD card image. If you blow an LED, it doesn't matter. 14 | 15 | Another appealing feature of the Raspberry Pi in education is that it looks interesting, and students ask questions about the hardware. How is it a computer? How does it work? What are input and output devices? Where does it store its software? and so on. 16 | 17 | ## Hardware required 18 | 19 | ![](images/raspberry-pi.png) 20 | 21 | ### What you will need for a standalone class set of Raspberry Pis 22 | 23 | 1. A number of Raspberry Pis; one between two can work, depending on the work students are doing. You may have one or more of the following models: 24 | - [Raspberry Pi Model B](https://www.raspberrypi.org/products/model-b/) 25 | - [Raspberry Pi Model B+](https://www.raspberrypi.org/products/model-b-plus/) 26 | - [Raspberry Pi 2](https://www.raspberrypi.org/products/raspberry-pi-2-model-b/) 27 | - [Raspberry Pi 3](https://www.raspberrypi.org/products/raspberry-pi-3-model-b/) 28 | - Enough 8 GB SD cards or micro SD cards for each Pi. 29 | 1. USB keyboards and mice for each Pi. 30 | 1. [Micro USB power supply](https://www.raspberrypi.org/products/universal-power-supply/) for each Pi. 31 | 1. HDMI cable to connect to a monitor for each Pi (see 'Monitor solutions' below). 32 | 1. A monitor for each Pi. 33 | 34 | ### Further items you will need for a networked class set of Raspberry Pis 35 | 36 | - Ethernet cable connection 37 | - You can also use a WiFi dongle, (like [this one](http://thepihut.com/products/usb-wifi-adapter-for-the-raspberry-pi) from [The Pi Hut](http://thepihut.com/)). 38 | - If you have Raspberry Pi 3s, then you can use the onboard WiFi connection. 39 | 40 | ### Optional extras 41 | 42 | - [USB hubs](http://thepihut.com/products/7-port-usb-hub-for-the-raspberry-pi) can be used to power more than one Raspberry Pi and provides extra USB ports. 43 | - An SD card duplicator to copy SD card images to multiple cards. These are handy for making a class set. Unfortunately, they cost £500 or more. 44 | 45 | ## Monitor solutions 46 | 47 | You could use existing school monitors with Raspberry Pis. You'll need to check the cables to see if they have the correct connectors for the Pi. 48 | 49 | - **HDMI** The Raspberry Pi outputs through a HDMI connector to a TV or monitor. Most modern TVs, monitors, and projectors use HDMI. However, this is not always the case in classrooms, where technology is a few years older. 50 | 51 | ![](images/HDMI-Connector.jpg) 52 | 53 | - **DVI** If the monitors in your classroom don't have a HDMI connector, but have a DVI connector, then you can purchase HDMI-to-DVI cables. This is an additional cost, but these cables are relatively inexpensive and replace the need for HDMI cables. 54 | 55 | ![](images/Dvi-cable.jpg) 56 | 57 | - **VGA** If you have equipment that is more than a few years old, then it's likely that the monitors will have VGA connectors. In this case, you'll need to get a VGA adapter for the Raspberry Pi at additional cost. Before you make this choice, it's recommended that you consider some of the solutions below for using the school network to connect to the Pis instead. 58 | 59 | ![](images/Vga-cable.jpg) 60 | 61 | ## Networked solutions 62 | 63 | You or your network administrators may wish to integrate Raspberry Pis more permanently into the school network. This is often a way to use existing hardware to connect to a Raspberry Pi, eliminating the need for extra monitors. Below are a number of ways of connecting to a Raspberry Pi using remote desktop software such as VNC, and details on using PiNet as a solution to user accounts, shared folders, and SD card problems. 64 | 65 | ### Remote desktop from classroom computers to Raspberry Pis 66 | 67 | - [Using VNC to connect to a Raspberry Pi from a desktop computer](vnc-classroom-guide.md) 68 | - [Using VNC through a browser window](vnc-browser-guide.md) 69 | 70 | ### PiNet 71 | 72 | PiNet is a free centralised user accounts and file storage system for the Raspberry Pi in classrooms. With it, all Raspberry Pis load from a central server, so any student can sit down at any Raspberry Pi in the classroom and log in. It was designed to be incredibly easy for teachers to set up and use. More details can be found on the [PiNet website](http://pinet.org.uk/). 73 | 74 | ## Managing a class set 75 | 76 | - [How to make a class set of SD cards](class-sd-cards.md) 77 | - [Backing up your files on an SD card](https://www.raspberrypi.org/learning/noobs-install/backup/) 78 | 79 | ## Cross-curricular opportunities 80 | 81 | Using Raspberry Pis in a classroom can also offer different ways of teaching and learning. It opens up the possibility of seeing computing more as a creative and maker-style activity. Computing can be a truly cross-curricular subject in Art, Science and Technology. Raspberry Pi can offer more than you realise in education. 82 | 83 | - ['What does a good computing classroom look like?' by Clive Beale](http://www.raspberrypi.org/what-does-a-good-computing-classroom-look-like) 84 | 85 | ## Teaching resources 86 | 87 | With qualified teachers among our staff, we produce teaching materials, including full schemes of work that are cross-curricular, engaging, and satisfy the curriculum. They are published under a Creative Commons licence, so that teachers can use them however they see fit. 88 | 89 | - [Teach - Raspberry Pi Teaching Resources](http://www.raspberrypi.org/resources/teach/) 90 | - A great place to start is with our [Getting Started lesson](http://www.raspberrypi.org/learning/getting-started-with-raspberry-pi-lesson/) 91 | 92 | ## Training 93 | 94 | Here at the Raspberry Pi Foundation we offer FREE CPD for teachers as the Raspberry Pi Academy, or Picademy for short. To find out more, click on the link below: 95 | 96 | - [Picademy Page](http://www.raspberrypi.org/picademy) 97 | 98 | ## Asking the community 99 | 100 | The Raspberry Pi community is ready, willing and in most cases able to help schools teach Computing with Raspberry Pis. They are an often untapped source of experience and resources. If, after reading through this guide, you still can't find solutions to your classroom problems, then it's recommended that you reach out to the community. 101 | 102 | > When I started to use Raspberry Pis in my classroom in late 2012, the monitors were all VGA. At that time there wasn't a converter cable guaranteed to work, so I put a message out on Twitter asking if any local businesses were getting rid of any DVI monitors. Within a couple of minutes I had a response, and that weekend I collected the monitors I needed for free. 103 | 104 | > The Raspberry Pi community is one of the most helpful I've ever been in contact with as a teacher. Using the [forums](http://www.raspberrypi.org/forums), or Twitter with the hashtag `#raspberrypi` or `#picademy`, could be a way to find solutions for your classroom too. ~ Carrie Anne Philbin 105 | 106 | ### The community page 107 | 108 | On our website, we feature prominent people and organisations within our community who are doing great outreach work. It's a good starting point to learn more about Raspberry Pi. 109 | 110 | - [Official community page](http://www.raspberrypi.org/community/) 111 | 112 | ### The forum 113 | 114 | If you have a question, whatever your level or experience, then you can ask it on our forum. We have an education section specifically set up for this. It's an extremely friendly forum, where someone will answer your question very quickly and politely. A number of our Raspberry Pi Certified Educators are active on this forum, helping to answer questions and share good practice. 115 | 116 | - [Education forum](http://www.raspberrypi.org/forums/viewforum.php?f=17&sid=f9cb8df1edfa3781e9a7afa26aaa4e42) 117 | -------------------------------------------------------------------------------- /class-sd-cards.md: -------------------------------------------------------------------------------- 1 | # Making a class set of SD cards 2 | 3 | Begin by downloading and setting up one SD card with all the software you require. This can then become your master image from which you can create more cards. 4 | 5 | ## Format your SD card 6 | 7 | It's recommended that you format your SD card on your computer or laptop before copying the NOOBS files onto it or adding the Raspbian image. To do this: 8 | 9 | 1. Visit the [SD Association’s website](http://www.sdcard.org/) and download [SD Formatter 4.0](https://www.sdcard.org/downloads/formatter_4/index.html) for either Windows or Mac. 10 | 1. Follow the instructions to install the software. 11 | 1. Insert your SD card into the computer or laptop’s SD card reader and make a note of the drive letter allocated to it, e.g. `F:/`. 12 | 1. In SD Formatter, select the drive letter for your SD card and format it. 13 | 14 | ![](images/SD-Formatter.jpg) 15 | 16 | ## Download and image Raspbian 17 | 18 | Once you have formatted your SD card, download and install the image directly. 19 | 20 | 1. Using a computer with an SD card reader, visit the official Raspberry Pi [Downloads page](http://www.raspberrypi.org/downloads/). 21 | 1. Click on **Raspbian**. 22 | 23 | ![](images/noobs1.png) 24 | 25 | 1. Click on the 'Download ZIP' button under ‘Raspbian Jessie (full desktop image)’, and select a folder to save it to. 26 | 1. Extract the files from the zip. 27 | 28 | ![](images/noobs2.png) 29 | 30 | 1. Visit [etcher.io](http://www.etcher.io/) and download and install the Etcher SD card image utility. 31 | 1. Run Etcher and select the Raspbian image you unzipped on your computer or laptop. 32 | 1. Then select the SD card drive. Note that the software may have already selected the right drive. 33 | 1. Finally, click **Burn** to transfer Raspbian to the SD card. You'll see a progress bar that tells you how much is left to do. Once complete, the utility will automatically eject or unmount the SD card so it's safe to remove it from the computer. 34 | 35 | ![](images/etcher.gif) 36 | 37 | ## Update and upgrade 38 | 39 | It is best to ensure you have the most up-to-date software on your SD card before making copies of it. 40 | 41 | 1. Put the SD card into a Raspberry Pi connected to the internet via Ethernet or WiFi, and boot it. 42 | 1. Once the desktop has loaded, open a **terminal** window by clicking on **Main Menu**, **Accessories** and **Terminal**. Alternatively, you can click on the Terminal icon in the taskbar. 43 | 1. Next, type the following: 44 | 45 | ```bash 46 | sudo apt-get update 47 | ``` 48 | 49 | 1. Then press **Enter** on the keyboard. 50 | 51 | You will see some text appear very quickly. Simply wait for the progress indictator at the bottom to reach 100% and then you'll be returned to the command line prompt. 52 | 53 | ## Upgrade 54 | 55 | Once the update process is complete, and any information about new versions of applications are downloaded, you'll need to install the upgrades. 56 | 57 | 1. In a terminal window or on the command line, type: 58 | 59 | ```bash 60 | sudo apt-get upgrade 61 | ``` 62 | 63 | 1. Then press **Y** or **Enter** on the keyboard when asked, and your upgrades will be installed. 64 | 65 | ## Downloading and installing applications on your Raspberry Pi 66 | 67 | You can use text commands to download and install extra applications that you may wish to use. In the 'What you will need' section of a Raspberry Pi resource, for example, you may see a piece of software listed that you'll need in order to complete the activity or project. To download and install extra software applications that you want to use on your Raspberry Pi, you'll need to be connected to the internet with Ethernet or WiFi. 68 | 69 | 1. From a terminal window or on the command line, simply type `sudo apt-get install ` and press **Enter** on the keyboard. 70 | 1. After searching for the package and downloading it, you will be asked if you want to continue with the installation. Press **Y** or **Enter** on the keyboard to continue. 71 | 72 | ## Checking space on an SD card 73 | 74 | When running `sudo apt-get upgrade`, it will show how much data will be downloaded and how much space it will take up on the SD card. It's worth checking with `df -h` that you have enough disk space free, as unfortunately apt will not do this for you. Also, be aware that downloaded package files (.deb files) are kept in `/var/cache/apt/archives`. You can remove these in order to free up space, using `sudo apt-get clean`. 75 | 76 | ## Clone the master SD card to make a class set 77 | 78 | One SD card won't be enough for a whole class, so now you need to make a copy of your SD card and clone it to others. 79 | 80 | ### Windows 81 | 82 | 1. Open the SD imaging application again and select a location to save your image, using the same part of the application you used to select an image file to load onto an SD card. 83 | 1. Enter the name you want to save it as at the bottom of the file selection window, e.g. `my-class-pi-image`. Don't save it with the name of another SD card image, or you'll overwrite it! 84 | 1. Click **read** to start copying the SD card image to your computer. 85 | 86 | ### Mac 87 | 88 | 1. Open a terminal window by clicking on **Applications**, then **Utilities** and **Terminal**. 89 | 1. Type `diskutil list`and press **Enter**. It will show a list of all filesystems connected to your Mac. 90 | 1. Insert the SD card, type `diskutil list` and press **Enter** again. Take a note of the SD card drive; it should read something like `/dev/disk3`. Take note of the final number (in the example, that was 3). 91 | 1. Finally, use `dd` to read the image from the SD card to a file by typing `sudo dd if=/dev/rdiskX of=~/Desktop/pi.img bs=1m`. Note the use of `rdiskX` instead of `diskX`. Make sure to replace the `X` with the number from above (e.g. 3). This will save it to an image file on the desktop called `pi.img`. 92 | 93 | Now you have your master image saved, you can use Etcher like you did in step 2 to burn new SD cards. 94 | 95 | ## What next? 96 | 97 | - Return to the [teachers' classroom guide](README.md) 98 | -------------------------------------------------------------------------------- /cover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raspberrypilearning/teachers-classroom-guide/88efe8d31eaf6d948046f6fc970361b708710dd7/cover.png -------------------------------------------------------------------------------- /images/Dvi-cable.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raspberrypilearning/teachers-classroom-guide/88efe8d31eaf6d948046f6fc970361b708710dd7/images/Dvi-cable.jpg -------------------------------------------------------------------------------- /images/HDMI-Connector.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raspberrypilearning/teachers-classroom-guide/88efe8d31eaf6d948046f6fc970361b708710dd7/images/HDMI-Connector.jpg -------------------------------------------------------------------------------- /images/Raspberry-Pis.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raspberrypilearning/teachers-classroom-guide/88efe8d31eaf6d948046f6fc970361b708710dd7/images/Raspberry-Pis.jpg -------------------------------------------------------------------------------- /images/SD-Formatter.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raspberrypilearning/teachers-classroom-guide/88efe8d31eaf6d948046f6fc970361b708710dd7/images/SD-Formatter.jpg -------------------------------------------------------------------------------- /images/SD1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raspberrypilearning/teachers-classroom-guide/88efe8d31eaf6d948046f6fc970361b708710dd7/images/SD1.png -------------------------------------------------------------------------------- /images/SD2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raspberrypilearning/teachers-classroom-guide/88efe8d31eaf6d948046f6fc970361b708710dd7/images/SD2.png -------------------------------------------------------------------------------- /images/Vga-cable.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raspberrypilearning/teachers-classroom-guide/88efe8d31eaf6d948046f6fc970361b708710dd7/images/Vga-cable.jpg -------------------------------------------------------------------------------- /images/all-the-things.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raspberrypilearning/teachers-classroom-guide/88efe8d31eaf6d948046f6fc970361b708710dd7/images/all-the-things.png -------------------------------------------------------------------------------- /images/etcher.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raspberrypilearning/teachers-classroom-guide/88efe8d31eaf6d948046f6fc970361b708710dd7/images/etcher.gif -------------------------------------------------------------------------------- /images/noobs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raspberrypilearning/teachers-classroom-guide/88efe8d31eaf6d948046f6fc970361b708710dd7/images/noobs.png -------------------------------------------------------------------------------- /images/noobs1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raspberrypilearning/teachers-classroom-guide/88efe8d31eaf6d948046f6fc970361b708710dd7/images/noobs1.png -------------------------------------------------------------------------------- /images/noobs2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raspberrypilearning/teachers-classroom-guide/88efe8d31eaf6d948046f6fc970361b708710dd7/images/noobs2.png -------------------------------------------------------------------------------- /images/plug-in.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raspberrypilearning/teachers-classroom-guide/88efe8d31eaf6d948046f6fc970361b708710dd7/images/plug-in.gif -------------------------------------------------------------------------------- /images/raspberry-pi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raspberrypilearning/teachers-classroom-guide/88efe8d31eaf6d948046f6fc970361b708710dd7/images/raspberry-pi.png -------------------------------------------------------------------------------- /images/siteHome.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raspberrypilearning/teachers-classroom-guide/88efe8d31eaf6d948046f6fc970361b708710dd7/images/siteHome.png -------------------------------------------------------------------------------- /images/usb1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raspberrypilearning/teachers-classroom-guide/88efe8d31eaf6d948046f6fc970361b708710dd7/images/usb1.png -------------------------------------------------------------------------------- /images/usb2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raspberrypilearning/teachers-classroom-guide/88efe8d31eaf6d948046f6fc970361b708710dd7/images/usb2.png -------------------------------------------------------------------------------- /images/vnc_firefox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raspberrypilearning/teachers-classroom-guide/88efe8d31eaf6d948046f6fc970361b708710dd7/images/vnc_firefox.png -------------------------------------------------------------------------------- /images/vnc_ie.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raspberrypilearning/teachers-classroom-guide/88efe8d31eaf6d948046f6fc970361b708710dd7/images/vnc_ie.png -------------------------------------------------------------------------------- /images/wifi2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raspberrypilearning/teachers-classroom-guide/88efe8d31eaf6d948046f6fc970361b708710dd7/images/wifi2.png -------------------------------------------------------------------------------- /images/winscp1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raspberrypilearning/teachers-classroom-guide/88efe8d31eaf6d948046f6fc970361b708710dd7/images/winscp1.png -------------------------------------------------------------------------------- /images/winscp3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raspberrypilearning/teachers-classroom-guide/88efe8d31eaf6d948046f6fc970361b708710dd7/images/winscp3.png -------------------------------------------------------------------------------- /images/winscp4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raspberrypilearning/teachers-classroom-guide/88efe8d31eaf6d948046f6fc970361b708710dd7/images/winscp4.png -------------------------------------------------------------------------------- /images/winscp5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raspberrypilearning/teachers-classroom-guide/88efe8d31eaf6d948046f6fc970361b708710dd7/images/winscp5.png -------------------------------------------------------------------------------- /images/winscp6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raspberrypilearning/teachers-classroom-guide/88efe8d31eaf6d948046f6fc970361b708710dd7/images/winscp6.png -------------------------------------------------------------------------------- /meta.yml: -------------------------------------------------------------------------------- 1 | title: Teacher's Classroom Guide 2 | category: teach 3 | -------------------------------------------------------------------------------- /networked-solutions.md: -------------------------------------------------------------------------------- 1 | ## Networked solutions 2 | 3 | You or your network administrators may wish to integrate Raspberry Pis more permanently into the school network. This is often a way to use existing hardware to connect to a Raspberry Pi, negating the need for extra monitors. Below are a number of ways of connecting to a Raspberry Pi using remote desktop software such as VNC, and a guide to using a Raspberry Pi terminal server as a solution to shared folders and SD card problems. 4 | 5 | ### Remote Desktop from classroom computers to Raspberry Pis 6 | 7 | - [Using VNC to connect to a Raspberry Pi from a desktop computer](vnc-classroom-guide.md) 8 | - [Using VNC through a browser window](vnc-browser-guide.md) 9 | 10 | ### Raspberry Pi Terminal Server 11 | 12 | - [Raspberry Pi Linux Terminal Server Project](http://gbaman.github.io/RaspberryPi-LTSP/) 13 | -------------------------------------------------------------------------------- /software.md: -------------------------------------------------------------------------------- 1 | # Guide to installing software on Raspberry Pi 2 | 3 | Follow this guide from the command line, or open an LXTerminal window. 4 | 5 | ## Installing software with apt 6 | 7 | The easiest way to manage installing, upgrading, and removing software is using `apt` (Advanced Packaging Tool) which comes from Debian. If a piece of software is packaged in Debian and works on the Raspberry Pi's ARM architecture, it should also be available in Raspbian. 8 | 9 | To install or remove packages you need root user permissions, so your user needs to be in `sudoers` or you must be logged in as `root`. Read more about [users](http://raspberrypi.org/documentation/linux/usage/users.md) and [root](http://raspberrypi.org/documentation/linux/usage/root.md). 10 | 11 | To install new packages, or update existing ones, you will need an internet connection. 12 | 13 | Note that installing software uses up disk space on your SD card, so you should keep an eye on disk usage and use an appropriately sized SD card. 14 | 15 | Also note that a lock is performed while software is installing, so you cannot install multiple packages at the same time. 16 | 17 | ## Software sources 18 | 19 | APT keeps a list of software sources on your Pi in a file at `/etc/apt/sources.list`. Before installing software, you should update your package list with `apt-get update`: 20 | 21 | ```bash 22 | sudo apt-get update 23 | ``` 24 | 25 | ## Installing a package with APT 26 | 27 | ```bash 28 | sudo apt-get install tree 29 | ``` 30 | 31 | Typing this command should inform the user how much disk space the package will take up and asks for confirmation of the package installation. Entering `Y` (or just hitting `Enter`, as yes is the default action) will allow the installation to occur. This can be bypassed by adding the `-y` flag to the command: 32 | 33 | ```bash 34 | sudo apt-get install tree -y 35 | ``` 36 | 37 | Installing this package makes `tree` available for the user. 38 | 39 | ## Using an installed package 40 | 41 | `tree` is a command line tool which provides a visualisation of the directory structure of the current directory, and all it contains. 42 | 43 | - Typing `tree` runs the tree command. For example: 44 | 45 | ```bash 46 | tree 47 | .. 48 | ├── hello.py 49 | ├── games 50 | │ ├── asteroids.py 51 | │ ├── pacman.py 52 | │ ├── README.txt 53 | │ └── tetris.py 54 | 55 | ``` 56 | 57 | - Typing `man tree` gives the manual entry for the package `tree` 58 | - Typing `whereis tree` shows where `tree` lives: 59 | 60 | ```bash 61 | tree: /usr/bin/tree 62 | ``` 63 | 64 | ## Uninstalling a package with APT 65 | 66 | ### Remove 67 | 68 | You can uninstall a package with `apt-get remove`: 69 | 70 | ```bash 71 | sudo apt-get remove tree 72 | ``` 73 | 74 | The user is prompted to confirm the removal. Again, the `-y` flag will auto-confirm. 75 | 76 | ### Purge 77 | 78 | You can also choose to completely remove the package and its associated configuration files with `apt-get purge`: 79 | 80 | ```bash 81 | sudo apt-get purge tree 82 | ``` 83 | 84 | ## Upgrading existing software 85 | 86 | If software updates are available, you can get the updates with `sudo apt-get update` and install the updates with `sudo apt-get upgrade`, which will upgrade all of your packages. To upgrade a specific package, without upgrading all the other out-of-date packages at the same time, you can use `sudo apt-get install somepackage` (which may be useful if you're low on disk space or you have limited download bandwidth). 87 | 88 | ## Searching for software 89 | 90 | You can search the archives for a package with a given keyword with `apt-cache search`: 91 | 92 | ```bash 93 | apt-cache search locomotive 94 | sl - Correct you if you type `sl' by mistake 95 | ``` 96 | 97 | You can view more information about a package before installing it with `apt-cache show`: 98 | 99 | ```bash 100 | apt-cache show sl 101 | Package: sl 102 | Version: 3.03-17 103 | Architecture: armhf 104 | Maintainer: Hiroyuki Yamamoto 105 | Installed-Size: 114 106 | Depends: libc6 (>= 2.4), libncurses5 (>= 5.5-5~), libtinfo5 107 | Homepage: http://www.tkl.iis.u-tokyo.ac.jp/~toyoda/index_e.html 108 | Priority: optional 109 | Section: games 110 | Filename: pool/main/s/sl/sl_3.03-17_armhf.deb 111 | Size: 26246 112 | SHA256: 42dea9d7c618af8fe9f3c810b3d551102832bf217a5bcdba310f119f62117dfb 113 | SHA1: b08039acccecd721fc3e6faf264fe59e56118e74 114 | MD5sum: 450b21cc998dc9026313f72b4bd9807b 115 | Description: Correct you if you type `sl' by mistake 116 | Sl is a program that can display animations aimed to correct you 117 | if you type 'sl' by mistake. 118 | SL stands for Steam Locomotive. 119 | ``` 120 | 121 | ## Installing Python packages 122 | 123 | Some Python packages can be found in the Raspbian archives and can be installed using APT, for example: 124 | 125 | ```bash 126 | sudo apt-get update 127 | sudo apt-get install python3-picamera 128 | ``` 129 | 130 | This is a preferable method of installing software, as it means that the modules you install can be kept up to date easily with the usual `sudo apt-get update` and `sudo apt-get upgrade` commands. 131 | 132 | Python packages in Raspbian which are compatible with Python 2.x will always have a `python-` prefix. So, the `picamera` package for Python 2.x is named `python-picamera` (as shown in the example above). Python 3 packages always have a `python3-` prefix. So, to install `rpi.gpio` for Python 3 you would use: 133 | 134 | ```bash 135 | sudo apt-get install python3-rpi.gpio 136 | ``` 137 | 138 | ### pip 139 | 140 | Not all Python packages are available in the Raspbian archives, and those that are can sometimes be out of date. If you can't find a suitable version in the Raspbian archives you can install packages from the [Python Package Index](http://pypi.python.org/) (PyPI). To do so, use the `pip` tool. 141 | 142 | First install `pip` with `apt`. 143 | 144 | ```bash 145 | sudo apt-get install python3-pip 146 | ``` 147 | 148 | or the Python 2 version: 149 | 150 | ```bash 151 | sudo apt-get install python-pip 152 | ``` 153 | 154 | `pip-3.3` installs modules for Python 3 and `pip` installs modules for Python 2. 155 | 156 | For example, the folowing command installs the Pibrella library for Python 3: 157 | 158 | ```bash 159 | pip-3.3 install pibrella 160 | ``` 161 | 162 | and the folowing command installs the Pibrella library for Python 2: 163 | 164 | ```bash 165 | pip install pibrella 166 | ``` 167 | 168 | Uninstall Python modules with `pip-3.3 uninstall` or `pip uninstall`. 169 | 170 | Upload your own Python modules to `pip` with the [guide at PyPI](https://wiki.python.org/moin/CheeseShopTutorial#Submitting_Packages_to_the_Package_Index). 171 | -------------------------------------------------------------------------------- /vnc-browser-guide.md: -------------------------------------------------------------------------------- 1 | # Remote desktop to a Raspberry Pi through your web browser 2 | 3 | This guide is a slight variant on using remote desktop, such as VNC, to connect to a Raspberry Pi. 4 | 5 | The basic premise is to use another computer as the input console for the Raspberry Pi without needing to get a separate screen, keyboard, and mouse on the Pi. This is ideal if, for example, you've got a room full of laptops, Chromebooks or iMacs. 6 | 7 | This differs from the previous method in that you don't need to install any software on the host computer/laptop. You can set the Raspberry Pi up so that it provides everything the host computer needs through the web browser. It makes it as easy as typing an address in. 8 | 9 | Here is an example of the end product on Windows / IE: 10 | 11 | ![](images/vnc_ie.png) 12 | 13 | ## What will it work on? 14 | 15 | This system will work on any HTML5-compliant web browser, in particular these browser versions or later: 16 | 17 | - Chrome 8 18 | - Firefox 4 19 | - Safari 5 20 | - iOS Safari 4.2 21 | - Opera 11 22 | - IE 9 23 | 24 | ## Step 1: Setting up the server on a Raspberry Pi 25 | 26 | 1. Start with a fresh install of Raspbian and log in as the default `pi` user. You can use the command line interface for this guide. 27 | 1. Install the following packages (TightVNC server and screen). Run these commands from the terminal: 28 | 29 | ``` 30 | sudo apt-get update 31 | sudo apt-get install tightvncserver screen -y 32 | ``` 33 | 34 | 1. Next run TightVNC server, which will prompt you to enter a password and an optional view-only password, by typing `tightvncserver` and pressing **Enter** on the keyboard. 35 | 36 | 1. Now let's get the HTML5 VNC client. Enter the following commands and press **Enter** at the end of each line: 37 | 38 | ``` 39 | cd /usr/local/share/ 40 | sudo git clone git://github.com/kanaka/noVNC 41 | ``` 42 | 43 | 1. We just need to make a small adjustment to some of the files here. The folder we've just downloaded will be served out as a HTTP root for the Pi, so we just need to ensure there is an index page. This will allow the host computer to access the VNC client software. 44 | 45 | ``` 46 | cd noVNC 47 | sudo cp vnc_auto.html index.html 48 | ``` 49 | 50 | 1. Next we need to set everything to start automatically, since you're probably going to want to use the Raspberry Pi in headless mode (without a keyboard, mouse or monitor). To do this we just need to download a few scripts for `init.d`. Enter the following commands: 51 | 52 | ``` 53 | cd /etc/init.d/ 54 | sudo wget https://raw.githubusercontent.com/raspberrypilearning/teachers-classroom-guide/master/vncboot --no-check-certificate 55 | sudo nano vncboot 56 | ``` 57 | 58 | *Note the line that says `-geometry 1280x800`. This sets the screen resolution for the remote desktop, so you may wish to alter this to suit the screen size of the host computer. Ideally this should be set slightly lower to avoid having scrollbars.* 59 | 60 | 1. Press **Ctrl** and **O** followed by **Enter** to save, then **Ctrl** and **X** to quit editing. 61 | 62 | 1. The script you have just created basically makes VNC part of the background services that Linux is controlling. We next need to register the script. Enter the following commands: 63 | 64 | ``` 65 | sudo chmod 755 vncboot 66 | sudo update-rc.d vncboot defaults 67 | ``` 68 | 69 | Ignore any messages about missing LSB tags and overrides. That's the server part done. Next we need to setup a similar script for the HTML5 client. 70 | 71 | ## Step 2: Setting up the client 72 | 73 | With the server side completed, you now need to download a similar script for the HTML5 client. 74 | 75 | 1. Enter the following command: 76 | 77 | ``` 78 | sudo wget https://raw.githubusercontent.com/raspberrypilearning/teachers-classroom-guide/master/vncproxy --no-check-certificate 79 | ``` 80 | 81 | 1. Then register this script with Linux by typing: 82 | 83 | ``` 84 | sudo chmod 755 vncproxy 85 | sudo update-rc.d vncproxy defaults 98 86 | ``` 87 | 88 | Ignore any messages about missing LSB tags and overrides. 89 | 90 | 1. Now reboot your Raspberry Pi by typing `sudo reboot` and both services will start up automatically. When the Pi has rebooted, you should now be able to enter the IP address of the Raspberry Pi into the web browser of the host computer. You will be prompted for the password that you specified when setting up the VNC server. 91 | 92 | *Note: an error has occasionally been observed on the first time that you try to connect; this is possibly caused by the proxy starting before the VNC server socket is open. If you see this the top bar goes red. Just hit refresh (F5), enter the password again and it should work.* 93 | 94 | ## Step 3: Master and slave mode 95 | 96 | There is another trick you can do here if you want to refine the setup further. 97 | 98 | Using the following instructions, each Raspberry Pi will be directly connecting to the host computer using a single Ethernet cable, thus making a completely isolated point-to-point network between the two; this way, your network administrators shouldn't have any cause to complain. Note that you don't need a crossover cable for this; a standard cable will work, because the Pi Ethernet port auto-switches the transmit and receive pins. 99 | 100 | Firstly we'll need to install some more software on the Pi. We’re going to make the Pi Ethernet port behave in a similar way to a home router. This means assigning a static IP address to it and installing a DHCP service (dnsmasq) that will respond to address requests from the host computer. 101 | 102 | 1. Enter these commands: 103 | 104 | ``` 105 | sudo apt-get install dnsmasq -y 106 | ``` 107 | 108 | 1. It’s a good idea to use an IP address range that is very different to your main network, so let’s use `10.0.0.X`. To configure this we must edit the network interfaces file. Enter the following command: 109 | 110 | ``` 111 | sudo nano /etc/network/interfaces 112 | ``` 113 | 114 | 1. Find the following line `iface eth0 inet dhcp`, add a hash symbol at the start of the line to disable it, and then add the other four lines shown below. 115 | 116 | ``` 117 | # iface eth0 inet dhcp 118 | auto eth0 119 | iface eth0 inet static 120 | address 10.0.0.1 121 | netmask 255.255.255.0 122 | ``` 123 | 124 | 1. Press **Ctrl** and **O** followed by **Enter** to save, then **Ctrl** and **X** to quit editing. The Raspberry Pi will now have a static address of `10.0.0.1`. 125 | 126 | 1. Next configure `dnsmasq` (that you installed earlier) to give out IP addresses. We are going to explicitly specify a configuration file for the `dnsmasq` service, so let’s first make a backup of the default config file and then save our one in its place: 127 | 128 | ``` 129 | cd /etc 130 | sudo mv dnsmasq.conf dnsmasq.default 131 | sudo nano dnsmasq.conf 132 | ``` 133 | 134 | 1. You should now be editing a blank file. Type the following into it: 135 | 136 | ``` 137 | interface=eth0 138 | dhcp-range=10.0.0.2,10.0.0.250,255.255.255.0,12h 139 | dhcp-option=3,10.0.0.1 140 | dhcp-option=6,10.0.0.1 141 | ``` 142 | 143 | The first line tells `dnsmasq` to listen for DHCP requests on the Ethernet port of the Pi. The second line is specifying the range of IP addresses that can be given out. The third and fourth lines tell the host computer what its default gateway and DNS server settings are. 144 | 145 | 1. Next make a small edit to the hosts file. This will allow the user to type in 'pi' into the browser instead of `10.0.0.1`. Enter the following to edit the hosts file: `sudo nano /etc/hosts`. 146 | 147 | 1. Find the line that says `127.0.0.1 raspberrypi` and add the following line: 148 | 149 | `10.0.0.1 pi` 150 | 151 | 1. Press **Ctrl** and **O** followed by **Enter** to save, then **Ctrl** and **X** to quit editing. Next, disconnect the Pi from the LAN and reboot by typing `sudo reboot`. 152 | 153 | 1. You can go ahead and plug in the single Ethernet cable directly from the Pi to the host computer. 154 | The host computer should then be given an IP address which will be 10.0.0.X, where X is a random number between 2 and 250. 155 | 156 | One thing to try is to open up a command prompt on the host computer (a terminal on OSX and Linux), and enter the following command: 157 | 158 | ``` 159 | ping 10.0.0.1 160 | ``` 161 | 162 | If you see `reply, reply, reply` then it's working. If you see request timed out, then something is wrong and you'll need to go back and double-check everything. 163 | 164 | You should now be able to open up a web browser on the host computer and enter `pi` into the address bar to get to the VNC client page. 165 | 166 | *Note: Windows users:* This may not work properly on Windows (you'll still need to use `10.0.0.1`), but if you install a package called `winbind` you'll be able to type the Raspberry Pi hostname into the browser. Usually the hostname is `raspberrypi`. The `winbind` package can be installed with the command below: 167 | 168 | `sudo apt-get install winbind` 169 | 170 | However, it should be fine on OSX, Ubuntu, and any other flavour of Linux. 171 | 172 | ![](images/vnc_firefox.png) 173 | 174 | You will be prompted for the password that you specified when setting up the VNC server. 175 | 176 | *Note: an error has occasionally been observed on the first time that you try to connect; this is possibly caused by the proxy starting before the VNC server socket is open. If you see this the top bar goes red. Just hit refresh (F5), enter the password again and it should work.* 177 | -------------------------------------------------------------------------------- /vnc-classroom-guide.md: -------------------------------------------------------------------------------- 1 | # Remote Desktop to a Raspberry Pi from a networked computer 2 | 3 | ## Step 1: Set up and install VNC server on Raspberry Pi 4 | 5 | Install the VNC server software on Pi and the VNC viewer software on the host computer (which will show the Pi desktop). 6 | 1. On your Raspberry Pi install the TightVNC package: 7 | 8 | ``` 9 | sudo apt-get install tightvncserver 10 | ``` 11 | 1. Next, run TightVNC Server which will prompt you to enter a password and an optional view-only password: 12 | 13 | ``` 14 | tightvncserver 15 | ``` 16 | 17 | 1. Start a VNC server from the terminal. This example starts a session on VNC display zero (```:0```) with full HD resolution: 18 | 19 | ``` 20 | vncserver :0 -geometry 1024x768 -depth 24 21 | ``` 22 | 23 | ## Step 2: Install a VNC client on a computer 24 | 25 | 1. Now, on your computer, install and run the VNC client: 26 | 27 | - On a Linux machine install the package `xtightvncviewer`: 28 | 29 | `sudo apt-get install xtightvncviewer` 30 | 31 | - Otherwise, TightVNC is downloadable from [tightvnc.com](http://www.tightvnc.com/download.php) 32 | 33 | 34 | 35 | ## Step 3: If necessary, configure the Pi to give out an IP address 36 | 37 | This is the method you'll want to use if your network administrator refuses to allow a Raspberry Pi to be connected to the main school network. This way each Raspberry Pi will be directly connecting to a host computer using a single Ethernet cable, thus making a completely isolated point-to-point network between the two. 38 | 39 | *Note: you don't need a crossover cable for this; a standard cable will work because the Pi Ethernet port auto-switches the transmit and receive pins.* 40 | 41 | Firstly we'll need to install some software on the Pi, so for this first part you'll need to connect it to a LAN for internet access. We’re going to make the Pi Ethernet port behave in a similar way to a home router. This means assigning a static IP address to it and installing a DHCP service (`dnsmasq`) that will respond to address requests from the host computer. 42 | 43 | 1. From the command line or an LXTerminal window type: 44 | 45 | ``` 46 | sudo apt-get update 47 | sudo apt-get install dnsmasq 48 | ``` 49 | 50 | 1. It’s a good idea to use an IP address range that is very different to your main network, so let’s use 10.0.0.X. To configure this we must edit the network interfaces file. Enter the following command: 51 | 52 | ``` 53 | sudo nano /etc/network/interfaces 54 | ``` 55 | 1. Find the line `iface eth0 inet dhcp` and add a hash symbol at the start of the line to disable it. Then add the other four lines shown below: 56 | 57 | ``` 58 | # iface eth0 inet dhcp 59 | auto eth0 60 | iface eth0 inet static 61 | address 10.0.0.1 62 | netmask 255.255.255.0 63 | ``` 64 | 65 | 1. Press **Ctrl** and **X** followed by **Y** then **Enter** to save and quit out of nano. The Raspberry Pi will now have a static address of `10.0.0.1`. 66 | 67 | ## Step 4: Configure **dnsmasq** to give out IP addresses 68 | 69 | To do this first make a backup of the default config file and then save my one in its place: 70 | 71 | 1. Type `cd /etc` on the command line to change directories then press **Enter**. 72 | 1. Next type `sudo mv dnsmasq.conf dnsmasq.default` and press **Enter**. 73 | 1. Then type `sudo nano dnsmasq.conf` and press **Enter**. You should now be editing a blank file. Type the following into it: 74 | 75 | ``` 76 | interface=eth0 77 | dhcp-range=10.0.0.2,10.0.0.250,255.255.255.0,12h 78 | dhcp-option=3,10.0.0.1 79 | ``` 80 | The first line tells `dnsmasq` to listen for DHCP requests on the Ethernet port of the Pi. The second line is specifying the range of IP addresses that can be given out. The third line provides the default gateway for the host computer (which won't actually be used here). 81 | 82 | 1. Disconnect the Pi from the LAN and reboot by typing `sudo reboot`. 83 | 84 | ## Step 5: Test the connection 85 | 86 | 1. After the Pi boots back up, give it a minute or so, and you can go ahead and plug in the single Ethernet cable directly from the Pi to the host computer. The host computer should then be given an IP address which will be `10.0.0.X`, where X is a random number between 2 and 250. 87 | 1. Test that there is a working connection by opening up a command prompt on the host computer (a Terminal on OSX and Linux), and enter the following command `ping 10.0.0.1`. 88 | 89 | If you see `reply, reply, reply `then it's working. If you see request timed out, then something is wrong and you'll need to go back and double-check everything. 90 | 91 | 1. You can now open up your VNC viewer on the host PC and connect it to the Pi. When prompted for the remote host enter `10.0.0.1:1` and click **connect**. It could also be `10.0.0.1:0` depending on how you set it up in step 1. 92 | 93 | You'll be prompted for the password that you chose during step 1; after that you'll see the Pi desktop and will be able to get going with Scratch or whatever program you need. Remember that 3D games like Minecraft are not going to work using this method, as those draw their image directly to the local screen memory and will be ignored by VNC. You'll just see an empty window. 94 | -------------------------------------------------------------------------------- /vncboot: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | #/etc/init.d/vncboot 3 | 4 | ## BEGIN INIT INFO 5 | # Provides: vncboot 6 | # Required-Start: $remote_fs $syslog 7 | # Required-Stop: $remote_fs $syslog 8 | # Default-Start: 2 3 4 5 9 | # Default-Stop: 0 1 6 10 | # Short-Description: Start VNC Server at boot time 11 | # Description: Start VNC Server at boot time. 12 | ### END INIT INFO 13 | 14 | export USER='pi' 15 | 16 | eval cd ~$USER 17 | 18 | # Check the state of the command: this'll either be start or stop 19 | case "$1" in 20 | start) 21 | # if it's start, then start vncserver using the details below 22 | echo "Starting VNC for $USER..." 23 | su $USER -c '/usr/bin/tightvncserver :1 -geometry 1280x800' 24 | echo "...done (VNC)" 25 | ;; 26 | stop) 27 | # if it's stop, then just kill the process 28 | echo "Stopping VNC for $USER " 29 | su $USER -c '/usr/bin/tightvncserver -kill :1' 30 | echo "...done (VNC)" 31 | ;; 32 | *) 33 | echo "Usage: /etc/init.d/vncserver {start|stop}" 34 | exit 1 35 | ;; 36 | esac 37 | exit 0 38 | -------------------------------------------------------------------------------- /vncproxy: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | #/etc/init.d/vncproxy 3 | 4 | ### BEGIN INIT INFO 5 | # Provides: vncproxy 6 | # Required-Start: $remote_fs $syslog 7 | # Required-Stop: $remote_fs $syslog 8 | # Default-Start: 2 3 4 5 9 | # Default-Stop: 0 1 6 10 | # Short-Description: Start VNC http Proxy at boot time 11 | # Description: Start VNC http Proxy at boot time. 12 | ### END INIT INFO 13 | 14 | USER=root 15 | HOME=/root 16 | 17 | export USER HOME 18 | 19 | case "$1" in 20 | start) 21 | echo "Starting VNC Proxy..." 22 | screen -S noVNC -dms noVNC /usr/local/share/noVNC/utils/launch.sh --vnc localhost:5901 --listen 80 23 | echo "...done (VNC Proxy)" 24 | ;; 25 | 26 | stop) 27 | echo "Stopping VNC Proxy..." 28 | screen -x noVNC -X stuff "^C" 29 | echo "...done (VNC Proxy)" 30 | ;; 31 | 32 | *) 33 | echo "Usage: /etc/init.d/vncproxy {start|stop}" 34 | exit 1 35 | ;; 36 | esac 37 | 38 | exit 0 39 | --------------------------------------------------------------------------------