Developers/Setup: Difference between revisions
(Clean up) |
(there is already a link to Fedora when the term is first introduced) |
||
(64 intermediate revisions by 19 users not shown) | |||
Line 1: | Line 1: | ||
{{Translationlist | ko | origlang=en }} |
|||
⚫ | |||
{{Developers}} |
|||
⚫ | |||
The OLPC software environment is a combination of OLPC-tailored low-level system components (sharing as much with [[Fedora]] as possible), plus dual user-level platforms [http://wiki.sugarlabs.org Sugar] and GNOME. |
|||
The OLPC's software environment is a heavily modified Fedora 7 Linux system running a custom [[Sugar|GUI shell]] (Sugar). To develop for the platform you will eventually need access to a platform which runs in a manner substantially similar to the OLPC environment. |
|||
Development of components of Sugar and GNOME (really anything that directly faces the user) happens within the regular upstream [http://wiki.sugarlabs.org/go/Sugar_Labs/Getting_Involved#Developer Sugar developer] and [http://developer.gnome.org/ GNOME developer] communities. The content on this wiki relates to development of the lower level OLPC platform. |
|||
There are a number of different Development Environment setups possible, and choosing among them can be difficult. The approach you choose will depend on a number of factors. |
|||
== Recommended environment == |
|||
= Emulated OLPC-XO = |
|||
[[Releases|OLPC OS releases]] are based on specific versions of Fedora. It is recommended that you install the matching version of Fedora on your development computer, matching the architecture (i686 or x86_64). |
|||
An [[Emulating the XO|emulated XO laptop]] is the recommended platform for "checking out" the Sugar environment, testing activities and for initial development of new activities. By installing an emulation package on your (reasonably powerful) host desktop, you can run an emulated version of the Sugar environment which is essentially the same code as runs on the real laptops. |
|||
Although you will likely develop on your regular desktop computer, you will need an XO at your side for testing. |
|||
An emulated XO does not provide tools such as SVG editors or Integrated Development Environments. You will normally run such software on your host machine and push the results onto the emulated machine. |
|||
== Communicating with your XO == |
|||
The emulated XO has certain limitations with regard to the specialized hardware in the XO. See [[Developers/FAQ|the Developer's FAQ]] below for some pointers on how to simulate the special hardware. |
|||
=== SSH Access === |
|||
= sugar-jhbuild = |
|||
You will often want to be able to use file-transfer and remote-login operations to access your Sugar environment. We generally recommend using ssh-based access for working with your Sugar environment remotely. |
|||
This is what the core development team uses and is one of the most pleasant ways to work. Compared with using an Emulated XO, installing sugar takes more time and space to set up, and can be difficult to maintain, but results in a more flexible better environment. If you are intending to work on the core system/activities you will likely need to use sugar-jhbuild to set up your environment. See [[Sugar with sugar-jhbuild]] to get going. The 'native' environment for sugar-jhbuild is Fedora 7 and Ubuntu (feisty or gutsy). |
|||
==== Password Based ==== |
|||
[[Emulated Sugar-jhbuild|This approach]] also works nicely under emulation ([[Qemu]], [[Parallels]], [[VirtualBox]] or [[VMWare]]) on Linux, Windows or Mac OS host operating systems. This allows you to work without rebooting even when using sugar-jhbuild, and without risk of corrupting your host operating system. |
|||
Password-based SSH authentication is convenient and simple to set up, but it is far easier to crack than key-based access. Consider using key-based authentication unless you are absolutely sure that no-one can reach your Sugar environment from untrusted networks (and maybe even then). |
|||
== On 32-bit Linux == |
|||
Open a [[Terminal]] activity and run: |
|||
To get a working [[Sugar with sugar-jhbuild|Sugar using jhbuild]] you will need to be running an OS that provides compatible versions of the various libraries that Sugar requires (basically a very up-to-date Linux platform). |
|||
passwd |
|||
As of 2007-12-13 the distributions known to be able to support sugar-jhbuild are: |
|||
which will prompt you to enter a password (and confirm it). |
|||
* [[Sugar_on_Fedora_7|Fedora 7]] |
|||
* [[Sugar_on_Ubuntu_Linux|Ubuntu Feisty Fawn (or Greater)]]. |
|||
* [[Sugar_on_Gentoo_Linux|Gentoo]] (with a trivial work-around) |
|||
Note: you can also set a password on the root account by doing: |
|||
At the moment, a Fedora 7 install with sugar-jhbuild is probably the most "sure" approach to getting a working full-speed (non-emulated) working environment for developing on Sugar with the latest libraries and solid upgrade path. As most of the core developers are working on Fedora boxes with sugar-jhbuild it is the most likely environment to be supported and continue to receive support. |
|||
su root |
|||
== On 64-bit Linux == |
|||
passwd |
|||
in the terminal window. This is strongly recommended if you are going to allow remote access to your machine. |
|||
As of 2007-12-13 it is possible to build Sugar on 64-bit Linux with trivial workarounds/fixes. This has been confirmed on Gentoo amd64 and Debian Lenny (with the caveats below). |
|||
==== SSH Key Based ==== |
|||
Sugar seems to be working on Debian Lenny (2007-11-05), though Python 2.5, even when installed, is not detected. Comment out the line '''jhbuild.commands.run('sanitycheck', config, [])''', line 95, to get it to install. |
|||
SSH Key based authentication provides strong public-key encrypted access control for your Sugar environment, but takes a bit more work than SSH Password base authentication. |
|||
= Native Sugar Packages on Linux = |
|||
In summary, you create a private key which will be stored on your remote system and encrypted with a strong password. You transfer the public key (think of it as a lock) that corresponds to that key to the Sugar environment and install it as an "authenticated key" which can be used to log into the Sugar environment. |
|||
As Sugar stabilizes and is ported to more distributions, it should be possible to use your Linux distribution's package management system to install Sugar. Distributions with ports so far: |
|||
On your remote system, install SSH (Linux and MacOS will already have it installed, on Windows use the PuTTY program) and generate a new ssh key pair (following is for Linux/MacOS, refer to PuTTY's documentation for details on Windows): |
|||
* [[Sugar_on_Ubuntu_Linux#Option_3_-_Deb_Packages_for_Gutsy|Ubuntu Gutsy]] -- Note that we need more testing of this package-set, please let us know your experiences |
|||
ssh-keygen |
|||
If you don't see your distribution here, ask your distribution maintainers, or if you have the skills, create the packages yourself and submit them. |
|||
Usage notes: |
|||
= A real XO laptop = |
|||
* Accept the defaults for key-type and size. |
|||
Hardware Developer's Program - while there are only a small number of test units being produced, developers can [[Developers_Program#How_to_apply|submit proposals]] to receive one of those units for testing and development. |
|||
* If ssh-keygen asks if you want to overwrite a key say '''No''', you are about to destroy your current ssh key! |
|||
* Use a strong pass-phrase that you can remember easily (the pass phrase will need to be entered frequently unless you make use of an ssh-agent such as offered by PuTTY or Gentoo's keychain) |
|||
This will normally create a file in your ~/.ssh/ directory named id_rsa.pub (if you accepted the defaults). You now need to copy this file to your Sugar environment and add it to the contents of your ~/.ssh/authorized_keys file (you may need to create the file). |
|||
You can also, if you live in the US or Canada, and have sufficient funds, until Dec 31, 2007 use the Give 1 Get 1 program to acquire a production-run machine (and donate one to a child). |
|||
mkdir ~olpc/.ssh |
|||
⚫ | |||
cat id_rsa.pub >> ~olpc/.ssh/authorized_keys |
|||
add your key to your keychain/ssh-agent application and you can now use SSH with just a single sign-on for many concurrent actions. |
|||
== See Also == |
|||
* [[Compiling C/C++ program for the OLPC]] |
|||
* [[Building custom images]] |
|||
⚫ | |||
[[Category:Developers]] |
Latest revision as of 03:17, 12 May 2014
The OLPC software environment is a combination of OLPC-tailored low-level system components (sharing as much with Fedora as possible), plus dual user-level platforms Sugar and GNOME.
Development of components of Sugar and GNOME (really anything that directly faces the user) happens within the regular upstream Sugar developer and GNOME developer communities. The content on this wiki relates to development of the lower level OLPC platform.
Recommended environment
OLPC OS releases are based on specific versions of Fedora. It is recommended that you install the matching version of Fedora on your development computer, matching the architecture (i686 or x86_64).
Although you will likely develop on your regular desktop computer, you will need an XO at your side for testing.
Communicating with your XO
SSH Access
You will often want to be able to use file-transfer and remote-login operations to access your Sugar environment. We generally recommend using ssh-based access for working with your Sugar environment remotely.
Password Based
Password-based SSH authentication is convenient and simple to set up, but it is far easier to crack than key-based access. Consider using key-based authentication unless you are absolutely sure that no-one can reach your Sugar environment from untrusted networks (and maybe even then).
Open a Terminal activity and run:
passwd
which will prompt you to enter a password (and confirm it).
Note: you can also set a password on the root account by doing:
su root passwd
in the terminal window. This is strongly recommended if you are going to allow remote access to your machine.
SSH Key Based
SSH Key based authentication provides strong public-key encrypted access control for your Sugar environment, but takes a bit more work than SSH Password base authentication.
In summary, you create a private key which will be stored on your remote system and encrypted with a strong password. You transfer the public key (think of it as a lock) that corresponds to that key to the Sugar environment and install it as an "authenticated key" which can be used to log into the Sugar environment.
On your remote system, install SSH (Linux and MacOS will already have it installed, on Windows use the PuTTY program) and generate a new ssh key pair (following is for Linux/MacOS, refer to PuTTY's documentation for details on Windows):
ssh-keygen
Usage notes:
- Accept the defaults for key-type and size.
- If ssh-keygen asks if you want to overwrite a key say No, you are about to destroy your current ssh key!
- Use a strong pass-phrase that you can remember easily (the pass phrase will need to be entered frequently unless you make use of an ssh-agent such as offered by PuTTY or Gentoo's keychain)
This will normally create a file in your ~/.ssh/ directory named id_rsa.pub (if you accepted the defaults). You now need to copy this file to your Sugar environment and add it to the contents of your ~/.ssh/authorized_keys file (you may need to create the file).
mkdir ~olpc/.ssh cat id_rsa.pub >> ~olpc/.ssh/authorized_keys
add your key to your keychain/ssh-agent application and you can now use SSH with just a single sign-on for many concurrent actions.