# How to run linphone from a chroot

Last updated: 2023-09-05

## Preparations and requirements

This assumes usage of:

- schroot and having exactly one session of the desired chroot already running
- systemd
- pulseaudio
- xorg

A recent enough .deb of linphone-desktop must also be installed (needed for data files).

## Procedure

1. Outside chroot as root create bind mounts:

   With bash and xmlstarlet the above can be run like so:

2. Outside chroot as normal user copy in config files and data:

   With bash and xmlstarlet the above can be run like so:

3. Inside chroot as normal user run the desired linphone variant:

       # linphone-desktop
       ( export HOME=/tmp/$(id -un) XDG_RUNTIME_DIR=/run/user/$(id -u) DISPLAY=:0 GDK_BACKEND=x11 QT_QPA_PLATFORMTHEME=gtk2 ; build/linphone-app/linphone )

       # linphonec (needs package linphone-cli installed)
       ( export HOME=/tmp/$(id -un) XDG_RUNTIME_DIR=/run/user/$(id -u) DISPLAY=:0 GDK_BACKEND=x11 QT_QPA_PLATFORMTHEME=gtk2 ; linphonec -c $HOME/.config/linphone/linphonerc -V )