Rainbow/Installation Instructions: Difference between revisions

From OLPC
Jump to navigation Jump to search
mNo edit summary
m (Reverted edits by 92.26.229.174 (Talk) to last version by Mstone)
 
(17 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{Rainbow page}}
== Installation ==

Last updated: [[User:Mstone|Michael Stone]] 21:07, 9 March 2009 (UTC)
Last updated: [[User:Mstone|Michael Stone]] 14:39, 30 November 2009 (UTC)


The basic idea is to install [[rainbow]], either
The basic idea is to install [[rainbow]], either
Line 6: Line 7:
'''from source:'''
'''from source:'''


Note: Building rainbow from source requires packages equivalent to gcc, libc-dev, python2.5 or python2.6, and python-setuptools.
RAINBOW=rainbow-0.8.4

RAINBOW=rainbow-0.8.5
wget http://dev.laptop.org/~mstone/releases/SOURCES/$RAINBOW.tar.bz2
wget http://dev.laptop.org/~mstone/releases/SOURCES/$RAINBOW.tar.bz2
tar xf $RAINBOW.tar.bz2 && cd $RAINBOW
tar xf $RAINBOW.tar.bz2 && cd $RAINBOW
Line 14: Line 17:
'''from a distro package:'''
'''from a distro package:'''


* Fedora >= 10: yum install rainbow
* Fedora rawhide: yum install rainbow
* Debian unstable: aptitude install rainbow
* Ubuntu: [https://launchpad.net/~codewiz/+archive/ppa Bernie's PPA] contains some basic rainbow packages which you can install.
* Ubuntu: [https://launchpad.net/~codewiz/+archive/ppa Bernie's PPA] contains some basic rainbow packages which you can install.
* Other: Install rainbow from source or help others by packaging it for your distro!
* Other: Install rainbow from source or help others by packaging it for your distro!


'''general setup''':
'''from a unified builder or image:'''

like [http://sugarlabs.org/go/DevelopmentTeam/Jhbuild sugar-jhbuild] or [http://sugarlabs.org/go/Sugar_on_a_Stick Sugar on a Stick] (SoaS). ''(nb: future work)''

'''setup''':


In order for rainbow to function, you need to inject its users and groups into the system by running:
In order for rainbow to function, you need to inject its users and groups into the system by running:
Line 28: Line 28:
sudo /bin/sed -i -e s/^passwd:/passwd:\ rainbow/ /etc/nsswitch.conf
sudo /bin/sed -i -e s/^passwd:/passwd:\ rainbow/ /etc/nsswitch.conf
sudo /bin/sed -i -e s/^group:/group:\ rainbow/ /etc/nsswitch.conf
sudo /bin/sed -i -e s/^group:/group:\ rainbow/ /etc/nsswitch.conf

If you are installing on a system (like Debian squeeze) that uses [http://linux.die.net/man/8/nscd nscd], then you must restart nscd for rainbow to function:
sudo /etc/init.d/nscd restart


To use the current "rainbow-easy" helper, you need to have an "audio" group on your system:
To use the current "rainbow-easy" helper, you need to have an "audio" group on your system:


sudo groupadd -f audio
sudo groupadd -f audio

Congratulations. You are now ready to '''[[Rainbow/Testing|test rainbow]]'''.

'''sugar+rainbow:'''


To use Rainbow with Sugar Activities, you need to add the following line to /etc/dbus-1/session.conf inside the <policy context="default"> section:
To use Rainbow with Sugar Activities, you need to add the following line to /etc/dbus-1/session.conf inside the <policy context="default"> section:
Line 37: Line 44:
<allow user="*"/>
<allow user="*"/>


This will allow other uids besides yours to access the session bus. This might allow people on the same machine to control your applications and access your data, so only make this change if you're
This will allow other uids besides yours to access your session bus. This might allow people on the same machine to control your applications and access your data, so only make this change if you're
fine with that (e.g. no one else or only trusted ones using your computer). (We hope to improve on this situation in the future.)
fine with that (e.g. no one else or only trusted ones using your computer). (We hope to improve on this situation in the future.)


Similarly, you will need to run something like
Congratulations. You are now ready to test rainbow.

sudo cat >> /etc/orbitrc <<EOF # resp. ~/.orbitrc
ORBIIOPIPv4=1
ORBLocalOnly=1
ORBIIOPUSock=0
EOF

if you want your sugar activities to be able to access GConf. As above this will allow other uids besides yours to access your ORBit2 CORBA ORB. This might allow people on the same machine to control your applications and access your data, so only make this change if you're fine with that (e.g. no one else or only trusted ones using your computer). (We hope to improve on this situation in the future.)

Next, unless you're running a really recent version of sugar (>= 0.86), you'll need to install two patches:

curl 'http://dev.laptop.org/git/users/mstone/sugar/patch/?id=71df9fadd59ea5cc08a414f5d25a0135395533e5' | patch /usr/share/pyshared/jarabe/view/service.py
curl 'http://dev.laptop.org/git/users/mstone/sugar-toolkit/patch/?id=a65c8d2148ba5028437114049027e594238f2ed8' | patch /usr/share/pyshared/sugar/activity/activityfactory.py

'''To use rainbow-0.8.5 or later''', you'll need to add "-o", "network" to the list of arguments specified in the second patch above.

patch -p2 -d /usr/share/pyshared <<EOF
--- a/src/sugar/activity/activityfactory.py 2009-11-30 14:24:25.000000000 +0000
+++ b/src/sugar/activity/activityfactory.py 2009-11-30 14:30:28.000000000 +0000
@@ -261,6 +261,9 @@ class ActivityCreationHandler(gobject.GO
'-u', pwd.getpwuid(os.getuid()).pw_name,
'-i', environ['SUGAR_BUNDLE_ID'],
'-e', environment_dir,
+ '-o', 'network',
+ '-o', 'audio',
+ '-o', 'video',
'--',
] + command
EOF

* Add the following line to /etc/sudoers using <tt>visudo</tt>

sugar ALL=SETENV: NOPASSWD: /usr/bin/rainbow-run

Finally, you need to tell sugar to use rainbow:

touch /etc/olpc-security

Congratulations. You are now ready to test sugar with rainbow.

Latest revision as of 18:43, 30 December 2009

Rainbow :: git :: sources :: rainbow-0.8.6.tar.bz2 :: announcement


Last updated: Michael Stone 14:39, 30 November 2009 (UTC)

The basic idea is to install rainbow, either

from source:

Note: Building rainbow from source requires packages equivalent to gcc, libc-dev, python2.5 or python2.6, and python-setuptools.

RAINBOW=rainbow-0.8.5
wget http://dev.laptop.org/~mstone/releases/SOURCES/$RAINBOW.tar.bz2
tar xf $RAINBOW.tar.bz2 && cd $RAINBOW
make build
sudo make install

from a distro package:

  • Fedora rawhide: yum install rainbow
  • Debian unstable: aptitude install rainbow
  • Ubuntu: Bernie's PPA contains some basic rainbow packages which you can install.
  • Other: Install rainbow from source or help others by packaging it for your distro!

general setup:

In order for rainbow to function, you need to inject its users and groups into the system by running:

sudo /bin/sed -i -e s/^passwd:/passwd:\ rainbow/ /etc/nsswitch.conf
sudo /bin/sed -i -e s/^group:/group:\ rainbow/ /etc/nsswitch.conf

If you are installing on a system (like Debian squeeze) that uses nscd, then you must restart nscd for rainbow to function:

sudo /etc/init.d/nscd restart

To use the current "rainbow-easy" helper, you need to have an "audio" group on your system:

sudo groupadd -f audio

Congratulations. You are now ready to test rainbow.

sugar+rainbow:

To use Rainbow with Sugar Activities, you need to add the following line to /etc/dbus-1/session.conf inside the <policy context="default"> section:

   <allow user="*"/>

This will allow other uids besides yours to access your session bus. This might allow people on the same machine to control your applications and access your data, so only make this change if you're fine with that (e.g. no one else or only trusted ones using your computer). (We hope to improve on this situation in the future.)

Similarly, you will need to run something like

sudo cat >> /etc/orbitrc <<EOF    # resp. ~/.orbitrc
ORBIIOPIPv4=1
ORBLocalOnly=1
ORBIIOPUSock=0
EOF

if you want your sugar activities to be able to access GConf. As above this will allow other uids besides yours to access your ORBit2 CORBA ORB. This might allow people on the same machine to control your applications and access your data, so only make this change if you're fine with that (e.g. no one else or only trusted ones using your computer). (We hope to improve on this situation in the future.)

Next, unless you're running a really recent version of sugar (>= 0.86), you'll need to install two patches:

curl 'http://dev.laptop.org/git/users/mstone/sugar/patch/?id=71df9fadd59ea5cc08a414f5d25a0135395533e5' | patch /usr/share/pyshared/jarabe/view/service.py
curl 'http://dev.laptop.org/git/users/mstone/sugar-toolkit/patch/?id=a65c8d2148ba5028437114049027e594238f2ed8' | patch /usr/share/pyshared/sugar/activity/activityfactory.py

To use rainbow-0.8.5 or later, you'll need to add "-o", "network" to the list of arguments specified in the second patch above.

patch -p2 -d /usr/share/pyshared <<EOF
--- a/src/sugar/activity/activityfactory.py     2009-11-30 14:24:25.000000000 +0000
+++ b/src/sugar/activity/activityfactory.py     2009-11-30 14:30:28.000000000 +0000
@@ -261,6 +261,9 @@ class ActivityCreationHandler(gobject.GO
                        '-u', pwd.getpwuid(os.getuid()).pw_name,
                        '-i', environ['SUGAR_BUNDLE_ID'],
                        '-e', environment_dir,
+                       '-o', 'network',
+                       '-o', 'audio',
+                       '-o', 'video',
                        '--',
                       ] + command
 
EOF
  • Add the following line to /etc/sudoers using visudo
sugar   ALL=SETENV: NOPASSWD: /usr/bin/rainbow-run

Finally, you need to tell sugar to use rainbow:

touch /etc/olpc-security

Congratulations. You are now ready to test sugar with rainbow.