Thonny Admin
We want to give our students a great experience using Thonny. Here are a few things to not about the screen image above.
- There is a Thonny icon directly on the desktop
- Thonny is configured to view both the files on the Raspberry Pi Pico (each lab has a file)
- Thonny can see the port
/dev/ttyACM0
and can connect directly to the Pico
Getting to this stage is not difficult, but it does require going through several steps. Here is a quick summary of these steps:
- Install Linux (Crostini)
- Open the terminal and install pip
- Use pip to install Thonny
- Run Thonny from the command line or setup a desktop icon
Who Can Enable Linux (Crostini) on a Chromebook
✅ Allowed:
- The Chromebook’s Owner account (the first Google account used to set up the device)
- User accounts with Linux enabled by the owner or admin
- Managed devices (school/work) only if the admin has allowed Linux
❌ Not Allowed:
- Guest mode or Incognito users
- Child accounts (Family Link) by default
- Managed Chromebooks (e.g., issued by schools) where Linux is disabled via Google Admin Console
Secondary accounts on the Chromebook, unless Linux is enabled per user
Steps
Step 1: Install Linux
The only reliable way to run Thonny on a Chromebook to program a Raspberry Pi Pico is by using the Linux (Crostini) environment within ChromeOS.
Step 2: Install Pip and Tkinter (TK)
1 2 |
|
Note
tkinter
, which is installed viapython-tk
cannot be installed via pip. It
must be installed with apt. The key point is that python3-tk must be installed using your system's package manager, not pip.
Step 3: Install a Virtual Env and Put Thonny in it
1 2 3 |
|
Step 4: Run Thonny from the Terminal
1 |
|
Note: You can also create an alias to make this command earlier.
Faster Setup Process
Step 1: Enable Linux Development Environment
Go to the Setting up ChromeOS in Developer Mode
Note: Using apt install thonny
can gives older versions, use the official installer:
1 2 3 4 5 |
|
This method installs the current version (3.3.10+) rather than the outdated Debian package version, avoiding compatibility issues.
Step 3: Configure USB Access
- Go to Settings → About ChromeOS → Developers → Linux development environment
- Click Manage USB devices
- Connect your USB device (Arduino, Raspberry Pi Pico, etc.)
- Enable the device in the list
- Add user to dialout group:
sudo usermod -a -G dialout $USER
- Restart the Linux container (Settings → Developers → Linux → Advanced → Restart)
Step 4: Create Desktop Launcher
Make Thonny easily accessible:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
|
Batch Script Approach
Create a setup script to automate the software installation:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
|
Run with: bash setup_thonny.sh
Step-by-Step: Create a Thonny Launcher on ChromeOS
1. Create a .desktop
file
Run this command in your Linux terminal:
1 |
|
2. Paste the following contents (adjusting username if needed):
1 2 3 4 5 6 7 8 9 10 11 |
|
Replace
/home/urocdeveloper01/
with the correct path if your username is different. You can check your username withwhoami
.
💾 3. Save and exit the editor:
- Press
Ctrl+O
to save - Press
Enter
to confirm the file name - Press
Ctrl+X
to exit Nano
4. (Optional) Add a custom icon
If you want a real Thonny icon:
1 2 |
|
Then change the Icon=
line in the .desktop
file:
1 |
|
5. Refresh the launcher
Now restart your Linux container or run:
1 |
|
Then:
- Open your ChromeOS launcher
- Scroll down to “Linux apps”
- You should now see Thonny with a Python icon!
You can right-click it and pin it to the shelf for even faster access.