Ardour / chroot: ardour starts but jack connection fails

Hello everybody

So I worked on a KXStudio install on my old computer for the past year & a half and recently switched to a new computer running UbuntuStudio with kxstudio packages on top. Problem is: Ardour and quite a few plugins and whatnots changed - some in an incompatible way - so I can’t re-open my ardour 4 sessions “verbatim”. So I tried to install (rsync) my old kx env in chrooted environment, managed to get Ardour4 to launch, but it fails to connect to the jack server (running in the main environment):

Connect: can't connect named futex name = jack_sem.1000_default_system err = No such file or directory
Cannot read socket fd = 15 err = No such file or directory
CheckRes error
JackSocketClientChannel read fail
Cannot open ardourprobe client

and in jackd’s log I get:

ERROR: ClientNotify fails name = system notification = 0 val1 = 0 val2 = 0
ERROR: NotifyAddClient new_client fails name = ardourprobe
ERROR: Cannot notify add client
ERROR: Cannot create new client

What I did:

rsync’d system directories (/bin, /lib, /lib64, /usr, /sbin, /opt) to a /kxold directory on the new computer then (as root):

cd /kxold
mount /dev/mapper/kxold--vg-kxold /kxold 
mount --bind /proc ./proc
mount --bind /tmp ./tmp
mount --bind /dev ./dev
mount --bind /dev/shm ./dev/shm
mount --bind /dev/pts ./dev/pts
mount --bind /run ./run
mount --bind /var/run ./var/run
mount --bind /lib/modules ./lib/modules
mount --bind /sys ./sys
cp /etc/passwd ./etc/passwd
cp /etc/group ./etc/group
cp /home/bruno/.Xauthority ./Xauthority
xhost +localhost
chroot /kxold /bin/bash
export XAUTHORITY=/Xauthority
sudo bruno 
/usr/bin/ardour4 

And I’m stuck there :-/ I suspect some stupid permission issue or something missing or incorrect in my mounts, but dman if I know what, and couldn’t find anything helpful on the net so for, so any help / hint / pointer would be highly appreciated.

TIA
B.

Do not run Jack as root, ever. Always make sure you are running both Ardour and JACK under the same user login (NOT root!). Otherwise they are invisible to each other in most normal circumstances.

@lexridge: jack runs with my user account (bruno) not as root. Now I don’t know for sure whether matching the user ID between both env is enough to solve permissions issues indeed. I’ll have to double check this…

@paul: yes obviously but that’s why I bind mount the relevant directories (/tmp, /dev etc). Is there some other directory I should mount in the chrooted env?

You can’t connect to a JACK server running outside the chroot unless the chroot has access to the sockets used for client/server communication.