FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian KDE

 
 
LinkBack Thread Tools
 
Old 06-24-2010, 06:18 PM
Roger Leigh
 
Default Debian desktop support for virtualisation

Hi,

I'd appreciate any input from the Debian desktop (gnome, kde) and
amd64 folks regarding supporting easy integration of support for
running desktop/X applications in a chroot environment, particularly
for running 32-bit programs in a chroot on 64-bit systems.

schroot is commonly used for this task, and I'm adding a "desktop"
configuration profile, which I'd like to work "out of the box" to
allow desktop applications to run inside a chroot. More detail
is given below, and in the full bug report.

Basically, I'd like to add whatever pieces are needed from the
host system, be it bind mounting filesystems, making sure
the needed services are accessible, copying over configuration
etc. Anything that makes using a chroot more transparent and
accessible to users is on the cards. If anyone has already
added customisations to schroot to make this work, sharing your
configuration details would also be useful.


Thanks!
Roger


On Thu, Jun 24, 2010 at 12:15:42AM +0100, Roger Leigh wrote:
> Over the last couple of nights, I've added support for "profiles"
> to schroot, and one of these is a "desktop" profile. Currently,
> this is the fstab for this profile on Linux:
>
> # fstab: static file system information for chroots.
> # Note that the mount point will be prefixed by the chroot path
> # (CHROOT_PATH)
> #
> # <file system> <mount point> <type> <options> <dump> <pass>
> /proc /proc none rw,rbind 0 0
> /sysfs /sysfs none rw,rbind 0 0
> /dev /dev none rw,rbind 0 0
> /home /home none rw,bind 0 0
> /tmp /tmp none rw,bind 0 0
> /var/run /var/run none rw,bind 0 0
>
> I opted to bind mount the whole of /var/run to get other stuff
> like dbus sockets. However, doing this more selectively might
> reduce the change of nasty problems such as things in the
> chroot interfering with services on the host.
>
> Do you think there are any other things that need binding into the
> chroot under e.g. /var that we've missed?
>
> The same applies to files copied in with "copyfiles"--is there anything
> else here we should add? Currently this is just resolv.conf, but any
> other stuff needed by X or other things in the user's session could be
> copied here.

Regards,
Roger

--
.'`. Roger Leigh
: :' : Debian GNU/Linux http://people.debian.org/~rleigh/
`. `' Printing on GNU/Linux? http://gutenprint.sourceforge.net/
`- GPG Public Key: 0x25BFB848 Please GPG sign your mail.
 
Old 06-25-2010, 11:46 AM
Josselin Mouette
 
Default Debian desktop support for virtualisation

Le jeudi 24 juin 2010 * 19:18 +0100, Roger Leigh a écrit :
> schroot is commonly used for this task, and I'm adding a "desktop"
> configuration profile, which I'd like to work "out of the box" to
> allow desktop applications to run inside a chroot. More detail
> is given below, and in the full bug report.
>
> Basically, I'd like to add whatever pieces are needed from the
> host system, be it bind mounting filesystems, making sure
> the needed services are accessible, copying over configuration
> etc. Anything that makes using a chroot more transparent and
> accessible to users is on the cards. If anyone has already
> added customisations to schroot to make this work, sharing your
> configuration details would also be useful.

For GNOME, most things are done through X11 (with the root window),
D-Bus and GConf. This means you need:
* a bunch of environment variables
* /tmp for the X11 sockets, the session bus, GConf, seahorse and
gnome-keyring
* /var/run/dbus for the system bus
* starting with gdm3, /var/run/gdm3 for the xauth file

You may also need (but I haven’t checked):
* /var/run/cups for printing
* /var/run/avahi-daemon
and some others that I’m forgetting.

Cheers,
--
.'`.
: :' : “Fuck you sir, don’t be suprised when you die if
`. `' you burn in Hell, because I am a solid Christian
`- and I am praying for you.” -- Mike


--
To UNSUBSCRIBE, email to debian-kde-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 1277466401.10458.17.camel@meh">http://lists.debian.org/1277466401.10458.17.camel@meh
 
Old 06-27-2010, 12:40 AM
Roger Leigh
 
Default Debian desktop support for virtualisation

On Fri, Jun 25, 2010 at 01:46:41PM +0200, Josselin Mouette wrote:
> Le jeudi 24 juin 2010 * 19:18 +0100, Roger Leigh a écrit :
> > schroot is commonly used for this task, and I'm adding a "desktop"
> > configuration profile, which I'd like to work "out of the box" to
> > allow desktop applications to run inside a chroot. More detail
> > is given below, and in the full bug report.
> >
> > Basically, I'd like to add whatever pieces are needed from the
> > host system, be it bind mounting filesystems, making sure
> > the needed services are accessible, copying over configuration
> > etc. Anything that makes using a chroot more transparent and
> > accessible to users is on the cards. If anyone has already
> > added customisations to schroot to make this work, sharing your
> > configuration details would also be useful.
>
> For GNOME, most things are done through X11 (with the root window),
> D-Bus and GConf. This means you need:
> * a bunch of environment variables
> * /tmp for the X11 sockets, the session bus, GConf, seahorse and
> gnome-keyring
> * /var/run/dbus for the system bus
> * starting with gdm3, /var/run/gdm3 for the xauth file
>
> You may also need (but I haven’t checked):
> * /var/run/cups for printing
> * /var/run/avahi-daemon
> and some others that I’m forgetting.

Thanks! I think we now have most of these. We don't preserve the
environment by default (you have to use the -p option), but we
could make that automatic in a future release by adding a new
configuration option. We definitely have /tmp and all of /var/run
so most of the above should be catered for.

If anyone on the lists is using schroot for desktop applications,
I'm currently uploaded schroot version 1.4.5-1 which adds a
"desktop" configuration profile. Just set
script-config=desktop/config
in your chroot definition. I'd definitely appreciate any feedback
about it. If there's anything missing that would be nice to have
inside the chroot, please do let me know.


Regards,
Roger

--
.'`. Roger Leigh
: :' : Debian GNU/Linux http://people.debian.org/~rleigh/
`. `' Printing on GNU/Linux? http://gutenprint.sourceforge.net/
`- GPG Public Key: 0x25BFB848 Please GPG sign your mail.
 
Old 06-27-2010, 08:48 AM
Josselin Mouette
 
Default Debian desktop support for virtualisation

Le dimanche 27 juin 2010 * 01:40 +0100, Roger Leigh a écrit :
> On Fri, Jun 25, 2010 at 01:46:41PM +0200, Josselin Mouette wrote:
> > You may also need (but I haven’t checked):
> > * /var/run/cups for printing
> > * /var/run/avahi-daemon
> > and some others that I’m forgetting.
>
> Thanks! I think we now have most of these. We don't preserve the
> environment by default (you have to use the -p option), but we
> could make that automatic in a future release by adding a new
> configuration option.

You should definitely pass the following environment variables without
asking, since GNOME applications won’t work without them:
DISPLAY
XAUTHORITY
ORBIT_SOCKETDIR
DBUS_SESSION_BUS_ADDRESS

The following shouldn’t hurt as well.
Terminal:
TERM
COLORTERM
XSMP support (probably doesn’t work in a chroot):
SESSION_MANAGER
gnome-keyring (only the SSH stuff works across the lenny→squeeze
upgrade):
SSH_AGENT_PID
SSH_AUTH_SOCK
GNOME_KEYRING_CONTROL
GNOME_KEYRING_PID
seahorse:
GPG_AGENT_INFO
Used by xdg-utils and debianutils scripts:
XDG_SESSION_COOKIE
DESKTOP_SESSION
GNOME_DESKTOP_SESSION_ID
GTK+ modules to load:
GTK_MODULES
GTK_IM_MODULE
Language:
LANG
LC_*

> We definitely have /tmp and all of /var/run
> so most of the above should be catered for.

Passing all of /var/run looks a bit dangerous to me since it could lead
some scripts in the chroot believe that a daemon is started in the
chroot. I’m not sure if that’s a real problem, but you should probably
at least print a warning somewhere.

> If anyone on the lists is using schroot for desktop applications,
> I'm currently uploaded schroot version 1.4.5-1 which adds a
> "desktop" configuration profile. Just set
> script-config=desktop/config
> in your chroot definition.

Great!

--
.'`. Josselin Mouette
: :' :
`. `' “If you behave this way because you are blackmailed by someone,
`- […] I will see what I can do for you.” -- Jörg Schilling
 

Thread Tools




All times are GMT. The time now is 03:04 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org