Hello, howto debian chroot
- Create chroot
mkdir -p /home/phablet/Documents/debian
sudo debootstrap \
--include=btop,chromium,firefox-esr,maliit-inputcontext-gtk2,maliit-inputcontext-gtk3 \
--arch arm64 \
bookworm \
/home/phablet/Documents/debian \
http://deb.debian.org/debian
chroot created into /home/phablet/Documents/debian
- Create user phabet
sudo chroot /home/phablet/Documents/debian
useradd -m phablet --uid 32011
- Configure chroot for dbus, wayland, sound ... for user phablet
Added to /home/phablet/.bashrc into chroot
export XDG_RUNTIME_DIR=/run/user/32011
export WAYLAND_DISPLAY=wayland-0
export DISPLAY=:0
export XSOCKET=/tmp/.X11-unix/X0
export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/32011/bus
export USER=phablet
#keyboard
export QT_IM_MODULE=Maliit
export GTK_IM_MODULE=Maliit
- Start chroot as phablet user
MCHRDIR=/home/phablet/Documents/debian
cp /etc/hosts ${MCHRDIR}/etc/hosts
cp /etc/resolv.conf ${MCHRDIR}/etc/resolv.conf
mount -o bind /dev ${MCHRDIR}/dev
mount --bind /dev/pts ${MCHRDIR}/dev/pts
mount --bind /proc ${MCHRDIR}/proc
mount --bind /tmp ${MCHRDIR}/tmp
mount --bind /sys ${MCHRDIR}/sys
mount --bind /run ${MCHRDIR}/run
#dbus
mount -o bind /var/run/dbus/ ${MCHRDIR}/var/run/dbus
#shm (chromium)
mount --bind /dev/shm/ ${MCHRDIR}/dev/shm
#wayland
mkdir -p ${MCHRDIR}/run/user/32011
mount --bind /run/user/32011 ${MCHRDIR}/run/user/32011
chroot --userspec=phablet:phablet ${MCHRDIR} \
/usr/bin/env -i \
HOME=/home/phablet/ \
TERM="$TERM" \
PS1='(lfs chroot) \u:\w\$ ' \
PATH=/usr/bin:/usr/sbin \
/bin/bash --login
sleep 5
umount ${MCHRDIR}/dev/shm
umount ${MCHRDIR}/var/run/dbus/
umount ${MCHRDIR}/run/user/32011
umount ${MCHRDIR}/run
umount ${MCHRDIR}/sys
umount ${MCHRDIR}/proc
umount ${MCHRDIR}/dev/pts
umount ${MCHRDIR}/dev
umount ${MCHRDIR}/tmp
I've tested chromium firefox all seems works here on my pixel3a focal RC
TIP
- You can change PS1 in your chroot ~/.bashrc for identify quickly if you are into the chroot :
PS1='chroot \u@\h:\w\$ '
After login in your chroot
chroot phablet@ubuntu-phablet:/home/phablet$
- Change DPI
cat ~/Documents/debian/home/phablet/.Xdefaults
xterm*faceName: DejaVu Sans Mono
xterm*faceSize: 10
Xft.dpi:200
You can adapt Xft.dpi with your display
- VNC xfce4 works
I can use my pixel3a with lomiri as mobile, And for a little desktop VNC if I don't have my dongle. I love this device