# \[How-to series 3/N\] run X11 graphic Apps. on any Nas (arm or Intel)

**URL:** <https://talk.asustor.com/t/how-to-series-3-n-run-x11-graphic-apps-on-any-nas-arm-or-intel/45235>\
**Category:** Archived Articles\
**Created:** [May 17, 2026, 2:26pm UTC](https://talk.asustor.com/t/how-to-series-3-n-run-x11-graphic-apps-on-any-nas-arm-or-intel/45235 "2026-05-17T14:26:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![father.mande](https://talk.asustor.com/user_avatar/talk.asustor.com/father.mande/32/7873_2.png) [@father.mande](https://talk.asustor.com/u/father.mande)\
**Post date:** [May 17, 2026, 2:26pm UTC](https://talk.asustor.com/t/how-to-series-3-n-run-x11-graphic-apps-on-any-nas-arm-or-intel/45235/1 "2026-05-17T14:26:26Z")

</div>

Hi,

**Topic 3** : basic complete configuration of chroot

**Select target where you install chroot :**  
**==== ATTENTION** all command or script MUST be executed as **root** (or admin prefixed by sudo)

**Target 1 :**  
… use **bash** in chroot to start an X11 interface (even less … just a software)  
… this require minimum install, BUT you must manage ALL services needed by yourself and start environment.  
… EACH time you add a software, you must complete the services required.  
… Namespace is the best envelope … **NO network require**.. managed and configured by ADM (don’t start network manager to avoid problems) … Ex. interface name can be changed … so ALL works but ADM WebUI can’t be used any more … etc. etc.

**Target 2 :**  
… use **systemd** … so Ubuntu is started using /sbin/init AS ANY standard environment.  
… require a namespace for security (PID, IPC, Mount)  
… VERY documented … all services (in good order) are automatically started, systemd log is provide to debug any problem.  
… AS for previous … **don’t manage network from inside the namespace**  
… **swap device** can be removed if a shutdown in namespace is done (shell to recreate it will be provide later)  
… for low memory (less 2GB … better is 4 to nnn GB), please increase swap by adding swap file (a shell will be provide for BTRFS support (special method)

=== ATTENTION for running complete system in namespace … systemd require that chroot folder MUST BE a mountpoint

**Solution :**  
use a specific share in ADM (reserved to admin) … but untar require a specific parameter  
use ANY folder in any share (include folder in tar) … but you must mount it on itself to create a mountpoint.  
**[EDIT]** add owner to root:root of target directory (just in code hereafter) NO recursively just base folder.

```plaintext
 # example using a share folder created in ADM
chown root:root /share/CHROOT_BASE_FOLDER
cd /share/CHROOT_BASE_FOLDER
tar -xz --strip-components=1 -f /share/development/xxxx/2404_LTS_arm64.tgz
 ### --strip-components=1 permit to put all Ubuntu root directly in share as root (bypass folder name in tar

```

## **NEXT STEP :** install all part to complete chroot. **SPECIAL** in case of foreign architecture (chroot create in x86\_64 for arm64 for ex.)

```plaintext
### exec debootstrap second-stage for FOREIGN arch.
chroot /share/CHROOT_BASE_FOLDER /debootstrap/debootstrap --second-stage

```

* * *

```plaintext
## COPY require network file
## network (please redo it if any change in ADM network
cp /etc/hosts /etc/resolv.conf /share/CHROOT_BASE_FOLDER/etc/

```

Create the APT (package manager for Ubuntu) file sources in new format (or old sources.list if you prefer) … using new format require to rename or remove /etc/apt/sources.list to avoid conflicts.  
example for ARM64 … file to create /etc/apt/sourves.list.d/ubuntu.sources

```plaintext
# cat ubuntu.sources
Types: deb deb-src
URIs: http://ports.ubuntu.com/ubuntu-ports/
Suites: noble noble-updates noble-backports noble-proposed
Components: main restricted universe multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg

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

```

… deb is enough if you don’t compile or create new software … so just remove dec-src un Types: line

example for x86\_64

```plaintext
# cat ubuntu.sources
Types: deb deb-src
URIs: http://fr.archive.ubuntu.com/ubuntu/
Suites: noble noble-updates noble-backports noble-proposed
Components: main restricted universe multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg

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

```

… same for deb-src and select a country near you (even fr works for all)

Last create a shell script to mount mandatory file system in namespace / chroot  
cd /share/CHROOT\_BASE\_FOLDER  
create an empty file to check if you run in chroot  
touch u2404  
create executable file (or copy hereafter) file as root folder (/ in chroot /share/CHROOT\_BASE\_FOLDER in ADM) like this

```plaintext
# cat start_up.sh
#!/bin/sh

test_in(){
    if [-e /u2404] ; then
      echo "you are in the chroot ... continue"
    else
      echo "please enter in the chroot before start stop"
      exit 1
    fi
}

case "$1" in
mount)
        test_in
        mount -t devtmpfs udev /dev
        if [! -e /dev/pts] ; then
                mkdir /dev/pts
        fi
        mount -t devpts devpts /dev/pts
# udevadm trigger
        mount -t proc proc /proc
        mount -t sysfs sys /sys
# mount -t tmpfs none /run/shm
;;
umount)
        test_in
# umount /run/shm
        umount /sys
        umount /dev/pts
        umount /dev
        umount /proc
;;
*)
        echo "Usage : $0 mount|umount"
;;
esac

```

don’t forgot to do :  
chmod +x start\_up.sh (executable)

**LAST initial step :**  
**[EDIT]** create empty link to avoid conflict with entware or others.  
… it’s time to test the chroot and update Ubuntu to last upgrade.  
Now we have just to start chroot and use Ubuntu package manager, also just configure TimeZone and have correct langage set;

1. enter in chroot  
… as root or admin + sudo in ADM  
chroot /share/CHROOT\_BASE\_FOLDER /bin/bash  
… ignore LANG warning for now  
… you are in chroot so PATH is NOT the ADM one directly /  
… mount necessary folder IN CHROOT to run  
/start\_up.sh mount  
… verify :  
mount  
… generate LANG for avoid warning  
locale-gen “en\_US.UTF-8”  
… set time\_zone … select continent then town near you  
dpkg-reconfigure tzdata  
… for me in France I select Europe then Paris  
… create LINK for conflict due to the environment  
ln -sf /tmp /opt/tmp  
mkdir -p /opt/share  
ln -sf /usr/share/terminfo /opt/share/terminfo  
… upgrade Ubuntu  
… get source for software  
apt-get update  
… if you see a list of repository and NO error at end … IT’S OK  
… upgrade  
apt-get -y dist-upgrade  
… at end you are up to date … and ready for next step INSTALL SOFTWARE NEED by X11 Applications

**Continued in the next topic**

… eventually quit chroot after unmounting system folder and save it (tar)  
/start\_up.sh umount  
exit

HOW do a save of Ubuntu chroot with winning space …  
… when you use apt, a list of package and some package are loaded locally … this used large space (increase with added software)  
… it’s possible to solve this by cleaning APT cache and list (ignore warning due to sub\_folder)  
… here command as root in ADM  
rm -f /share/CHROOT\_BASE\_FOLDER/var/cache/apt/archives/\*  
rm -f /share/CHROOT\_BASE\_FOLDER/var/cache/apt/_.bin  
rm -f /share/CHROOT\_BASE\_FOLDER/var/lib/apt/lists/_  
ALL this list and package will by reloaded after an apt-get update later

Philippe.

---

<div class="post-metadata">

**Author:** ![father.mande](https://talk.asustor.com/user_avatar/talk.asustor.com/father.mande/32/7873_2.png) [@father.mande](https://talk.asustor.com/u/father.mande)\
**Post date:** [May 25, 2026, 10:36am UTC](https://talk.asustor.com/t/how-to-series-3-n-run-x11-graphic-apps-on-any-nas-arm-or-intel/45235/2 "2026-05-25T10:36:33Z")

</div>

Hi,

SHORT update of some command in this topic.  
… **1** set owner to directory where ou install chroot … to : root:root  
… … it’s to avoid warning due to ADM admin creator  
… **2** Entware (and some other) set environment variables for ssh connection as root (or admin)  
… … this an create conflict or missing folder when install some Ubuntu package  
… … to don’t forgot it in the future, I will create link (near zero size) to avoid problems.

change are in RED (**[EDIT]**) in the text.

Philippe.  
NB I will prepare a delivery of all scripts … please wait if you don’t want to do it yourself.
