KnowledgeBase

Differences between revisions 44 and 45
Revision 44 as of 2008-11-07 11:15:13
Size: 13421
Editor: 194
Comment:
Revision 45 as of 2008-11-07 11:21:54
Size: 13560
Editor: 194
Comment:
Deletions are marked like this. Additions are marked like this.
Line 207: Line 207:
 * It appends the word 'shadow' in front of the filenames, which means you'll then need to rename them after. I'll work on changing that.

Home

Getting Involved

Knowledge Base

FAQ

Contacts

NEXT TRAINING MEETING:
TBD (details)

Meeting Logs

Launchpad and Bazaar

This is a step-by-step guide for creating a branch of the Ubuntu Desktop Course and working on it. The Ubuntu Desktop course is hosted on Launchpad in a bazaar repository (https://launchpad.net/ubuntu-desktop-course). If you want to READ the files, you do not need to get the source files from Launchpad. This is for people who would like to edit/update the files and submit "code" back to the project. You may download a compiled PDF of the desktop course from the main page for this project.

1. Download and install Bazaar

To keep track of the changes in the Ubuntu Desktop Course, we are using Launchpad and Bazaar. If you prefer, you may contribute your requested changes through the Wiki tasks page. Bazaar is a "version control system." You can think of it as a big UNDO button for your own work, but also a relationship counselor for files. In other words: it is a tool that allows you to integrate changes made between many different authors, and also one that allows you to UNDO mistakes. The command line utility for Bazaar appears to be the most stable at this time; however, you may wish to try one of the other programs listed on http://bazaar-vcs.org/Download.

$ sudo apt-get install bzr

2. Download the source files for the course from Launchpad

In this step you will download the source material for the course. This command will download approximately 500 MB of data. It will store the course in a new directory called, "ubuntu-desktop-course."

$ bzr branch https://launchpad.net/ubuntu-desktop-course/

That was easy, yes? If you wish to use a different name, simply add the new directory name at the end of the line, like this:

$ bzr branch https://launchpad.net/ubuntu-desktop-course/ my-desktop-course

3. Edit and change the source files

Use any editor you like that supports editing of DocBook XML.

  • OpenOffice.org v3 supports DocBook XML. If you have never edited an XML file this is your best option. Unfortunately OOo v3 is not yet available in Ubuntu. There are installation instructions available if you need them.

  • bluefish offers easy use of xmllint to check the XML validity
  • gnome-edit offers syntax highlighting

For more options see http://wiki.docbook.org/topic/DocBookAuthoringTools

At this stage you might also update or replace screen shots. As long as the file name stays the same, it will automatically be included in your updates. If you need to add new screen shots, please consult the team before proceeding.

4. Save your changes

First you must "commit" your changes to your local history for the project. Committing a change does not upload the changes to the main project. Commit after every logical change (for example: after the update of a paragraph or list). Use sensible commit messages. If you ever want to "undo" a change you will use these commit messages. The person who is integrating your changes will also use the commit message to determine if your change should be accepted.

$ bzr commit -m "Example commit, corrected error on bzr usage."

5. Tell Launchpad who you are

For the next step you will need tell Launchpad who you are. There is a detailed tutorial on https://help.launchpad.net/YourAccount/CreatingAnSSHKeyPair. You only need to do this step once, but it will take a few minutes to complete. ... Now that you have connected your Launchpad account to your computer, you must also tell Bazaar about your Launchpad account:

$ bzr launchpad-login <LAUNCHPADUSERNAME>

6. Publish your branch

In this step you will upload your changes to the project. You will not overwrite anything! Don't panic! After this step you will make a request to have your changes merged into the main project. Someone will review your work before accepting the changes into the main project. From your branch directory use the following command:

$ bzr push lp:~YOURLAUNCHPADNAME/ubuntu-desktop-course/CODENAME

Of course you don't really need to use a "codename." This is the name of the branch that will be created for the Training Team to merge in your changes. You can be descriptive here (but using only letters and hyphens). For example, your CODENAME might be: revised-ch1. Please note that a CODENAME is really a "branch name."

7. Notify the training team of your new branch

Navigate to your page of code contributions. It will follow the URL format of https://code.edge.launchpad.net/~YOURLAUNCHPADNAME. Select the branch you just uploaded and follow the on-screen instructions to "Propose for merging into another branch."

Converting XML to PDF

If you are not using OpenOffice.org to make your changes, and you would like to create a PDF to proof read the course, you will need to install more tools. The following packages are required to convert XML to : docbook-xsl, xsltproc, dblatex, make and bzr. You can install these using the command line ("sudo apt-get install ...") or the Synaptic package manager.

You can install the ubuntu-desktop-course-devel package, which is hosted in the ubuntu-training team PPA. Installing this package will bring in all the bits and pieces you need to build the courseware from DocBook source. See https://launchpad.net/~ubuntu-training/+archive for the actual package and repository information.

HOWTO translate the Ubuntu Desktop Course

into another language (in collaboration with others).

Prerequisites:

  • a launchpad account (https://launchpad.net/+login)

  • a computer with Ubuntu 7.10 running and access to the Internet
  • a public rsa key in the file ~/.ssh/id_rsa.pub on your computer (*)

(*) If you don't have a public rsa key then create one with the command "ssh-keygen -t rsa".

Login into your launchpad account, go to the "Overview" page of your account and choose "Update SSH keys" from the "Actions" menue. Insert the contents of ~/.ssh/id_rsa.pub into the textbox and click on <Import Public Key>.

Go to the Ubuntu Desktop Course Code page at https://code.launchpad.net/ubuntu-desktop-course and check if there is already a branch for the language you want to translate into (ubuntu-desktop-course-german for example). If there isn't such a branch then you are the first one starting the translation into your language. If you are the first one you should register two branches (ubuntu-desktop-course-german and ubuntu-desktop-course-german-your_name for example). If you are not the first one you have to register only one branch (ubuntu-desktop-course-german-your_name for example). Therefore click on "Register branch" in the "Actions" menue to register your branch(es). Select "Branch Type: Hosted". As "Name" and "Title" type in ubuntu-desktop-course-german-your_name for example.

Now you can create a branch (or two) as a working copy on your computer, start translating and publish your work. For details see "Launchpad and Bazaar" above. Use for example ubuntu-desktop-course-german-your_name only for your own translation work. ubuntu-desktop-course-german should only be used to merge the work of all who are translating into German.

Example 1: Linus is the first one who starts translation into Finnish:

bzr branch http://bazaar.launchpad.net/~canonical-training/ubuntu-desktop-course/ubuntu-desktop-course-beta

bzr branch ubuntu-desktop-course-beta ubuntu-desktop-course-finnish

bzr branch ubuntu-desktop-course-beta ubuntu-desktop-course-finnish-torvalds

After translating in ubuntu-desktop-course-finnish-torvalds:

bzr commit ...

bzr push bzr+ssh://linus-torvalds@bazaar.launchpad.net/~linus-torvalds/ubuntu-desktop-course/ubuntu-desktop-course-finnish-torvalds

After merging all translations in ubuntu-desktop-course-finnish (for example with
bzr merge ../ubuntu-desktop-course-finnish-torvalds
bzr merge ../ubuntu-desktop-course-finnish-raikkonen
bzr merge ../ubuntu-desktop-course-finnish-halonen
...):

bzr commit ...

bzr push bzr+ssh://linus-torvalds@bazaar.launchpad.net/~linus-torvalds/ubuntu-desktop-course/ubuntu-desktop-course-finnish

Example 2: Marie Curie is the third one who starts translation into French (Paula Couvert was the first one):

bzr branch http://bazaar.launchpad.net/~paula-couvert/ubuntu-desktop-course/ubuntu-desktop-course-french

bzr branch ubuntu-desktop-course-french ubuntu-desktop-course-french-curie

After translating in ubuntu-desktop-course-french-curie:

bzr commit ...

bzr push bzr+ssh://marie-curie@bazaar.launchpad.net/~marie-curie/ubuntu-desktop-course/ubuntu-desktop-course-french-curie

HOWTO add the Ubuntu Desktop Course on an Ubuntu 7.10 Live CD

with a little help from the UCK (Ubuntu Customization Kit).

Prerequisites:

  • a computer with Ubuntu 7.10 running and access to the Internet
  • 5 GByte free disk space in $HOME/tmp
  • an Ubuntu 7.10 ISO-Image file (700 MByte)
  • the Ubuntu Desktop Course file (73 MByte, $HOME/student.pdf for example)

Download uck_2.0.1_all.deb from uck.sourceforge.net and install it.

Open a Terminal window (Applications -> Accessories -> Terminal) and type in the command uck-gui. Answer all the questions the uck-gui asks you...

When the uck-gui asks you "Do you want to customize CD manually during build" then answer "yes"...

When the "Please choose customization action" window appears then let it untouched.

Instead open another Terminal window (Applications -> Accessories -> Terminal) and type in the following commands:

  • sudo mkdir $HOME/tmp/remaster-iso/docs
  • sudo cp $HOME/student.pdf $HOME/tmp/remaster-iso/docs/
  • sudo mkdir $HOME/tmp/remaster-root/etc/skel/Desktop
  • sudo ln -s /cdrom/docs/student.pdf $HOME/tmp/remaster-root/etc/skel/Desktop/Ubuntu_Desktop_Course.pdf

Close the Terminal window.

Get back to the "Please choose customization action" window, select "Continue building" and klick on <OK>...

After a while you will find the remastered ISO-Image file as $HOME/tmp/remaster-new-files/livecd.iso (780 MByte).

Burn livecd.iso on a DVD(*) and then boot from this DVD...

You will see an "Ubuntu_Desktop_Course.pdf" icon on the desktop. Klick on the icon to open the Ubuntu Desktop Course. Smile :-)

(*)BE AWARE: If you want to burn livecd.iso on a CD the size of the file has to be less than 700 MByte. To achieve this select "Run package manager" in the "Please choose customization action" window of the uck-gui and remove some software packages you don't need.

HOWTO Add Drop-Shadow to Screen Shots

The current documentation recommends using GIMP for adding drop-shadow to screenshots manually. The script below adds drop-shadow to multiple files in batch, very quickly.

Gotchas

  • The script seems to barf if there are spaces in the filename.
  • You may need to logout and back in again after creating the bin folder, in order for it to be added to your PATH.
  • It appends the word 'shadow' in front of the filenames, which means you'll then need to rename them after. I'll work on changing that.

Installing the script

  • Install pngnq (a pre-requisite this script can use.

sudo apt-get install pngnq
  • Make a folder in your home directory called 'bin' to put the script in

Note: This folder has special significance in that if it exists it will be pre-pended onto the search path. This means if scripts/commands exist in this folder it will be possible to execute them from anywhere.

  • Download the shade.sh script attached to this page and save it to ~/bin.

  • Make sure it's executable.
    • Navigate to ~/bin in the file browser, right click shade.sh, select Permissions tab and choose 'Allow executing file as program'.

Using the script

  • Open a terminal (Applications --> Accessories --> Terminal)

  • Navigate to the folder containing the screenshots to have drop-shadow added (  cd ~/foldername  )

  • Execute the shade script

shade.sh *.png
  • You should end up with new images prefixed with "shadow", which have the drop-shadow applied.

Result

Before

Screenshot-alan_-_File_Browser.png

After

shadow.Screenshot-alan_-_File_Browser.png

Training/KnowledgeBase (last edited 2009-08-31 10:21:51 by 88-134-43-96-dynip)