[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: staying in stable but compiling for sid

[Running X apps in a chroot]

Székelyi Szabolcs <cc@mail.3d.hu> wrote:

> You can. Just run an sshd inside the chroot and enable X forwarding on
> the ssh server sitting inside and the ssh client connecting from outside
> (from an xterm, of course).

There is another way, which I've been using for years:

  - in the chroot, arrange to have 'DISPLAY=localhost:0.0';

  - out of the chroot, run your X server in a way that it does listen to
    TCP connections (for me, this means ommitting the '-nolisten tcp'
    arguments that are by default appended to the /usr/bin/X call in

    Of course, if you do this, I strongly suggest to configure your
    firewall so that the TCP ports X is listening on are only accessible
    from, not from your network interfaces connected to the
    wild world (the ports used for this start at 6000; every display
    takes up one port).

  - arrange to have a script transfer the MIT-MAGIC-COOKIES (with xauth)
    from the user running the X session out of the chroot to the user
    running the X apps in the chroot, so that X connections to your
    normal X server are authorized for the apps you run in the chroot.

This is a bit of a hack, but it does work.


Reply to: