UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login
    1. Home
    2. Bouleetbil
    3. Best
    B
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 6
    • Posts 26
    • Groups 0

    Posts

    Recent Best Controversial
    • Howto : chroot debian with X support instead libertine ubuntu

      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

      photo1698138985.jpeg

      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
        Capture d’écran du 2023-10-24 22-46-10.png

      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 😄

      posted in Support howto chroot libertine alter
      B
      Bouleetbil
    • RE: No MP3 into Music

      I've find the problem into mediascanner-2.0.service

      [06/10/2023 10:58] terminate called after throwing an instance of 'std::filesystem::__cxx11::filesystem_error'
      [06/10/2023 10:58]   what():  filesystem error: status: Permission denied [/home/phablet/Music/android]
      [06/10/2023 10:58] Extracting metadata from /home/phablet/Music/hendrix.mp3.
      [06/10/2023 10:58] Extracting metadata from /home/phablet/Music/thunderstruck.mp3.
      

      /home/phablet/Music/android is just a link for access quickly to waydroid. I've deleted this file and now I've my music.
      So if mediascanner crash with an exception, it don't send files

      posted in Support
      B
      Bouleetbil
    • RE: No MP3 into Music

      @Keneda said in No MP3 into Music:

      Why are you using Devel (!!!) channel ?
      You intend to alpha test things ?

      I know "the risk" to use devel version. It's not a problem if I "break" my phone and I will not complain about devel version breaking change. So I don't think it's a problem of devel version.

      @Keneda said in No MP3 into Music:

      Do mp3 work on stable ?

      I've switched to RC same problem.

      I will search.

      posted in Support
      B
      Bouleetbil
    • RE: No MP3 into Music

      @lduboeuf
      Hello, seems the ticket already exist https://gitlab.com/ubports/development/core/mediascanner2/-/issues/9 🙂

      posted in Support
      B
      Bouleetbil
    • RE: Howto : chroot debian with X support instead libertine ubuntu

      @jarop
      Hi,
      For me yes, but it's not really user friendly

      • I can login as root or regular user.
        libertine can not : https://forums.ubports.com/topic/8797/libertine-focal-don-t-find-group-id?_=1698153549115

      • I can add new repo
        https://gitlab.com/ubports/development/core/libertine/-/issues/124

      • I can add additional bind-mounts
        https://gitlab.com/ubports/development/core/libertine/-/issues/120

      • I can choose the GNU/Linux distribution as postmarket

      But you should start the applications in command line, the desktop files are not into the lomiri launcher.

      For chroot should more user friendly :
      Create a systemd service user for mount all necessary on startup
      Create a launcher or adapt lomiri-app-launch for start the application in this chroot
      Added .desktop from chroot to lomiri launcher

      posted in Support
      B
      Bouleetbil
    • RE: Howto : chroot debian with X support instead libertine ubuntu

      @kugiigi
      hello I will check that.

      @Rinkeby
      hello, yes I can install .deb.
      I will create a git repo with my ubports scripts when I will have some times. For show the .desktop in lormiri I will probably add a script for scan all .desktop in this chroot and export it into ~/.local/share/applications/

      posted in Support
      B
      Bouleetbil