Re: Chroot and X-Window applications

From: Erwan Becquet (becquet_at_cnam.fr)
Date: 05/16/03


Date: 15 May 2003 23:19:16 -0700

Barry Margolin <barry.margolin@level3.com> wrote in message news:<rHNwa.8$6j6.411@paloalto-snr1.gtei.net>...
> In article <slrnbc6h8m.dao.Julien.Salgado@io.fluxus.net>,
> Julien Salgado <Julien.Salgado@f_r_e_e_f_r.ignore.invalid> wrote:
> >Erwan Becquet wrote :
> >> Hi everybody,
> >
> >Hi,
> >
> >> I have a strange problem, I want to start programs
> >> from a chrooted tree. It works perfectly with non-x
> >> apps. But with X apps (emacs for example), I have an
> >> error "Cant Connect to X Server on :0". Same work
> >> perfecly without chroot.
> >>
> >> I think X-Window use some special place of the filesystem
> >> but I cant find what.
> >
> >X needs a socket either a unix socket (Sometihng like /tmp/.X11-unix/X0)
> >or a TCP/IP socket. The connection to :0 is refering to the latter.
>
> Are you sure? I think :0 uses the Unix-domain socket, while <hostname>:0
> would use the network.
>
> >> Has someone already encounter a similar problem ? Or maybe
> >> someone has a deep knowledge of X-Window mechanisms and could
> >> help me ?
> >
> >Normally it should work, but chrooting an X application is only usefull
> >if X is completely chrooted (i.e. an X client is not accessing a X
> >server outside the chroot). So you will have to included a large amount
> >of library and binary in your chroot.
>
> If it got far enough to give him a "Can't connect" message, the libraries
> must have been loaded successfully (maybe it's statically linked).

Yes in fact i duplicated all libraries and bins needed for X (I thought),
but it seems that sthg is missing. When I look at differences between
my local (in chrooted dir) tree and whole tree, it seems to have differences
on devices. Is X use devices and which ones ?

Thanks.



Relevant Pages

  • Re: [9fans] Modularizing plan9port
    ... environment set up. ... Build a local plan9port tree, put it in the chroot ... Note: sysroot!= chroot. ...
    (comp.os.plan9)
  • Re: 2.6.24-rc6-git7: Reported regressions from 2.6.23
    ... any udev breakage that could affect /dev/null? ... But, as this is in a chroot, hopefully udev has properly populated the ... chrooted /dev tree for the process to provide the /dev/null device node? ...
    (Linux-Kernel)
  • Re: disk image creation & restauration
    ... I have been running UNIX only since ... Furthermore, with chroot, you ... > the nfs file server. ... Installation of some security tools and software tools ...
    (comp.os.linux.networking)
  • Re: disk image creation & restauration
    ... I have been running UNIX only since ... Furthermore, with chroot, you ... > the nfs file server. ... Installation of some security tools and software tools ...
    (comp.os.linux.setup)
  • Re: Can a chroot execute programs in the external environment?
    ... >> I know for certain that the GNU toolset supports a biarch system (like ... >> no need for a chroot system at all if you set things up like that. ... Just delete everything but the libraries in the one you don't ...
    (uk.comp.os.linux)