There is a little “feature” in the interactions of Linux, Thonny and the CircuitPython volume via SSH.
The solution for Linux users is below.
a) This can be tested in several ways, this is just one:
1. Install latest version of Thonny on Debian testing (I am using Xebian)
2. Install CircuitPython 7.3.3 on a Pico, etc.
3. SSH into the machine as a normal user.
4. Bring up Thonny and ensure that it can find the Pico etc.
6. Load a program up from the CIRCUITPY volume and execute.
7. It will, typically, flag up an error (see the screenshots)
[Thonny tries to save the file back before running and hits a minor error.]
b) Issue: The SSH user doesn’t have the capacity to mount/manipulate the volume which causes Thonny problems.
c) The solution is fairly simple: in another (non-SSH Window) mount the CIRCUITPY volume in a file manager, after the first error.
d) Verify: re-do test, it passes.
e) The manual way (locally, from the SSH user) doesn't work either:
sudo -i
mkdir /media/CIRCUITPY
mount /dev/sdb1 /media/CIRCUITPY
then invoke Thonny, fails too.
f) Putting the CIRCUITPY volume in fstab, via its UUID, etc doesn’t appear to work, but that might be a more meaningful way.
[Note: Was looking at adding the user to the plugdev group in Debian (logging out, and in again, then testing), but that doesn't fully work, odd as Linux sees it as vfat, nosuid,nodev, etc but the overall ownership is still root.]
There is a little “feature” in the interactions of Linux, Thonny and the CircuitPython volume via SSH.
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- BrianLinuxing
- Posts: 7
- Joined: Sun Sep 04, 2022 4:30 pm
There is a little “feature” in the interactions of Linux, Thonny and the CircuitPython volume via SSH.
- Attachments
-
- Loading from the CIRCUITPY volume
- Thonny_Linux_v3.png (145.72 KiB) Viewed 36 times
-
- Error as trying to run(save) the code
- Thonny_Linux_v4.png (180.83 KiB) Viewed 36 times
- danhalbert
- Posts: 4687
- Joined: Tue Aug 08, 2017 12:37 pm
Re: There is a little “feature” in the interactions of Linux, Thonny and the CircuitPython volume via SSH.
Thanks for pointing this out.
Type the `groups` command to see if you're really in the group. I've found that logging out the desktop and re-logging in does not necessarily add you to the new group. I have ended up rebooting in such cases.[Note: Was looking at adding the user to the plugdev group in Debian (logging out, and in again, then testing), but that doesn't fully work, odd as Linux sees it as vfat, nosuid,nodev, etc but the overall ownership is still root.]
- BrianLinuxing
- Posts: 7
- Joined: Sun Sep 04, 2022 4:30 pm
Re: There is a little “feature” in the interactions of Linux, Thonny and the CircuitPython volume via SSH.
Thanks for the swift reply Dan :)
Done that.
Same result.
That's what I **had** first thought would have solved it, but I previously retested 3 times (reboots, the lot). No joy.
[On a more humorous front: I did find that making it ext4 didn't work either (the device is ok but thonny won't have it)! And gparted won't format FAT16 to anything less than 16Mb, which is interesting, and odd in light of 1.44 Mb floppies, etc].
Am re-flashing again with 7.3.3, and will work a way around it, wish me luck.
Done that.
Same result.
That's what I **had** first thought would have solved it, but I previously retested 3 times (reboots, the lot). No joy.
[On a more humorous front: I did find that making it ext4 didn't work either (the device is ok but thonny won't have it)! And gparted won't format FAT16 to anything less than 16Mb, which is interesting, and odd in light of 1.44 Mb floppies, etc].
Am re-flashing again with 7.3.3, and will work a way around it, wish me luck.
Please be positive and constructive with your questions and comments.