Skip to content

Instantly share code, notes, and snippets.

@marcsello
Created March 14, 2025 20:25
Show Gist options
  • Save marcsello/855aa93213e21b6145f21661dbbc95d6 to your computer and use it in GitHub Desktop.
Save marcsello/855aa93213e21b6145f21661dbbc95d6 to your computer and use it in GitHub Desktop.
Running picoscope software on Debian

Running picoscope software on debian

The only problem with running picoscope on debian, are some missing/incompatible packages/libraries.

A kindof easy way to overcome this is using chroot. This rough guide shows the steps to how to do that.

Well, this should work on most distros, which has deboostrap, I just happen to ran this on Debian. But this should only work on X11! (Maybe it works on wayland, dunno, not tried)

Howto

  1. Get debootstrap if you don't have it already: apt install debootstrap

  2. Create a ubuntu chroot with it (we'll name it ubuntu): sudo debootstrap noble ./ubuntu http://hu.archive.ubuntu.com/ubuntu

  3. After that's done use this script to easily enter and exit the chroot environment:

#!/bin/bash

[[ "${EUID}" -ne 0 ]] && exit 1

MOUNTPOINT="$(pwd)/ubuntu"

cp --dereference /etc/resolv.conf "${MOUNTPOINT}/etc/"
cp --dereference /etc/hosts "${MOUNTPOINT}/etc/"

echo "${HOST}" > "${MOUNTPOINT}/etc/hostname"

mount -v --types proc /proc "${MOUNTPOINT}/proc"
mount -v --rbind /sys "${MOUNTPOINT}/sys"
mount -v --make-rslave "${MOUNTPOINT}/sys"
mount -v --rbind /dev "${MOUNTPOINT}/dev"
mount -v --make-rslave "${MOUNTPOINT}/dev"

mkdir -p "${MOUNTPOINT}/run/udev"
mount -v -o bind /run/udev "${MOUNTPOINT}/run/udev"

chroot "${MOUNTPOINT}" '/bin/bash'

umount -lv "${MOUNTPOINT}/run/udev"
umount -lv "${MOUNTPOINT}/proc"
umount -lv "${MOUNTPOINT}/sys"
umount -lv "${MOUNTPOINT}/dev"
umount -lv "${MOUNTPOINT}/boot"
umount -lv "${MOUNTPOINT}"
  1. Enter the chroot env using the script above, run it as root! (you must run the script from a folder next to the chroot)

  2. in the chroot env, install some utils we'll need: apt update; apt install nano gnupg wget curl sudo

  3. Enable all apt sources, by removing /etc/apt/sources.list (if exists). Then put this in a new file /etc/sources.list.d/ubuntu.sources:

Types: deb
URIs: http://hu.archive.ubuntu.com/ubuntu/
Suites: noble noble-updates noble-backports
Components: main restricted universe multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg

Types: deb
URIs: http://security.ubuntu.com/ubuntu/
Suites: noble-security
Components: main restricted universe multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
  1. Run apt update; apt upgrade

  2. Create a standard user for yourself: adduser marcsello

  3. Add yourself to some supplimentary groups just in case: for g in 20 24 25 27 29 30 44 46 100; do usermod -a -G $g marcsello; done

  4. Change user to your newly created one: su - marcsello

  5. Follow https://www.picotech.com/downloads/linux to install the picoscope software (a lot of dependencies will be installed)

  6. Run picoscope (the display envvar must be passed) DISPLAY=:0 picoscope

  7. Profit!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment