Re: Chroot and X-Window applications

From: Steve Watt (steve_at_nospam.Watt.COM)
Date: 05/21/03


Date: Tue, 20 May 2003 22:18:02 GMT

In article <efa8bf56.0305142039.6d21cd74@posting.google.com>,
Erwan Becquet <becquet@cnam.fr> wrote:
>Hi everybody,
>
>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.

Setting the DISPLAY variable to ":0" means to connect to the UNIX
domain socket in /tmp/.X11-unix/X0. You probably can't usefully
copy that socket into the chroot and still have things work. The
easiest way to do what you want is to set DISPLAY to "localhost:0"
(assuming you have localhost's name set up correctly), which will
force an IP domain connection instead of a UNIX domain one.

-- 
Steve Watt KD6GGD  PP-ASEL-IA          ICBM: 121W 56' 57.8" / 37N 20' 14.9"
 Internet: steve @ Watt.COM                         Whois: SW32
   Free time?  There's no such thing.  It just comes in varying prices...