Best way to run X application inside chroot environment

From: Jesús Ángel (jpozdom_at_ribera.tel.uva.es)
Date: 10/30/04

  • Next message: Huang, Daniel: "Re: public key access error"
    Date: 29 Oct 2004 23:15:53 GMT
    
    

    Hello.

    I want to run aMule in a chroot environment.

    I have made the chroot and I have copied all the necessary libraries and
    config file to the new chroot. To launch aMule in the chroot I use an
    small C application in order to: enter the chroot, change the UID.GID to
    2000.200 and launch amule.

    aMule is a X application, it hasn't got a console interface :-( and I
    need a method to allow amule connect to the X server.

    Which of these are the better solution?

    1. Config the X server to listen to TCP conections at port 6000 and set
    the DISPLAY=127.0.0.1 With xauth only the user with the correct magic
    cookie could connect to the xserver.

    2. Make a hard link inside the chroot to /tmp/.X11-unix/X0
       # ln /tmp/.X11-unix/X0 /chroot/.X11-unix/X0
     This is not posible if /tmp and /chroot reside in the same partition

    3. Mount the tmp partition inside the chroot
       (inside the chroot) # mount /dev/hda3 /tmp

    Do you know any other solutions?

    Thanks


  • Next message: Huang, Daniel: "Re: public key access error"

    Relevant Pages

    • Re: 4.10-BETA named (not) starting
      ... Kenneth W Cochran, and lo! ... it spake thus: ... the config file gets loaded AFTER you chroot to the directory you ...
      (freebsd-stable)
    • Re: Creating Daemons: Best Practice?
      ... > what is the best practice concerning distributing and installing it? ... Have your daemon do a getopton C, look for that file first, if it's ... there's no point in running without a config file. ... That's up to the person who sets up the chroot. ...
      (comp.os.linux.misc)
    • Re: Creating Daemons: Best Practice?
      ... > what is the best practice concerning distributing and installing it? ... Have your daemon do a getopton C, look for that file first, if it's ... there's no point in running without a config file. ... That's up to the person who sets up the chroot. ...
      (alt.os.linux)
    • Re: FreeBSD 7.0-RELEASE-p12 bind9 log files not found
      ... or just strip /var/named from your config file, ... I suggest you read up on chroot. ... while absolute ones should take into the account the new filesystem root. ... or use relative paths where the working directory is /etc/namedb. ...
      (freebsd-questions)
    • Re: [opensuse] Restricting a user to one directory for FTP access
      ... On Sat, May 10, 2008 at 10:10 PM, James D. Parra ... setting up chroot is a one line option in its config file. ... Chroot is not that hard to break out of. ...
      (SuSE)