Linux Laptops

We had a couple laptops recently donated to the Makerspace (thanks Ms. A) and I’ve installed Ubuntu’s Linux (20.04 LTS) to see if I could get them to be useful for my students. I particularly wanted to see how hard they’d be to set up for programming (especially given the issues I’ve had with python). They’re working quite well so far, and this is my record of what I’ve done to set them up.

Installing Ubuntu

Ubuntu makes it really easy to install their operating system; it’s the main reason it’s one of the more popular flavors of Linux. You can download the ISO and get instructions on how to create a USB installation stick on their page.

Getting System Information

inix is a nice tool to for finding information about your computer (which you sort-of need when you’re dealing with donated machines): what type of cpu, how much RAM, size of the hard drive and things like that. Install with:

sudo apt-get install inxi

and to get the full set of information, run:

inxi -F

Extremely useful, but I did not really need this to tell me that I needed to upgrade the hard drive. Swapping the hard disk drive (HDD) for a solid state drive (SSD) is one of the quickest and cheapest ways to upgrade an older system. I picked up a 120 Gb SSD for less than $20 and the computer is now an order of magnitude faster (though I’m down from 500 Gb).

Upgrading

The final step after installing the operating system is to update the software. Ubuntu runs an automatic update on your first boot. However, since I’ll be doing most of my installations from the command line, I run the update commands (just in case):

sudo apt update
sudo apt upgrade

Setting up Python

Python 3.8.5 was installed by default, but I need the python package installer (pip) to install the modules I’ll need:

sudo apt install python3-pip

Now I can install numpy (-U option to upgrade) for numerical stuff:

pip3 install -U numpy

as well as, matplotlib:

pip3 install -U matplotlib

and vpython

pip3 install vpython

and for virtual environments (venv):

pip3 install virtualenv

and the IDLE editor for python

sudo apt-get install idle3

also the Thonny editor that makes using Raspberry Pi Picos much easier (especially for the pico LED strips)

sudo apt install thonny

Now we should be good to go.

git, github, and vs code

git: I’ve been using github.com for keeping my programming projects and GitHub Classroom for my programming class. The GitHub Desktop program is great for Windows and OSX, but does not exist for linux at the moment. So I needed to install git:

sudo apt install git-all

VS Code is a pretty popular IDE for coding that I’ve been using for my computer programming class. It’s a Microsoft product that is designed to work closely with github repositories. You can download the .deb from

It’s usually saved in the ~/Downloads folder, so to install this should work:

sudo apt install ./Downloads/code*.deb

I usually test the VS Code installation with my ledPixelsPico repository because I want to make sure I can operate my Raspberry Pi Pico LED strips.

To get VS Code to be able to make commits and sync with the repository (you’ll have to test this with a repository of your own–or that you have permission to sync with) you’ll need to run the ‘git config –global user.email “you@example.com”‘ and ‘git config –global user.name “Your Name”‘ commands in the VS Code Terminal.

LaTeX

For typesetting beautiful documents (mainly for the equations) I use LaTeX.

Since I don’t want to worry about downloading LaTeX packages when I need something esoteric I install the full Tex Live distribution (Note: for texlive on Fedora use ‘texlive-scheme-full‘).

sudo apt-get install texlive-full

Editor: To use LaTeX we need an editor. I prefer TeXstudio:

sudo apt-get install texstudio
  • Folder with all files needed to test the typical things I do with LaTeX in a chapter format: LaTeX Demo Report.

NOTE: if you’re low on memory, you can install something like Miktex instead of Tex Live because it installs packages only when you need them. Also, some of my students who use Apple computers seem to find TexShop easier to set up than TexStudio.

Installing Additional Software

The basic Ubuntu installation comes with a lot of the free software I use, but, using the command line:

sudo apt install ...

or the Ubuntu (or other package manager) Software tool, I added:

  • [Atom] [depreciated]: text editor for coding (being depreciated unfortunately, I’ve been forced to use VS Code instead: see above, or Thonny: see below and above).
  • Thonny: Coding editor for working with Raspberry Pi Picos in particular (may already be installed from the python section above).
  • GIMP: for image editing
  • Inkscape: for vector graphics
  • OpenScad: for 3d Modeling (for printing)
  • Shotcut: for video editing (it’s multi-platform). I’m trying this one for extracting time information from experiments (like ball drops). Can install with ‘sudo apt-get install shotcut’

UxPlay [Optional]: A crucial piece of software for online teaching that I had to install via the command line was, UxPlay, and you can see my variant of the installation instructions here. This program allows me to mirror my iPad to the computer.

The Rest

The rest is mostly tweaking the settings to your specifications (there’s even a program called Tweak you can install for extra settings).

Tweaks

I use this to enable hot-corners and customize the desktop interface.

sudo apt install gnome-tweak-tool
sudo apt install gnome-shell-extensions
Fonts

Added the student fonts following LinuxConfig’s instructions, specifically the section on “Manual system-wide font installation”, which just meant copying the folder with all the fonts to the “/usr/local/share/fonts/” directory.

php

I use php a lot so I’ve set it up so I can run php off the command line (I haven’t figured out how to use url parameters this way though).

sudo apt install php libapache2-mod-php
sudo apt install php-cli
gdebi

gdebi is a little application for installing .deb software. I’ve had enough hiccups with the Ubuntu Software tool, to find it useful to right click a downloaded .deb file and install it using gdebi. To install:

sudo apt install gdebi
Imager

The first thing I used gdebi to install was Imager, which is used to write the Raspberry Pi operating system to USB’s or SD cards. Download the imager .deb, right click and install using gdebi.

nmap

nmap maps your local network, which is useful if you have a bunch of Raspberry Pi’s around and need to figure out their IP addresses.

sudo apt-get install nmap

To use nmap to find all the raspberry pi’s on the local network use something like this, where you change the IP address (192.168.4.0) to whichever IP your computer is on, but switch the last number for 0:

sudo nmap -sP 192.168.4.0/24 | grep -in -B 2 'pi'

The Technology I Use for Teaching in Person and Online at the Same Time

This year we’ve been doing a hybrid system with most students at school and a few, who’re more sensitive to the COVID risk, at home. Setting up the technology to accomplish this has been quite tricky, but we’ve settled on a system the works reasonably well.

Hardware

The standard system involves:

  1. iPad: for notes that will normally be written on the board,
  2. Computer: the iPad screen is mirrored on the computer and then,
  3. Projector: to project what’s on the computer/iPad the kids in the classroom.

In practice it looks like this.

The iPad is mirrored to the computer which connects to the project and shares the screen with the kids at home.

If it looks a bit messy, that’s because it is.

Software

Video Conferencing

We’re using Google Meet for our video conferencing software, pretty much because we’re using Google Classroom for our classes and it’s built in. However, all you need is something that can share the computer screen with the kids at home, so Zoom, which we used in the spring, would probably work as well. One advantage of Meet is that it’s easy to set up a meeting for the class and the link is posted at the top of the page every time you log into Google Classroom.

Jamboard as a Whiteboard app.

After trying a few programs we’re using Google’s Jamboard as a whiteboard program for the iPad. Jamboards are shared documents, just like another Google Doc or Sheet, so in theory, if I shared the specific Jamboard document with them (which I do) the students at home could just follow along in the same document in real-time. In practice Jamboard can be extremely laggy, so I’ve given up on that approach and now I just share my entire computer screen over the video conferencing program.

One nice thing about Jamboard is that they are files, so the whiteboard notes can be saved and cataloged with other materials for a particular lesson or assignment. It’s also probably a good thing that you’re restricted to 20 slides otherwise I’d end up with some really large documents.

The ability to save them as files with all the other google documents, and the fact that it’s free, are the main reasons I prefer Jamboard to the other whiteboard options I’ve tried.

Mirroring the iPad (X-Mirage and UxPlay)

Mirroring the iPad to the computer turned out to be quite tricky. Since we’ve been working primarily with Windows PC’s, I ended up going with X-Mirage. I’ve set it up so X-Mirage automatically launches when you start up the computer, but it’s another piece of software to pay attention to. This program has a mac version as well. On the downside it costs about $14 for each computer it’s on.

I recently got my hands on a couple old (donated) laptops, and installed Linux (Ubuntu) on them for the operating system. In the few days I’ve been testing them they seem to work very well. For these I’ve used UxPlay as mirroring software, which has slotted into the system very, very well. Because it’s a command line program, setting up can be a little tricky.

In Summary

In summary, I have a system, and it works well enough that all of the other teachers have adopted it for their classes as well. This works for us because we can mostly use the hardware we have (we did have to buy iPads for the teachers who did not have them), and the software is fairly cheap. The kids at home appreciate it because it allows them to see and hear what’s going on in the classroom, especially what’s written on the board, pretty clearly. I’ve not heard many complaints from the kids at school.

As for the future, I am somewhat excited that I can effectively use the Linux computer now, and I’m always looking for ways to streamline.