You should be able to do this with a combination of startx
and /etc/X11/Xsession
, as long as you've got the necessary trees bind-mounted (I'd guess that you'll need /dev
, /sys
, and /proc
)
Chroot into your… chroot and run
sudo startx bash
which should give you an X term with a shell. To start a GNOME session you can simply run
/etc/X11/Xsession
from that shell.
You should be able to get this on the VT of your choice; check out the man page for startx
for this, and other potentially interesting options.
Note that this doesn't make for a secure chroot - since /proc
and /sys
and /dev
are mounted in the chroot a sufficiently advanced malicious user break out of the chroot with ease.
/
mounted? with chainroot command you can pretend your/
is temporarly somewhere else, which allows you to run "bootstrapped" debian/ubuntu releases. – Dima Aug 16 '10 at 01:31