Laptop setup
Prepare both laptops while the internet is available, serve the site from the MacBook over the local hotspot to the Lenovo and your phone, keep a fallback copy on the Lenovo, and do a 5 minute check before class.
Before you start
Do all of this while internet is available. Once class starts, you will need no data at all.
Links change. Confirm each download page before you rely on it. Open the page, check the name of the program and that it is the official site, and only then download. If a page has moved, search for the program name and choose the official site.
Menu names in Windows and macOS change a little with updates. If a step below does not match your screen exactly, look for the nearest word, and correct this page.
1. Prepare the MacBook (the server)
The MacBook builds the site and serves it to the Lenovo and to your phone. Do these steps in your own account, not the Learner account.
- Install nvm, the Node version manager. Follow the install steps on its official page (github.com/nvm-sh/nvm). Close the terminal and open a new one afterwards.
- Open a terminal in the Wan-Bene project folder. The folder has a file called
.nvmrcthat says22. - Run
nvm install. It reads.nvmrcand installs Node 22. Then runnvm use. (Runnvm useagain in each new terminal, or runnvm alias default 22once.) - Turn on pnpm: run
corepack enable pnpm. Corepack comes with Node 22. If that fails, runnpm install -g pnpm. - Check both:
node -vshould start withv22, andpnpm -vshould print a version number. - Run
pnpm install. It needs internet. Do it once, and again only after the project’s packages change. - Run
pnpm build. It makes thedistfolder. It must end with “Complete!”. Fix any errors before class. - Run
pnpm preview. The project’s preview script already adds--host, so it serves on the network. It prints two addresses. Local is for the MacBook itself,http://localhost:4321/. Network is for the other devices, for examplehttp://192.168.43.17:4321/. - Write the Network address on a card. It can change when the hotspot changes, so check it each morning.
- With the Astro version in this project,
pnpm previewstarts the site in the background and gives you the prompt back. The site keeps running even if you close the terminal. Check it withpnpm astro preview status. Stop it withpnpm astro preview stop. (If your terminal instead stays busy showing the server, leave that terminal open: closing it would stop the site.)
2. Keep the site running while learners use the MacBook
Learners use the MacBook’s Learner account, but the site runs in your account. Switch accounts without logging out.
- Turn on fast user switching: System Settings, Control Centre, Fast User Switching, Show in Menu Bar.
- Start
pnpm previewin your account, as above. - Click the user icon in the menu bar and choose Learner. Your account, and the site, keep running in the background.
- Never log out of your account during class. Logging out, restarting, shutting down, or closing the lid stops the site for everyone, including your phone.
Test this once at home: switch to Learner, and open the site on your phone.
3. Open the site on the Lenovo and on your phone, with no data
The Network address works over a local connection. No internet is needed.
- Turn on the hotspot on a phone (or use a small router if you have one). Connect the MacBook and the Lenovo to it. A phone hotspot uses no data when the devices only talk to each other.
- On the Lenovo, and on your own phone, open a browser.
- Type the Network address exactly, with
http://and the port, likehttp://192.168.43.17:4321/. - The Wan Bene site should open. Open the teacher script for the day on your phone. You read it from your phone in every teacher block.
If it does not open:
- Check that all devices are on the same hotspot.
- Check that the site is still running (
pnpm astro preview statusin your account on the MacBook), and that the MacBook is awake. - Check the address. The numbers change when you join a new network.
- On the MacBook, check that the firewall is not blocking incoming connections (System Settings, Network, Firewall). Allow node if it asks.
- If your phone is the hotspot and cannot open the site, test with a second phone as the hotspot. Some phones do not open pages from devices on their own hotspot. Find this out at home, not in class.
4. Fallback: a copy of dist on the Lenovo
If the MacBook fails, the Lenovo can run its own copy.
- After
pnpm build, copy the wholedistfolder to the Lenovo on a flash disk. - Put it in a folder like
C:\wanbene\dist. - Do not open
index.htmlby double click. It will not work properly. The pages use paths that start at the top of the site, such as/lessons/, so a browser reading a plain file cannot find them. You need a small local server. - Start a local server with one of these:
- With Thonny (it brings its own Python). Open Thonny, then Tools, then Open system shell. In the black window, type
cd C:\wanbene\distand press Enter. Then typepython -m http.server 8000and press Enter. Openhttp://localhost:8000/in the browser. - With Node on the Lenovo. While online, run
npm install -g serveonce. In class, runserve C:\wanbene\dist. It prints an address likehttp://localhost:3000/.
- With Thonny (it brings its own Python). Open Thonny, then Tools, then Open system shell. In the black window, type
- Open the address in a browser and check that a lesson loads.
Do this test once at home, with the internet off, before the first class. Copy a fresh dist each time you rebuild the site.
5. Programs to install on both laptops
Install these while online. Confirm each page first.
| Program | What for | Where to get it |
|---|---|---|
| Scratch 3 | Block programming (Explorers, Builders), from week 2 | Windows: the Microsoft Store. Mac: the download on scratch.mit.edu/download |
| Thonny | Python (Builders, Pioneers), and the fallback server above | thonny.org |
| GCompris | Learning games for mouse and keys | gcompris.net |
| A typing tutor | Typing practice | Klavaro or TIPP10. Find them on their own sites |
| VS Code | Writing web pages and code, later weeks | code.visualstudio.com |
| LibreOffice | Documents and spreadsheets, if Microsoft Office is not installed | libreoffice.org |
After installing, open each program once on each laptop. Some ask for a first time setup. Do that now, not in front of learners.
For Scratch, check you can open the editor and save a project to the computer with no internet. Save a test file called test and reopen it.
6. A Learner account on each laptop
Learners should not use your account or an administrator account.
- Windows (Lenovo): Settings, Accounts, Other users, Add account. Choose “I don’t have this person’s sign-in information”, then “Add a user without a Microsoft account”. Name it Learner, with no password. New accounts are Standard users, not Administrators. Keep it that way.
- Mac: System Settings, Users and Groups, Add User (or Add Account). Choose Standard. Name it Learner.
- Log in to the Learner account on each laptop and do the rest of this list there, because these settings belong to each account.
- Open every program once.
- Turn on file name endings. Windows: File Explorer, View, Show, File name extensions. Mac: Finder, Settings, Advanced, Show all filename extensions.
- Windows: open Start. If Calculator is not in the Pinned list, find it in All (or All apps), right-click it and choose Pin to Start.
- Mac: put Calculator in the Dock: Finder, Applications, then drag Calculator into the Dock.
- Put the site address in the browser’s bookmarks, or set it as the home page, if the address stays the same.
- Keep your own admin password private.
7. Power settings
The screen must not sleep during class, and the MacBook must never sleep.
- Windows (Lenovo): Settings, System, Power and battery, then the screen and sleep timeouts. Set the screen and sleep to Never, or to 30 minutes, when plugged in.
- Mac: System Settings, Lock Screen: set “Turn display off on power adapter when inactive” to Never. Then System Settings, Battery, Options: turn on “Prevent automatic sleeping on power adapter when the display is off”. Keep the MacBook plugged in during class.
- Turn off the screensaver on both.
- Turn off automatic updates during class hours. Update on a Sunday, when no class is on.
- The MacBook serves the site. Never shut it down, restart it, log out, or close its lid in class. Learners practise switching on and shutting down on the Lenovo.
8. Charging routine
- Charge both laptops fully every evening. Keep each charger in the laptop bag.
- Keep both chargers in the room. Put the extension cable on the floor where nobody walks, and tape it down.
- If the power is off at home, charge at a place with power before class, and bring power banks if you have them.
- At the end of class, plug in both laptops before you leave.
- Write on the board who plugs in the laptops each day. A learner can have this job. It is a real role.
9. The 5 minute check before class
Do this at least 15 minutes before learners arrive.
- Both laptops are charged, or plugged in.
- In your account on the MacBook,
pnpm astro preview statussays the preview server is running. The Network address is on the card. Then switch the MacBook to the Learner account. - Your phone opens the site at the Network address. Open today’s teacher scripts.
- The Lenovo opens the site at that address, in the Learner account. Then shut the Lenovo down: the Explorers switch it on.
- The big screen is connected to the MacBook and shows today’s opening circle.
- Sound works, or is off on purpose.
- Today’s worksheets are printed, and a pack of paper and pencils is on each table. A printed copy of today’s teacher scripts is in your bag, in case your phone is flat.
- The phone timer is charged and the swap times are on the board.
- The fallback works: the
distcopy on the Lenovo opens, and a paper plan for each block is ready.
If something fails, switch to the paper plan in “How the day runs” and fix it after class.