1

I am trying run a GTK application with chrooted environment. Mentioned are the lightdm settings which I have set.

System configuration:

OS : Debian 8
chroot FS: Debian 6
Windows manager : LXDE

Lightdm.conf

display-stopped-script=
greeter-setup-script=
session-setup-script=/opt/startups/Start.sh
session-cleanup-script=
autologin-guest=false
autologin-user=ragav

Start.sh will set the mount parameters and run the chroot command.

CHROOT Settings

 mount -o bind /dev /opt/debian6/dev
 mount -o bind /proc /opt/debian6/proc
 mount -o bind /dev/pts /opt/debian6/dev/pts
 mount -o bind /sys /opt/debian6/sys
 mount -o bind /home /opt/debian6/home
 cp /etc/resolv.conf /opt/debian6/etc/resolv.conf
 cp /etc/hosts /opt/debian6/etc/hosts

 sudo chroot /opt/debian6 /bin/bash -c "su - -c /opt/app.sh&"

This setting triggers the application to get started but it throws (app:4846): Gtk-WARNING : cannot open display: :0

However, when i kill my apps and run the same script from Uxterm terminal or AUTO login as ROOT I notice my application running smoothly.

Request some guidance on addressing this issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.