Description:
I'm using a Lubuntu 13.10 X86-64 livecd to chroot into another Lubuntu 13.10 X86-64 located on my hard drive in a folder called chroot. I've had no trouble using the terminal to chroot in, and I can launch gui applications on my current xserver from the chroot after using "xhost +" on the livecd, but I need provide the chroot it's own X output. I've googled, searched askubuntu, and typed every command under the sun and moon all to no avail. I would love a solution, but would even be happy for a guess if you've got one. I've backed up the chroot so I can restore if it gets messed up. I've also tried using Xnest but it doesn't want to work either. I would like to run the lxde desktop environment in the chroot, if possible logging in as a specific user.
Details:
Below are the commands I used to commence the chroot.
sudo mount --bind /dev /media/lubuntu/os/chroot/dev
sudo mount --bind /proc /media/lubuntu/os/chroot/proc
sudo mount --bind /sys /media/lubuntu/os/chroot/sys
sudo cp /etc/resolv.conf /media/lubuntu/os/chroot/etc/resolv.conf
xhost +
sudo chroot /media/lubuntu/os/chroot
I would also have typed "export DISPLAY=:0.0" in the chroot, but it worked without it.
Test Results:
Test #1:
Description:
I get a black screen on all outputs (control+alt+Fkeys), and I cannot type anything. I'm forced to kill the computer by hand.
Details:
In chroot terminal type
export DISPLAY=localhost:1
In chroot terminal type
startx -- :1
Test #2:
Description:
I get a black screen for F1, pressing "control + alt + F7" gets me back to my normal desktop. I cannot type anything on the black screen. When I enter "gksu leafpad" in the chroot terminal on F7 I get an error that it "cannot open display localhost:1". When I switch to F1 it now shows a terminal prompt for the livecd not the chroot.
Details:
In chroot terminal type
export DISPLAY=localhost:1
In livecd terminal type
sudo startx -- :1
Test #3: [Edited In]
Description:
I get a blank black window, just as I would for Xnest. When I try to launch xterm I get an error stating "could not resolve hostname lubuntu: Name or service not known". I've also tried installing "openssh-server" in the chroot, and on the livecd. When I use the same commands on the livecd only and attempt to launch xterm from the livecd I do not get the same error. Instead I get a password prompt. The livecd user "lubuntu" has no password. If I leave the password blank I get error "permission denied. If I create a user account a retry it I get error "permission denied, please try again" when entering the correct user password. The "could not resolve hostname lubuntu" error experienced with the chroot also occurs when using apt-get in the chroot, though I can and have installed things from apt.
Details:
In livecd terminal type
Xephyr -ac -screen 1024x768 -br -reset -terminate 2> /dev/null :1 &
In chroot terminal type
DISPLAY=:1.0
I also tried "DISPLAY=:1.0" in the livecd terminal.
In chroot terminal type
ssh -XfC -c blowfish root@lubuntu xterm
I also tried "user@server" and "root@localhost" in the chroot terminal.
Additional Information
Anything else you want to know? I'll try to add it here.