Development Team/Chroot: Difference between revisions

Mstone (talk | contribs)
Mstone (talk | contribs)
No edit summary
Line 43: Line 43:
  apt-get install sugar sugar-activities
  apt-get install sugar sugar-activities
  # install your development tools here
  # install your development tools here
=== User Accounts ===
For stupid reasons, it's necessary that Sugar run under a uid inside the chroot which exists as a real account outside the chroot. (Talk to the DBus people.)
Consequently, ''as root'', run something like this ''both'' inside and outside the chroot:
  groupadd -g 64002 sugar
  useradd -m -u 64002 -g sugar -s /bin/bash sugar


=== X11 ===
=== X11 ===
Line 60: Line 69:
before entering the chroot. (Mock uses unshare() to enter a new mount-point namespace since this makes garbage collection of mountpoints much easier.)
before entering the chroot. (Mock uses unshare() to enter a new mount-point namespace since this makes garbage collection of mountpoints much easier.)


=== User Account ===
=== Running Sugar ===
 
For stupid reasons, it's necessary that Sugar run under a uid inside the chroot which exists as a real account outside the chroot. (Talk to the DBus people.)
 
Consequently, ''as root'', run something like this ''both'' inside and outside the chroot:
 
  groupadd -g 64002 sugar
  useradd -m -u 64002 -g sugar -s /bin/bash sugar


Then, inside the chroot, you can happily run sugar as user 'sugar' with something like
Then, inside the chroot, you can happily run sugar as user 'sugar' with something like


  sudo chroot $CHROOT /bin/bash -l
   su sugar -
   su sugar -
   export DISPLAY=:1
   export DISPLAY=:1
   export DBUS_SESSION_BUS_ADDRESS=$(dbus-daemon --session --print-address --fork)
   export DBUS_SESSION_BUS_ADDRESS=$(dbus-daemon --session --print-address --fork)
   sugar
   sugar