#ubuntu-classroom 2007-02-26
<jrib> AMD-: hi
<jrib> synaptic is a package manager
<AMD-> hi jrib:
<AMD-> thats what i used to install it
<jrib> AMD-: package managers install things in places other than /usr/local.  Anything in /usr/local was installed manually by yourself
<jrib> AMD-: so, you have pkg-config installed through the package manager, and that gives you /usr/bin/pkg-config
<AMD-> ohh i truly dont remember
<jrib> AMD-: But, notice that you also have /usr/local/bin/pkg-config.  And that was *not* installed by the pacakge manager
<AMD-> ohh ok
<AMD-> any easy way to remove it
<AMD-> sudo remove mabe ?
<jrib> I don't know how it was installed.  Things that are installed with 'make install' aren't straight forward to remove really.  Usually you can try 'sudo make uninstall' in the same directory that 'sudo make install' was issued, or you can just rm all the files manually
<nalioth> be careful
<nalioth> jrib: what is the synopsis of the problem?
<jrib> AMD-: you can probably add the directories where /usr/bin/pkg-config looks to your PKG_CONFIG_PATH and then the /usr/local/bin/pkg-config will also look there, but I think it's better if you just remove this custom stuff you have in /usr/local
<jrib> nalioth: AMD- is compiling http://pastebin.ca/372208 but pkg-config can't find stuff because it's /usr/local/bin/pkg-config instead of the repo pkg-config
<AMD-> so im now going to cd to  /usr/local/bin/ and try and run sudo make unistall
<nalioth> AMD-: no
<jrib> AMD-: that won't work
<AMD-> ahhhhhh
<jrib> AMD-: how much stuff have you compiled on your own?
<AMD-> when i was trying to get this dependency issue sorted... i want looking for them on google i installed some thing like 7 packages
<AMD-> by them meaning the  Package requirements (gtkmm-2.4 >= 2.8.0 libglademm-2.4 >= 2.6.0 libxml-2.0 >= 2.6.0 )
<jrib> AMD-: ls /usr/local/bin    on pastebin please
<nalioth> nothing wrong with compiling your own stuff..... BUT it should be done with the right tools
<nalioth> !checkinstall
<ubotu> checkinstall is a wrapper to "make install", useful for installing programs you compiled. It will create a .deb package, which will be listed in the APT database and can be uninstalled like other packages. See https://help.ubuntu.com/community/CheckInstall - Read the warnings at the top and bottom of that web page, and DO NOT interrupt CheckInstall while it's running!
<AMD-> i also installed atk-1.0.0                  glib-2.0.0           gtk+-2.0.0
<AMD-> cairo-clock-0.3.2          glib-2.12.0          pango-1.0.0
<AMD-> cairo-clock-0.3.2.tar.bz2  glib-2.12.0.tar.bz2  pkgconfig-0.14.0
<nalioth> oooh
* nalioth covers eyes
<AMD-> that was before tho to do with some thing El's
<AMD-> many where not susecfully
<AMD-> only the clock was
<AMD-> i think*
<AMD-> :)
<nalioth> AMD-: the only reason you would get 'dependency errors' in the first place would be if you were using non ubuntu packages
<AMD-> i see
<AMD-> http://pastebin.ca/372331
<AMD-> what you asked for ^
<nalioth> i see non ubuntu packages in your /usr/local/bin that are critical to the system
<AMD-> joking
<AMD-> right?
<AMD-> lucky i saved a back up of my OS :)
<AMD-> shoud i  restore ?
<nalioth> restore?
<nalioth> have you upgraded your Ubuntu lately?
<nalioth> i don't thnik it's upgradable at this point
<AMD-> its all in a tar file
<nalioth> i don't think that's gonna work to well
<nalioth> but to each their own
<AMD-> http://www.ubuntuforums.org/showthread.php?t=35087
<nalioth> using non ubuntu debs brings in packages that have no update candidate (because they're not Ubuntu packages)
<nalioth> leaving the system half-way working and non-upgradable
<AMD-> i see i will be very carefull next time
<nalioth> when you compile your own libs and such, you are doing the same thing . . .
<nalioth> i compile and develop stuff all the time, all the depends are available in the Ubuntu repos
<AMD-> so will the backup work i dont see why it wont ?
<nalioth> i've never heard of backing up Ubuntu
<nalioth> i'd back up your /home/amd-/
<AMD-> mabe you can the help me to install what i was try to install in the first place
<AMD-> yeh i will
<nalioth> yes, we can help
<nalioth> jrib knows everything  :D
<AMD-> i know
<AMD-> hese helping so many people on #ubuntu
<AMD-> its amazing
<jrib> I don't think you need to reinstall, can't he just wipe /usr/local nalioth ?
<nalioth> jrib: if his system is using those glibs, what do you think will happen?
<AMD-> i just done a tar cvpzf backup.tgz /home
<jrib> nalioth: I think it will be fine, it'll just fall back to the stuff in /usr.  But he won't lose anything by trying before he does the reinstall
<nalioth> AMD-: you can rename /usr/local/bin, and restart
<AMD-> good idea
<AMD-> fingers crossed
* nalioth doesn't like deleting stuff right away
<jrib> rename /usr/local then
<AMD-> rename /usr/local/bin or /usr/local/
* jrib votes for    sudo mv /usr/local /usr/local.backup
<AMD-> i could have dont that my self
<AMD-> :(
<jrib> AMD-: what do you mean?
<AMD-> i wanted to rename it myself
<AMD-> i have done sudo mv /usr/local /usr/local.backup
<jrib> k
<jrib> try to compile your program now
<AMD-> system still working just going for a reboot
<AMD-> reboot or ?
<nalioth> jrib: one would reboot to clear any usage of the programs in /usr/local
<nalioth> AMD-: reboot, please
<jrib> k
<AMD-> ok great
<nalioth> ls
* nalioth waits
<AMD-> ok the backup is done
<AMD-> brb
<AMD-> hey
<jrib> hi
<AMD-> im back
<AMD-> workd
<AMD-> i mean i can log on
<jrib> k, what happens when you try ./configure now?
<AMD-> my beryl dose not work thou due to the scrips
<AMD-> ok one sec
<AMD-> checking for pkg-config... no
<AMD-> checking for DEPS... configure: error: The pkg-config script could not be found or is too old.  Make sure it
<jrib> AMD-: sudo aptitude install pkg-config
<jrib> you removed it before, remember?
<AMD-> right
<AMD-> checking for pkg-config... /usr/bin/pkg-config
<AMD-> checking pkg-config is at least version 0.9.0... yes
<AMD-> checking for DEPS... configure: error: Package requirements (gtkmm-2.4 >= 2.8.0 libglademm-2.4 >= 2.6.0 libxml-2.0 >= 2.6.0 ) were not met:
<AMD-> No package 'gtkmm-2.4' found
<AMD-> No package 'libglademm-2.4' found
<nalioth> AMD-: when it whines, search in apt for waht it wants, install the pkgs ending in -dev
<AMD-> i have just found gtkmm-2 dev in sypnatic
<AMD-> i did it
<AMD-> it worked
<AMD-> i didnt know of this place classrom
<AMD-> thank you guys
#ubuntu-classroom 2007-02-27
<quanchi> Hello
<pppoe_dude> hi quanchi
<quanchi> Ok
<pppoe_dude> quanchi: so, cd Desktop/ut2k41
<quanchi> I just started using Ubuntu today btw
<quanchi> ok
<quanchi> I did that
<pppoe_dude> now, ls -ll *sh
<quanchi> where the star goes do i put linux-installer?
<pppoe_dude> quanchi: nope
<quanchi> ok
<pppoe_dude> you could, but it's like a wild card so it shouoldnt matter
<quanchi> -rwxr-xr-x 1 quanchi quanchi 29627139 2004-03-04 03:52 linux-installer.sh
<quanchi> I get that
<pppoe_dude> hmm
<pppoe_dude> quanchi: try sh linux-installer.sh
<quanchi> its working!
<pppoe_dude> cool
<quanchi> now its strange
<quanchi> Im seeing the EULA
<quanchi> hmm
<quanchi> ok i got past that..
<pppoe_dude> quanchi: you should probably read the README or INSTALL file
<quanchi> im attemping to install to directory /usr/local/games/ut2004/
<quanchi> andI get
<quanchi> No write permission to /usr/local/games
<pppoe_dude> u need to be root to do that
<pppoe_dude> or change the permissions of the target director
<pppoe_dude> y
<quanchi> How do I become root?
<pppoe_dude> quanchi: i suggest you read the readme before you go further
<nalioth> oooh, not a good idea
<quanchi> Well
<nalioth> quanchi: forget "root".  this is Ubuntu
<quanchi> What is root anyhow
<pppoe_dude> sudo sh linux-installer.sh will do the trick, quanchi
<nalioth> ah, if you don't know what 'root' is, that is excellent
<pppoe_dude> nalioth: sorry i usually use the term 'root' as in 'sudo <something>'
<pppoe_dude> not root literally
<nalioth> it is unnessary in Ubuntu
<quanchi> Hmm
<quanchi> Another question
<nalioth> pppoe_dude: please instruct to the tune of Ubuntu :)
<quanchi> I allways see people saying "I need to learn sudo"
<quanchi> How do you learn it
<pppoe_dude> not much learning to do :)
<pppoe_dude> whenever you need to do something requiring privileges, you use sudo
<quanchi> This has been one of the most confusing days of my life
<nalioth> it'll get better
<quanchi> My highest goal is to enventually get Counter Stirke Source running under WINE
<pppoe_dude> quanchi: in the case of the script you are trying to run, sudo will run it with full permissions so that the script can do whatever it wants
<nalioth> unlike windows, once you learn this stuff, it doesn't change with each release
<quanchi> but im installing Ut2k4 right now to see if my video card drivers installed properly
<quanchi> does Sudo stand for something
<pppoe_dude> quanchi: i think "super user do" or somthing :)
<pppoe_dude> or switch user do
<nalioth> superuser do
<pppoe_dude> coz sudo is actually very versatile... check out 'man sudo'
<nalioth> 'switch user' is confusing on a single user system, n'est pas?
<quanchi> Ok
<pppoe_dude> nalioth: very true. i was used to having a root account for a long time
<quanchi> this game is on a few discs
<quanchi> its saying
<pppoe_dude> nalioth: but after breezy i just got used to sudo and it makes more sense ;)
<quanchi> Please mount the UT2k4 disc 2
<quanchi> i think ill start with inserting the disc..
<quanchi> Hmm
<pppoe_dude> quanchi: good idea
<quanchi> Where is it looking for disc 2 tough
<quanchi> i put it in
<quanchi> and hit yes
<quanchi> and nothing happens
<pppoe_dude> quanchi: might also wanna google 'ubuntu unreal tournament' see what you get
<quanchi> I have
<quanchi> Irc is allways my last resort lol
<pppoe_dude> quanchi: did the CD mount?
<pppoe_dude> quanchi: did you get a window with the CD contents?
<quanchi> yes I did
<pppoe_dude> quanchi: then i have no idea :) scripts like that are usually not very user friendly
<quanchi> Bah humbug
<quanchi> what ever
<pppoe_dude> read the read me
<quanchi> Are you any good with WINE?
<pppoe_dude> i;ve never used it
<quanchi> Damn
<quanchi> Because when I was on windows
<quanchi> Basicly all I did was play Counter Stirke and surf the web
<pppoe_dude> a lot of people in #ubuntu will have used it tho
<pppoe_dude> and, again... google
<nalioth> or #winehq
<quanchi> I know, Google is like
<quanchi> my best bud
<quanchi> Oh yeah
<quanchi> I went to download wine earlier
<quanchi> and there is no direct download link
<quanchi> its just confusing
<quanchi> http://www.winehq.com/site/download-deb
<pppoe_dude> quanchi: wine is in repos
<pppoe_dude> !wine
<ubotu> wine is a compatibility layer for running Windows programs on GNU/Linux. See https://help.ubuntu.com/community/Wine for more information.
<quanchi> what is repos?
<pppoe_dude> quanchi: it is apt-gettable
<pppoe_dude> quanchi: sudo apt-get install wine
<pppoe_dude> ^ will install wine with no hassle
<quanchi> Hmm
<quanchi> so I should type wget -q http://wine.budgetdedicated.com/apt/387EE263.gpg -O- | sudo apt-key add -
<quanchi> in the terminal
<pppoe_dude> no
<pppoe_dude> sudo apt-get install wine
<pppoe_dude> this will install the version that is known to work well with ubuntu and would not cause problems
<pppoe_dude> it will automatically download the packages and install them from the internet
<quanchi> sudo apt-get install wine
<quanchi> oops
<quanchi> Reading package lists... Done
<quanchi> Building dependency tree... Done
<quanchi> Package wine is not available, but is referred to by another package.
<quanchi> This may mean that the package is missing, has been obsoleted, or
<quanchi> is only available from another source
<quanchi> E: Package wine has no installation candidate
<pppoe_dude> !restricted
<ubotu> For multimedia issues, this page has useful information: https://help.ubuntu.com/community/RestrictedFormats - See also http://help.ubuntu.com/ubuntu/desktopguide/C/common-tasks-chap.html - But please use free formats if you can: https://help.ubuntu.com/community/FreeFormats
<pppoe_dude> oops
<pppoe_dude> quanchi: you need to modify your sources
<pppoe_dude> quanchi: which version of ubuntu are you using
<quanchi> Hmm
<quanchi> 6.10?
<quanchi> How can I make sure
<pppoe_dude> hmm
<quanchi> that im using 6.10
<pppoe_dude> quanchi: go to System->administration->sources
<quanchi> I dont see sources
<pppoe_dude> software sources* i think
<pppoe_dude> !info wine
<ubotu> wine: Microsoft Windows Compatibility Layer (Binary Emulator and Library). In component universe, is optional. Version 0.9.22-0ubuntu3 (edgy), package size 9001 kB, installed size 42452 kB
<quanchi> software properties?
<pppoe_dude> you have to check the universe repository
<quanchi> wtf is that?
<pppoe_dude> quanchi: go to system>admin>software sources
<quanchi> I only see software Properties
<quanchi> is that the same thing
<pppoe_dude> hmm
<pppoe_dude> quanchi: never mind that. we can do it from the command line
<quanchi> Roger that
<pppoe_dude> (i am using feisty and the control panel is different)
<quanchi> I see
<quanchi> Wait
<pppoe_dude> just type sudo nano /etc/apt/sources.list
<quanchi> feisty and Gnome
<quanchi> are they kinda the same thing?
<quanchi> or am i horribly wrong
<pppoe_dude> quanchi: feisty is ubuntu 7.04
<quanchi> ok
<pppoe_dude> sudo nano /etc/apt/sources.list
<quanchi> ok typed it
<pppoe_dude> uncomment the lines that end with universe
<pppoe_dude> i.e. remove the '#' character from the beginning
<quanchi> ok
<pppoe_dude> done?
<quanchi> No, I just started
<pppoe_dude> then, control+O and control+X
<quanchi> Why remove these
<pppoe_dude> quanchi: these will provide you with more software sources
<pppoe_dude> and will enable you to install wine easily
<pppoe_dude> *control+O then enter
<pppoe_dude> then control X\
<quanchi> Hmm
<quanchi> O or 0
<quanchi> is that a zero?
<pppoe_dude> O not 0
<pppoe_dude> not a zero
<quanchi> ok
<quanchi> OK
<quanchi> I did ctrl+o
<quanchi> and the crtl+x
<pppoe_dude> then enter
<pppoe_dude> no you gotta press enter after control o to save the file
<quanchi> [Wrote 33 lines] 
<pppoe_dude> ok good.. control x now to exit
<quanchi> I closed it allready
<pppoe_dude> ok
<pppoe_dude> quanchi: sudo apt-get update
<pppoe_dude> this will update the computer with the new software sources
<pppoe_dude> i.e. allow you to install packages from the universe repository
<quanchi> I allready updated Ubuntu
<nalioth> pppoe_dude: <Sigh>
<nalioth> pppoe_dude: always advise "universe multiverse"
<quanchi> What do you mean
<pppoe_dude> quanchi: apt-get update will update the sources not the computer, as to give you more software sources
<quanchi> I see
<pppoe_dude> quanchi: also, you might wanna do the same "uncommenting" for the multiverse repository
<quanchi> what is multiverse
<pppoe_dude> quanchi: multiverse provides additional packages you might need later on
<quanchi> i typed what you said
<quanchi> sudo apt-get update
<pppoe_dude> ok, now apt-get install wine
<quanchi> did a bunch of stuff
<pppoe_dude> sudo apt-get install wine
<pppoe_dude> and you should be set to go
<quanchi> when I ran the first one
<quanchi> It said this at the end
<quanchi> PG error: http://wine.budgetdedicated.com edgy Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 58403026387EE263
<quanchi> W: You may want to run apt-get update to correct these problems
<pppoe_dude> hmmmm
<pppoe_dude> quanchi: did you mess with the file before?
<quanchi> I havent messed with anyfiles
<quanchi> are you talking about the file we took the "#"s out of ?
<pppoe_dude> quanchi: yes
<quanchi> how do i get to that file agian/
<quanchi> ?
<pppoe_dude> sudo nano /etc/apt/sources.list
<quanchi> Because I dont think that the "#"s are gone
<quanchi> I can still see them
<pppoe_dude> u need to comment out that budgetdedicated repo
<pppoe_dude> !multiverse
<ubotu> The packages in Ubuntu are divided into several sections. More information at https://help.ubuntu.com/community/Repositories and http://www.ubuntu.com/ubuntu/components - See also !EasySource
<pppoe_dude> plz read the above links
<nalioth> pppoe_dude: 'multiverse' needs to be written in, that word doesn't exist in a default sources.list
<quanchi> Linux is so hard....
<quanchi> Why do you use linux and not windows?
<pppoe_dude> nalioth: nalioth it is for me
<pppoe_dude> nalioth: deb http://ca.archive.ubuntu.com/ubuntu/ feisty multiverse
<quanchi> Why did you link me to that
<pppoe_dude> but maybe feisty is different
* pppoe_dude has a terrible memory for everything
<pppoe_dude> quanchi: so you can better understand how it all works
<quanchi> You want me to download feisty multiverse?
<pppoe_dude> quanchi: no that was directed at nalioth
<quanchi> Oh ok
<pppoe_dude> its a line in my feisty sources.list
<pppoe_dude> anyway
<quanchi> Ok lets get back to installing wine
<quanchi> when I open up my sources.list
<pppoe_dude> quanchi: i suggest you google 'source o matic', click the first link and make yourself a nice sources.list file
<quanchi> should I not see the  "#"s
<quanchi> what exactly is a sources.list file
<nalioth> pppoe_dude: ARGH.  you should help to the lowest common denominator
<pppoe_dude> i see
<nalioth> not everyone runs $UBUNTU-CURRENT
<pppoe_dude> nalioth: i couldn't remember if mltiverse was in the default sources.list file
<pppoe_dude> afaik it was coz i never remember adding it manually
<quanchi> what do I do with this source list I just got from ubuntu.nl/sourc-o-matic
<nalioth> help to the level of the oldest current distro
<pppoe_dude> quanchi: did you tick the multiverse and universe?
<quanchi> What do you mean
<pppoe_dude> and did you select the right ditribution? i.e. edgy in your case?
<quanchi> Yes I did
<pppoe_dude> quanchi: there are options to add extra sources
<quanchi> should I add them all?
<nalioth> i'd not.
<pppoe_dude> oh nm
<pppoe_dude> quanchi: no
<nalioth> you can always go back later
<quanchi> Oh I see...
<pppoe_dude> sorry they mustve changed that script since the last time i went there
<quanchi> "Tick this box"
<quanchi> wtf... tick
<pppoe_dude> quanchi: just the default should be fine
<quanchi> ok
<quanchi> ok so what do I do with this
<pppoe_dude> then copy and past the file into a new sources.list
<pppoe_dude> and move the old one to sources.list.backup
<quanchi> sources.list I just created
<quanchi> ok
<quanchi> where is my sources.list located?
<pppoe_dude> basically, sudo mb /etc/apt/sources.list /etc/apt/sources.list.backup
<pppoe_dude> then, sudo nano /etc/apt/sources.list
<pppoe_dude> and paste the new file in it
<quanchi> ok
<pppoe_dude> then ctrl-o ctrl-x
<pppoe_dude> *sudo mv
<pppoe_dude> not mb
<nalioth> quanchi: it's "sudo mv" not "sudo mb"
<quanchi> ok
<quanchi> yeah cause it was saying sudo: mb: command not found
<pppoe_dude> after you finish, do a 'sudo apt-get update
<pppoe_dude> '
<nalioth> quanchi: ummm read what i just wrote
<quanchi> ok ok ok
<quanchi> so im in my new sources .list
<quanchi> now
<pppoe_dude> paste and save it
<quanchi> I paste what I got from the ubuntu site
<quanchi> wierd
<pppoe_dude> quanchi: i need to sleep soon, but basically after you save it, do sudo apt-get update
<quanchi> when I paste it
<quanchi> it doesnt paste the first like 9 lines
<pppoe_dude> hmmm
<quanchi> i think i got it thogh
<pppoe_dude> quanchi: quit nano and just do sudo gedit /etc/apt/sources.list
<pppoe_dude> might be easier for you to use gedit
<quanchi> ok i did it
<quanchi> so I save this
<quanchi> how
<quanchi> ctrl o?
<quanchi> then enter
<quanchi> then crtl x to quit
<quanchi> right
<quanchi> ?
<pppoe_dude> ya
<quanchi> ok
<pppoe_dude> sudo apt-get update
<quanchi> [ Error writing /ect/apt/sources.list: No such file or directory
<quanchi> when i hit ctrl o
<quanchi> i get that
<pppoe_dude> /etc/apt/sources.list
<quanchi> Im still in my source.list
<quanchi> atemping to save it
<pppoe_dude> control o
<pppoe_dude> then change the name to /etc instead of /ect
<pppoe_dude> /etc/apt/sources.list
<pppoe_dude> then enter
<quanchi> thats the directory it is
<quanchi> File Name to Write: /ect/apt/sources.list
<quanchi> then I hit enter
<pppoe_dude> you have a typo there
<quanchi> and get
<quanchi>  [ Error writing /ect/apt/sources.list: No such file or directory ] 
<quanchi> realy
<quanchi> what does it need to say
<pppoe_dude> you should have /etc
<pppoe_dude> not /ect
<quanchi> save file under DIFFERANT NAME?
<pppoe_dude> /etc/apt/sources.list not /ect/apt/sources.list
<pppoe_dude> quanchi: ya it didnt write anything yet
<pppoe_dude> just change the name
<quanchi> OK I did it
<quanchi> damn, wonder how that typo got in there
<quanchi> anyways
<quanchi> what now
<quanchi> ive got a shiny new sources.list
<pppoe_dude> sudo apt-get update
<quanchi> ok, its updating
<quanchi> What exactly am I updating here
<nalioth> quanchi: if you added the words 'universe and multiverse' you are updating your capabilities to about 28,000 programs
<pppoe_dude> just the available package list
<nalioth> from around 3000
<quanchi> ok ok ok
<pppoe_dude> quanchi: now, sudo apt-get install wine
<quanchi> W: GPG error: http://wine.budgetdedicated.com edgy Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 58403026387EE263
<quanchi> W: You may want to run apt-get update to correct these problems
<pppoe_dude> and /me need to sleep :)
<pppoe_dude> :S
<pppoe_dude> quanchi: what?
<pppoe_dude> lol
<quanchi> i thnk its working now
<quanchi> installing wine
<quanchi> when this is done
<quanchi> I should just be able to type
<quanchi> wine
<pppoe_dude> quanchi: apt-get update should not give any errors after this
<pppoe_dude> ya
<quanchi> well wine seems to be installing
<pppoe_dude> well...
<pppoe_dude> read man wine
<quanchi> man wine?
<pppoe_dude> type that in a command line (q to exit) to see how to use wine
<nalioth> or join #winehq
<quanchi> I see
<quanchi> nalioth
<quanchi> You know your way around wine?
<pppoe_dude> quanchi: sorry my support is fairly sketchy but its 3am here and im uber tire
<pppoe_dude> d
<nalioth> i do not.  i run incompatible hardware
<quanchi> thats fine
<quanchi> Its been helpful
<quanchi> Incompatible hardware eh
<quanchi> what kinda rig you have?
<quanchi> pppoe-dude, you may sleep now, thanks for all the help
<nalioth> dual G5 powermac
<pppoe_dude> np quanchi
<quanchi> whoa, linux on a mac
<nalioth> yep
<quanchi> Hmmm
<quanchi> well I think i just got wine to work
<quanchi> i
<quanchi> im going back to #ubuntu
<luzhin_> #chatzilla
<jatem> buen dia(good morning)
<luzhin> totem wont play streaming video, media file was not recognised
<luzhin> not allowed to move file to user/local?  I installed it! fix permissions
#ubuntu-classroom 2007-02-28
<Glombool> alright
<jrib> Glombool: your script works fine, it just doesn't do what you want it to
<Glombool> ok...
<Glombool> This is the command... export PATH=/media/UNIVERSAL/oe/bitbake/bin:$PATH
<jrib> PATH will be set in the script
<Glombool> ah
<jrib> not outside of it
<Glombool> ok, that makes sense...
<jrib> just like if you run 'bash' inside bash.  Then expor FOO=BAR, and exit the inside shell, your outside shell won't be affected
<jrib> Glombool: is this just for your user or system wide?
<Glombool> Do I need to use curly braces {$PATH}?
<jrib> no...
<Glombool> Just for my user
<Glombool> ok
<Glombool> I was thinking about adding it to .profile
<Glombool> I need to to happen pretty much every time I open the shell
<jrib> Glombool: .bashrc if you want a file that is sourced everytime a shell opens, .bash_profile for a file that gets sourced on login shells, and .xprofile if you want something that gets sourced at gdm logins
<jrib> man bash  for all the exciting details
<Glombool> :) ok
<jrib> I'm not sure when/what reads .profile
<jrib> Glombool: btw, the script you wrote would work if you source it:  source foobar  or  . foobar
<Glombool> .profile is "executed by Bourne-compatible login shells"
<jrib> k
<Glombool> Okay...
<Glombool> so if I do "source scriptname" that will work?  Is that what you mean?
<Glombool> I'm somewhat new to the whole scripting thing (obviously)
<jrib> yes, but I recommend you use the appropriate file I mentioned above if you want this to be a permanent thing
<Glombool> right.
<Glombool> If I use .bashrc can I then use "export PATH=/stuff/bitbake/bin:$PATH" and it should work?
<jrib> should
<Glombool> ok, I'll give it a shot.
<Glombool> thanks for the help
<nalioth> jrib: thanks for the help
<jrib> nalioth: anytime!
* Starting logfile irclogs/ubuntu-classroom.log
<spinserr> ye ?
<spinserr> jrib: look where to go what to do but please i want to sudo works
<spinserr> :S
<jrib> spinserr: ok are you in a GUI now?
<spinserr> yep
<jrib> spinserr: type this command:  gedit /etc/hosts
<jrib> then copy and paste the contents and put them on http://paste.ubuntu-nl.org
<jrib> then do the same with /etc/hostname
<spinserr> http://paste.ubuntu-nl.org/8004/
<spinserr> that is gedit /etc/hosts
<spinserr> i have nothing in there i guess i can't open that
<spinserr> in /etc/hostname i have just writed: hostname
<spinserr> ohh
<spinserr> here i find the hosts
<spinserr> look
<spinserr> http://paste.ubuntu-nl.org/8005/
<spinserr> this is it
<spinserr> and pelase tell me now what to edit where and how
<spinserr> jrib: are you here ?
<jrib> yes
<spinserr> so what to edit ?
<spinserr> a
<jrib> spinserr: you need to edit /etc/hostname
<jrib> spinserr: make it say "badwarrior-desktop" without the quotes
<spinserr> You do not have the permissions necessary to save the file. Please, check that you typed the location correctly and try again.
<spinserr> i can't edit it
<jrib> SpudDogg: right, you need to reboot.  Then choose "recovery mode" at the grub prompt.  Then to edit the file, use this command:  nano /etc/hostname
<jrib> then reboot
<jrib> SpudDogg: to save in nano btw, you press:  ctrl-o and then to exit: ctrl-x
<spinserr> ok
<spinserr> wait
<jrib> umm
<SpudDogg> hey, how did this guy mess up those files?
<SpudDogg> jrib: i guess a better question is:  is there actually a need to ever edit those files?
<jrib> SpudDogg: if you want to change your hostname.  but the GUI way is much safer
<jrib> !hostname
<ubotu> Use hostname <somehostname> to set the hostname, or to do it permanently: edit /etc/hostname  and /etc/hosts . WARNING! Make sure that your current hostname and /etc/hosts match, otherwise sudo may not work properly. Alternatively, use the gui at system>administration>networking on the "General" tab
<SpudDogg> i see.  thanks
<spinster> jrib: thanks now work it sudo
<spinster> but lok
<spinster> when i open terminal look i have
<jrib> k
<spinster> badwarrior@badwarrior-desktop:~$
<jrib> yes?
<spinster> can i type the hostname to be badwarrior@linux-edu ?
<spinster> a
<jrib> sure, go to  system > administration > networking on the "General" tab
<spinster> and restart pc ?
<jrib> no
<jrib> well, I don't think so
<spinster> so ?
<jrib> so it should just change
#ubuntu-classroom 2007-03-01
<researcsci> if anyone that is on would be willing to help me with the RT61 wifi drivers in edgy, I would greatly appreciate it
<researcsci> any help would be greatly appreciated
<nalioth> researcsci: have you asked in #ubuntu ?
<nalioth> one usually is invited here by someone for in depth help
<researcsci> yeah, no replies over there
<nalioth> have you /msg ubotu wireless
#ubuntu-classroom 2007-03-02
<arielexchile> hello
<arielexchile> i need help please
<GaiaX11> arielexchile: I you need help about technical issues go to #ubuntu please.
<GaiaX11> arielexchile: If you ...   :-)
<arielexchile> thanks
<arielexchile> i am going
<ooodze> gentlemen, is there a way to restore or reinstall gdm in ubuntu. it crashed with no reason. here are the pictures of the system messages http://foto.inbox.lv/rodels/gnomei_pisec . sorry, locale is LV
<nalioth>  sudo apt-get install --reinstall gdm
<ooodze> nalioth, is it data safe?
<nalioth> ooodze: what do you mean?
<ooodze> nalioth, i mean, how much of my data and settings loose
<nalioth> ryanakca_: are you here?
<nalioth> ooodze: none
<ooodze> nalioth, how about files on my desktop?
<nalioth> ooodze: you're just reinstalling gdm, you'll be fine
<ryanakca_> nalioth: yes
<nalioth> ryanakca: can you explain your out-of-control behaviour earlier?
<ryanakca> hmm?
<ryanakca> Ah, yes
<nalioth> you've been banned in several places
<ryanakca> What happened: We had an ice storm. Power flickered (Goes off just enough to turn off lights, monitor, router, etc). Router goes off, so my connection does to. I reconnect. Then konversation's auto-who bug/thing /whos all the channels I'm in. Causing excess flood
<ryanakca> Over and Over again
<ooodze> nalioth, thank you, sir.
<ryanakca> nalioth: richih took care of it
<tonyyarusso> ryanakca: Yeah, some friends of mine out there were talking about ice - we got mostly snow back in MN.
<tonyyarusso> (a few feet)
* ryanakca turned off the reconnect feature on konversation... so... it shouldn't happen again. The auto-who thing has been fixed in Konversations SVN, so, it shouldn't be a problem once kubuntu updates the package
<ryanakca> s/"Konversations"/"Konversation's"
<nalioth> ryanakca: what happened?
<ryanakca> to what?
* ryanakca explained what happened in general, and why it shouldn't happen again
<nalioth> ah
<ooodze> nalioth: it didn't help
<ryanakca> tonyyarusso: back in MN already? hmm... still coming to kingston in 2009/2008?
<tonyyarusso> ryanakca: Not sure...plans have changed a bit.  Maybe I'll swing by sometime anyway though.
<ryanakca> ah, nice 
<ooodze> gentlemen, why can't i reinstall gdm http://paste.ubuntu-nl.org/8283/
<nalioth> ooodze: find the deb file in /var/cache/apt/archive for the gdm
<nalioth> and run dpkg on it directly
<ooodze> nalioth: oh, sounds to difficult for me. what exactly should i type?
<nalioth> ooodze: are you using dapper or edgy?
<ooodze> nalioth i cant switch to terminal now and then switch back again, because i run opera from some weird small terminal window on lower right corner of screen. I am using EDGY
<ooodze> and i can't run even gedit, so i typed the message in pastebin after i wrote it on paper
<nalioth> ooodze: run "sudo dpkg -i /var/cache/apt/archives/gdm_2.16.1-0ubuntu4.1_i386.deb"
<ooodze> allright
<ooodze> is it ok if ill return and ask for advice again if something fails?
<nalioth> ooodze: it will fail.
<nalioth> you can paste the errors to a pastebin
<ooodze> nalioth: well. why it will fail?
<nalioth> we'll see when you run the command
<ooodze> nalioth, it said there isn't that file, but i am pretty sure i retyped the name correct
<nalioth> ok, i don't run edgy.  type "sudo dpkg -i /var/cache/apt/archives/gdm<TAB KEY>"
<ooodze> nalioth, probably the problem started with latest update i made. it was package named ubuntu-docs
#ubuntu-classroom 2007-03-03
<ooodze> nalioth: no positive results
<nalioth> ooodze: have you asked about this in #ubuntu ?
<ooodze> the same error messages i typed in pastebin before
<nalioth> that's not possible.  using dpkg should give you a specific error
<ooodze> nalioth: nobody answered
<ooodze> nalioth: could it be possible that dpkg utility is broken in some way?
<ooodze> could reinstall of ubuntu-desktop help?
<nalioth> i doubt it
<nalioth> ubuntu-desktop doesn't have dpkg in it
<ooodze> maybe it is harddisk error?
<nalioth> i don't think you are issuing the correct command.
<ooodze> or again - because of ubuntu-docs
<ooodze> nalioth: how can i proof you about that command
<ooodze> i've done exactly what you said
<nalioth> ooodze: dpkg will return a specific error, not a generic one
<ooodze> but i can't copy/paste it elsewhere
<nalioth> what did the error say?
<ooodze> i'll do it again, nalioth
<ooodze> nalioth: the same error messages + segmentation fault (core dumped)
<nalioth> ooodze: ask in #ubuntu
<nalioth> there are hundreds of helpful people there
<ooodze> nalioth: could you copy pastebin link and pictures of screen-photos from chan window
<nalioth> can you log into kubuntu, ooodze ?
<ooodze> nalioth: i do not have kubuntu-desktop
<ooodze> nalioth: should i apt-get it?
<nalioth> ooodze: installing it would get you kdm + kde (where you can see what is going on)
<ooodze> nalioth: i am affraid, it will give the same dpkg errors
<nalioth> i think you have some major problems, ooodze.  please ask in #ubuntu as i am only one person, and don't have unlimited experience
<ooodze> nalioth: sudo apt-get kubuntu-desktop kdm kde ?
<nalioth> kubuntu-desktop will bring all of it in
<ooodze> okee. bye. it sounds a huge downloads. and it's already 1:30am in Latvia
<ooodze> thank you for nice chattin
<slyfox> What can I use to limit access to a computer for certain users at certain times ?
<jojoman02> slyfox: ok first thing are you on the pc that you want to set this up on?
<slyfox> jojoman02: yes
<slyfox> Not at the moment htough
<jojoman02> can you get on it now?
<jojoman02> or write this down
<slyfox> jojoman02: yes, let me write it down
<jojoman02> to install the program type: -->               sudo apt-get install timeoutd
<jojoman02> make sure to include the d
<slyfox> ok
<jojoman02> that will install the program
<jojoman02> now there will be a file you need to edit called /etc/timeouts
<slyfox> ok
<jojoman02> you do this by type the following:    sudo gedit /etc/timeouts
<slyfox> ok
<jojoman02> then a file will pop up and it has some basic instructions
<jojoman02> if you tell me the username and time you want to set it up on i can tell you what to type in
<jojoman02> make sure you don't delete any of the lines starting with #
<slyfox> user name:  user    and say weekdays from 6am till 10pm
<jojoman02> and add the line i give you below the lines starting with # sign
<jojoman02> slyfox: so sat and sun unlimited access (meaning all day & night?)
<slyfox> jojoman02: untill 1am
<jojoman02> slyfox: lemme do the first, i'm not sure how to set up the second access time
<slyfox> jojoman02: let me install timeoutd on my laptop I want to see waht thsi file looks like
<jojoman02> or maybe never mind i think we can make 2 lines for same users one sec
<slyfox> I see 2: timeout and timeoutd   what is the difference ?
<jojoman02> ohh btw if you type man timeouts in a terminal it will give you instructions on editing the file
<jojoman02> u know about the terminal right?
<slyfox> yes
<jojoman02> 6am-10pm mon-fri            right?
<slyfox> yes
<jojoman02> do you want to set a maximum number of minutes/hours they can log on per day
<jojoman02> like from 6-10 i want only 5 hours of computer time??
<slyfox> jojoman02: yes, say 2.5 hours ?
<jojoman02> kk
<jojoman02> it's in min so 150 min
<slyfox> ok
<jojoman02> how long u want a warning before logging the user off?
<jojoman02> 10 min?
<jojoman02> Wk0600-2200:*:user:*:*:150:150:10
<jojoman02> you put that line it
<jojoman02> change the user line of the username is diff :)
<slyfox> 10min
<jojoman02> to make another line for Sa and Su you do the same except for the first thing u put
<jojoman02> SaSu0600-2200:*:user blah blah blah
<slyfox> aha, got it Wk Sa Su  are the days
<jojoman02> those 150:150 is how long users are allowed to login for the day
<jojoman02> yeah it's all explained in --> man timeouts
<jojoman02> and man timeoutd
<jojoman02> man means manual
<slyfox> why is it twice?  150:150  not jsut 150 ?
<jojoman02> once per session
<jojoman02> lets say you want only 30 min per login
<jojoman02> but 90 min per day
<slyfox> ahhh
<slyfox> got it
<slyfox> Wonder why or how would that be used ?
<slyfox> To make the user take breaks ?
<jojoman02> with idle times
<jojoman02> it's all in the manual
<slyfox> aha
<jojoman02> just takes a while to figure out
<jojoman02> the time is in army time (24 hours time)
<jojoman02> as u figured
<jojoman02> one user can have multiple rules
<jojoman02> so make another rule for sat/sun limits
<jojoman02> or any other users u need
<slyfox> interesting
<slyfox> I think I got the basics of it
<jojoman02> the timeoutd runs at startup and monitors the rules file every min
<slyfox> I will read more in the manual
<jojoman02> to check if anyone is logged in that is not supposed to be
<jojoman02> so even if they can login within a min they will get forcefully logged out, on the min :)
<slyfox> what is the difference between timeout and timeoutd ?
<jojoman02> timeout is the program that sends the shutdown command
<jojoman02> and timeoutd is the program that monitors
<jojoman02> like lets say u were running a server and wanted to kick off a certain user that you didn't make a rule for, you would use timeout to do it
<jojoman02> sort of temporarily
<slyfox> so both need to be installed ?
<jojoman02> if it was a weekly/daily thing u would need a deamon
<jojoman02> yes
<jojoman02> but timeoutd installs timeout
<jojoman02> it's a dependancy
<slyfox> Excellent.,
<jojoman02> cuz timeoutd sends the command to timeout automatically based on the rules file /etc/timeouts
<jojoman02> :)
<jojoman02> u know how to edit files right?
<jojoman02> make sure the user that you are talking about does not have ability of sudo'ing
<jojoman02> cuz then he can modify the /etc/timeouts file
<jojoman02> you do taht in system-> administration -> users
<slyfox> yeah
<jojoman02> uncheck administer the system in privelages
<slyfox> one otehr question
<jojoman02> kk
<jojoman02> shoot
<slyfox> when some other user is lgged in and I come in and want to do some administratror commands or wahtever, can I do that? becasue when I type in sudo osmething and it asks me for the password and I enter mine, it tell me that the apssword is wrong
<jojoman02> when you are logged in as another user
<slyfox> yes
<slyfox> but that user is not an admin user
<jojoman02> u either need to switch users
<jojoman02> or use a virtual terminal (ctrl+alt+f1)
<slyfox> like start a new session you mean
<jojoman02> f1 through f7 will work
<slyfox> Cool
<jojoman02> f7 is the desktop
<jojoman02> actually
<jojoman02> it's running on vt7
<slyfox> so f1 should work
<jojoman02> ctrl+alt+f1
<jojoman02> use your username and login
<jojoman02> you could even run a session
<jojoman02> but that is a little more complex
<jojoman02> and u can't run gui tasks in a virtual terminal
<jojoman02> but u can sudo anything
<jojoman02> or use nano to edit files
<slyfox> jojoman02: sudo would be enough for now
<jojoman02> it takes some getting used to
<jojoman02> better to just tell them to wait and you switch users, login and admin what you need to then logout and log back into their accounts
<slyfox> Ok, thank you very much for all you help. I will write all of this down. I have a learned today.
<jojoman02> slyfox: your welcome :)
<jojoman02> slyfox: it's not that hard once you get used to the way things work:)
<jojoman02> slyfox: in linux i mean :)
<slyfox> jojoman02: oh yeah
<slyfox> I start to enjoy Linux more and more every day
<jojoman02> don't forget to read man
<slyfox> yes, lots of reading
<slyfox> Its fun when you finally get things working.
#ubuntu-classroom 2007-03-04
<hjmf> @schedule madrid
<bjames> soundray: hi?
<soundray> Hi
<soundray> Which part of the Recovering... page have you used?
<bjames> soundray: right I have two IDE drives (hda1 - 160G and hda2 = 40G) there are three partitions - hda1 = / and swap and hda2 = /media/hda2
<ammz> Classroom hi
<bjames> soundray: the first part
<bjames> using hda(0)
<bjames> hda(0 )
<bjames> setup (hd0) even
<bjames> just to be clear I'm doing it again I'll do each step and tell you how it goes
<bjames> 1. LiveCD is now booting
<ammz> bjames are you installing Ubuntu?
<bjames> I've already installed it
<ammz> ow ok... What do you need help with :D
<bjames> 6.06 LTS on x86
<soundray> ammz: trying to install grub to MBR
<ammz> ok... ehm good luck :D
<bjames> I'm just confused that as the disk doesn't have any other OS why did Ubuntu not put the bootloader in the MBR anyway?!
<bjames> right I have a terminal
<bjames> sudo -i
<soundray> bjames: you're right, it should have
<bjames> grub
<ammz> *cry* i wanna learn linux o.o!!!
<soundray> bjames: open another one and run 'tail -f /var/log/syslog' please
<bjames> find /boot/grub/stage1
<bjames> ok
<soundray> !cli > ammz, read pm pls
<ammz> !cli
<ubotu> The linux terminal or command-line interface is very powerful. Open a terminal via Applications -> Accessories -> Terminal (Gnome) or K-menu -> System -> Konsole (KDE).  Manuals: https://help.ubuntu.com/community/BasicCommands
<ammz> oh
<ammz> sorry i ment advanced linux
<soundray> ammz: please, we joined this channel in order to have less noise.
<ammz> powerful shell scripts and so on
<bjames> root (hd0,0)
<soundray> ammz: search the web for "abs bash"
<ammz> it's text.... but i get what you mean.. i'll shut up
<bjames> it tells me the FS is reiserFS (true) partition type 0x7
<bjames> setup (hd0)
<bjames> ??
<soundray> bjames: I think you're on the wrong part of the page
<ammz> soundray do you know a good firewall?
<soundray> bjames, go to "Using the Desktop/LiveCD and Overwriting the Windows bootloader"
<soundray> telephone
<bjames> ok I'll do that and see how I get on
<bjames> ok, something is definately wrong - when I run fdisk -l it states that the drive that should contain Linux is of type HPFS/NTFS
<bjames> soundray: I'm thinking I might need to start over, doing something different?
<bjames> soundray: ?
<bjames> soundray: I've repartitioned the devices so they appear correctly when issuing "fdisk -l" - I'm going to reinstall and let you know how it goes
<soundray> bjames: sorry about the interruption
<soundray> I hope you'll get it working this time
<bjames> soundray: not at all, thanks for the help thus far
<bjames> soundray: it's odd that the installer mangled the partition info
<soundray> Yes, it is...
<soundray> In any case, you seem to have a good plan -- good luck
<bjames> soundray: cheers
#ubuntu-classroom 2008-02-25
<forsaken> this the cool room to idle in now? :)
<runst8> yes
<tonyyarusso> Zelut: Erm, since you had the chat in gobby, where are the logs?
<Zelut> tonyyarusso: logs will end up on the wiki by weeks end.
<tonyyarusso> Zelut: ah, all right
<runst8> heya folks
<ompaul> runst8, there is no class in session
#ubuntu-classroom 2008-02-26
<ejdijd> hi
<ejdijd> is this a good placd to help?
#ubuntu-classroom 2008-02-27
<soundray> Hi s2a
<s2a> soundray, hi
<soundray> Give me two of your 14 filenames please
<s2a> 12*
<s2a> the first is 0007 then 0008 then 0009 and so on to 0022
<s2a> well
<icesword> !packages
<ubotu> You can browse and search for Ubuntu packages using !Synaptic, !Adept, "apt-cache search <keywords or regex>", the "apt:/" URL in KDE, or online at http://packages.ubuntu.com - Ubuntu has about 20000 packages available, so please *search* for an official package before installing things in awkward ways!
<soundray> What  kind of video file are they?
<s2a> soundray, wat im trying to do is make one video repeat so i copy pasted it like alot of times (15 not 12 actually) and renamed them
<icesword> yeah,20000
<soundray> icesword: /msg ubotu packages
<s2a> well merging should do the same anyway, so ya, help plz :)
<soundray> s2a: most players let you loop a video
<s2a> well isnt it safer to just combine the same video copy pasted alot of times?
<soundray> s2a: okay, let's not discuss the rationale, just try the cat thing:
<soundray> cat 0007 0008 >merged
<s2a> soundray, how do i do it again?
<icesword> see
<soundray> ^ this command creates a file called merged, which should contain your clip twice.  Open it in kino or anywhere to see if it has worked
<soundray> s2a: are you trying that?
<s3a> soundray, sry internet disconnected (dial-up)
<s3a> it says there is no such file or directory
<soundray> Did you run the command I suggested?
<soundray> cat 0007 0008 >merged
<s3a> i ran exactly "cat 0007 0008 >merged"
<s3a> without quotations
<soundray> Do a 'ls' to see if the file "merged" is there
<s3a> i see the word merged
<s3a> do u have msn messenger so i can load u with results?
<soundray> s3a: that means the file is there
<soundray> not necessary
<s3a> were is it?
<soundray> Run 'pwd' to see the path to it
<s3a> in examples?
<s3a> the file called merge is an empty text file
<s3a> brb in 2 min
<s3a> im bak
<soundray> s3a: are 0007 and 0008 empty, too?
<s3a> 0007 and 0008 are like 2 second video files each
<soundray> s3a: and are those the actual names, or is there an extension like .avi missing?
<s3a> soundray, its avi but for some reason i dont think they r bcuz of the fact that it doesnt work in windows
<soundray> s3a: well, avi is just a container -- maybe you don't have the necessary codecs in Windows.
<soundray> What do you get from 'ls 0007*'?
<s3a> ls: 0007*: No such file or directory
<soundray> s3a: then you have to cd to the directory where you saved those video files.
<soundray> s3a: where are they?
<s3a> on my desktop in a folder called teliose
<soundray> s3a: so do a 'cd ~/Desktop/teliose'
<soundray> Then, what do you get from 'ls 0007*'?
<s3a> ls: 0007*: No such file or directory
<soundray> s3a: what does 'pwd' give you?
<s3a> /home/deniz
<soundray> You haven't done 'cd ~/Desktop/teliose'
<s3a> well no ofense but u dint say do that
<soundray> Hello?
<soundray> Yes I did
<soundray> [10:18] <soundray> s3a: so do a 'cd ~/Desktop/teliose'
<s3a> maybe that was exactly wen my modem got disconnected?
<s3a> ok so now
<s3a> deniz@deniz-desktop:~/Desktop/teliose$
<soundray> Then, what do you get from 'ls 0007*'?
<s3a> a green 0007
<soundray> s3a: now do a 'cat 0007 0008 >merged' and try playing "merged".
<s3a> oops 0007 is not the file i wanted but i thinks its working im watching to see if it worked with merging the previous video to one of the ones i wanted
<s3a> no
<s3a> merged has only 0007
<soundray> s3a: okay, cat doesn't seem to work with the type of video file that you have. I can't help you in that case.
<s3a> soundray, isnt there a gui alternative?
<s3a> :(
<s3a> ok thx for trying
<s3a> ill go to cinelerra's channel
#ubuntu-classroom 2008-02-28
<effi> hello
<thoreauputic> hi
<effi> so what do i have to do exactly ?
<effi> since i cant download it through synaptic
<soundray> Do you have "Applications Places System" at the top left of your screen?
<effi> no
<effi> its down on my screen ;)
<effi> bit its there :)
<effi> *but
<soundray> Click on System and go to Administration-Software Sources
<soundray> Enter your password if required
<effi> there is no "Administration-Software"
<soundray> effi: have you installed Kubuntu by any chance?
<effi> no
<effi> only ubuntu
<soundray> Are you running gnome?
<effi> sorry
<effi> hmm ... good question... i just installed the ubuntu as it is on the ubuntu homepage
<thoreauputic> effi, System - Administration - Software Sources ?
<thoreauputic> should be there...
<soundray> Ubuntu has gnome as the desktop environment by default. It's strange that you haven't got those menus at the top of the screen
<effi> ah
<effi> jep
<effi> i just have the german version
<thoreauputic> ah
<effi> so its sometimes named different
<thoreauputic> found it?
<effi> jep
<soundray> HÃ¤ttst Du was gesagt :)
<effi> :D
<effi> ja ich habe mich auch bisschen blÃ¶d angestellt
<thoreauputic> so add all possible sources :)
<soundray> effi: universe is the source you need for freeciv
<thoreauputic> OK - I'll leave it to you - I have no German :))
<soundray> Thanks thoreauputic
<thoreauputic> :)
<effi> universe? ^^
<soundray> Hast Du den Dialog "Softwarequellen" oder aehnlich gefunden?
<effi> jop
<soundray> effi: der zweite Punkt in der Liste sollte "universe" enthalten. Den musst Du ankreuzen (falls ers nicht  schon ist)
<soundray> noch da?
<effi> ist schon
<effi> ich finde das programm ja auch
<effi> in synaptic
<effi> aber ich kanns da nicht downloaden
<soundray> Dann schlieÃ mal den Dialog und klick auf Reload in Synaptic (erster Knopf ganz links)
<effi> Es konnten nicht alle Inhaltsverzeichnisse der Paketquellen heruntergeladen werden
<effi> Die Paketquelle kann nicht mehr lÃ¤nger verfÃ¼gbar oder auf Grund von Netzwerkproblemen nicht erreichbar sein.
<soundray> Aber verbunden bist du doch?
<effi> joa
<effi> scheinbar schon
<soundray> Geh nochmal zurueck zu den Softwarequellen
<effi> ok
<soundray> Welchen Server hast du dort fÃ¼r den Download ausgewÃ¤hlt?
<effi> Server fÃ¼r deutschland
<soundray> Ãndere das mal in Main Server (wie immer das in der deutschen Version heiÃt)
<effi> ist
<soundray> Dann SchlieÃen
<soundray> Jetzt sollte er die Inhaltsverzeichnisse herunterladen
<effi> jop
<effi> hat er schon
<soundray> Jetzt versuchs nochmal mit freeciv
<effi> muss ich gtk+ oder dieses xaw3d
<soundray> Wahrscheinlich ein vorÃ¼bergehendes Problem mit der Anbindung des deutschen Spiegelservers
<soundray> GTK reicht
<effi> ok
<effi> soso
<effi> also jetzt hats geklappt
<effi> aber die haben irgendwie ne alte version von dem spiel ...
<soundray> Unter Anwendungen-Spiele mÃ¼sste jetzt ein Eintrag sein
<soundray> Wenn hardy rauskommt, kriegst du eine neue
<soundray> !info freeciv-server
<effi> automatisch?
<ubotu> freeciv-server (source: freeciv): Civilization turn based strategy game (server files). In component universe, is optional. Version 2.0.9-2 (gutsy), package size 416 kB, installed size 1060 kB
<soundray> !info freeciv-server hardy
<ubotu> freeciv-server (source: freeciv): Civilization turn based strategy game (server files). In component universe, is optional. Version 2.1.3-1 (hardy), package size 509 kB, installed size 1292 kB
<soundray> Nein, wenn du auf hardy aktualisierst
<effi> und wie mache ich das?  ... wo istn da der unterschied?
<soundray> Du hast jetzt 2.0.9 -- hardy kommt mit 2.1.3
<soundray> Ich spiele kein freeciv, deshalb kann ich dir nicht sagen, was der Unterschied ist
<effi> also muss ich das irgendwann einfach wieder Ã¼ber synaptic das neue downloaden?
<soundray> Nein, du wirst ueber den Update-Manager benachrichtigt
<soundray> Ich sehe gerade, du kannst auch jetzt schon die neue Version haben
<soundray> Es ist in backports
<soundray> !backports
<ubotu> If new updated Ubuntu packages are built for an application, then they may go into Ubuntu Backports. See https://help.ubuntu.com/community/UbuntuBackports - See also !packaging
<soundray> Wieder im Softwarequellen-Dialog, auf dem dritten Tab, in der oberen Liste die letzte Option mÃ¼sste backports sein
<soundray> Gefunden?
<effi> jo
<soundray> Angekreuzt? Aktualisiert?
<effi> jo
<effi> :)
<soundray> Alles klar dann?
<soundray> Ich muss jetzt mal Schluss machen
<effi> ich danke dir vielmals
<soundray> Bitte
<effi> aber eine frage
<soundray> ?
<effi> wenn ich dieses backdoor angeklickt hab
<soundray> backports
<effi> kann ich dann nicht auch viren bekommen
<soundray> Nein
<effi> weil theoretisch kann doch jeder da was hochladen
<soundray> Es gibt keine Viren fuer Linux, jedenfalls nicht in freier Wildbahn
<soundray> Und, nein, da kann nicht einfach jeder was hochladen
<soundray> Wenn du's nicht glaubst, kannst du's ja mal probieren ;)
<effi> :D
<effi> nur weils jetzt aufeinmal neue versionen von compiz und so gibt
<soundray> Aber du kannst es jetzt auch wieder abwÃ¤hlen
<soundray> Wenn du compiz hast, wuerde ich die installieren
<effi> ja wenn die offiziell sind hol ich die mir lieber :D
<soundray> Die backports sind manchmal ein bisschen weniger stabil, aber ich nehme die grundsaetzlich immer mit
<soundray> Falls es Probleme gibt, habe ich ja ein Backup :)
<soundray> Sonst noch was?
<effi> ne
<effi> danke
<soundray> Wo bist du eigentlich?
<soundray> BloÃ neugierig
<effi> wie meinste das?
<effi> welche stadt?
<effi> greven
<soundray> Ja
<soundray> Ach was
<effi> jo warum?
<soundray> Ich habe in MÃ¼nster studiert
<effi> ja dann kennst du ja die Metropole Greven City
<effi> beste stadt ever
<soundray> Vom Durchfahren :)
<effi> -.-
<soundray> Und den Flughafen natÃ¼rlich
<effi> das dauert ja tage bis man da einmal durchgefahren ist
<effi> :P
<soundray> Okay, dann bis demnaechst
<effi> hau rein
#ubuntu-classroom 2008-02-29
<dholbach> Hello everybody and welcome to another MOTU Q&A session
<dholbach> who do we have here for the session today? :)
 * Iulian waves
<dholbach> hi Iulian - how are you doing? :)
<man-di> dholbach: hello
<Iulian> I am good, thanks :-)
<dholbach> hey man-di
<dholbach> great
<dholbach> so did anybody bring a few questions for today? :)
<Iulian> Uhmm, I don't have any, not yet.
<dholbach> anything you've been working on? anything you wondered?
<dholbach> hi allee_
<dholbach> allee_: here for the MOTU Q&A session too? :)
<Iulian> No, not really, I've been working with the bugsquad in the past few months.
<man-di> dholbach: I would have some questions, but all are probably out of the scope of this session
<dholbach> Iulian: sounds good :)
<dholbach> man-di: you can try :)
<Iulian> I'm thinking to start working with the MOTU too but I still have a lot to learn.
<allee_> dholbach: no directly.  reconnect after forced disconnect by telecom
<dholbach> allee_: ahhh, I see
<man-di> dholbach: I dont wanna crash this session with this, its more about working together of Ubuntu and Debian on Q&A
<allee_> dholbach: but as I'm here, I can stay for a while and ponder about Q&A :)
<dholbach> Iulian: I think the best way is to start with some bitesize bug you're interested and see where it takes you - there's always somebody in #ubuntu-motu who can help you out if you get stuck
<dholbach> man-di: is there anything particular you wonder or do you have any idea what could improve?
<dholbach> man-di: did you get in touch with heno or liw about it already?
<Iulian> dholbach: Yeah, that too but now I am looking to start packaging from source but I can't find an easy one.
<dholbach> Iulian: I personally liked it better to start work on an existing package and learn more and more by working on existing packages
<dholbach> also the thing is: we're past Feature Freeze and can't accept NEW packages (only with special exception) right now
<Iulian> Yes, indeed but I thought that if I make a new package I will learn more.
<Iulian> And someone from MOTU channel can help with.
<allee_> Iulian: what helped me a lot was reading/following commit msgs of debian/* changes.
<dholbach> Iulian: in the end it's your call :-)
<Iulian> allee_: That too.
<Iulian> dholbach: Yes but I will take your advice and start working with the bitesize bugs first.
<dholbach> just try it and see where it takes you :)
<man-di> dholbach: nope, not yet. I more and more wonder how many people seem to work on Java packages in Ubuntu, doing one fix and then never appear again
<man-di> dholbach: for many packages its important to understand how the package works and that cant be learnt at one first look, doing a fix and gone
<man-di> this often leads to wrong fixes
<dholbach> man-di: maybe it needs more team structures to better keep track of what happens - also to try to bind people more to the matter
 * txwikinger apologises for being late
<dholbach> man-di: I absolutely agree
<man-di> dholbach: I have given up on this personally
<man-di> dholbach: I'm not able to keep people in a team it seems
<dholbach> man-di: why if I may ask?
<man-di> dholbach: people too often get other interest
<man-di> like non-java packages
<dholbach> man-di: sure, you can't prevent that from happening
<dholbach> I just found that a team with set goals works much better than a bunch of people fixing a bug here and another one there
<man-di> and java is not that popular among maintainers anyway
<dholbach> and java is important enough for that
<man-di> dholbach: problem is get the right people that can do the needed work probably
<dholbach> of course that requires leaders who takes matters in their own hands and set up structures in the beginning
<man-di> dholbach: we better stop here for now, otherwise we kill your session
<dholbach> man-di: do you think there are people from upstream communities who are interested enough to see their stuff in a good shape in a distribution?
<dholbach> man-di: I think it's educational and interesting to everybody in here - not sure if there are any other questions right now? are there?
<Iulian> I don't have any questions, go ahead.
<man-di> moist upstreams are not interested in distros. they say: we have bundled all needed third party software, just unpack that zip file
<dholbach> *nod* that's particularly problematic in the java world
 * dholbach has seen this already
<allee_> man-di: about java, isn't there an active debian-java group?
<dholbach> I know that people have an interest in Java, packaging new applications and so on - of course there are less people up for "getting the infrastructure" right
<man-di> and most maintainers dont like Java....users like java but most of them dont want to take the hurdle to do bug fixing or whatever is needed
<man-di> allee_: well some people are active but about 50% or more is done by me
 * dholbach hugs man-di for his good work :)
 * allee_ too
<man-di> dholbach: I have to say I'm a bit bothered by this
<dholbach> man-di: I can imagine
<man-di> so my idea is to get people from Ubuntu and Debian together to get more work done
<man-di> perhaps this works out somehow
<dholbach> man-di: I can't promise you it will work, but why don't you and I, doko and jcastro sit together and think about energizing such a team?
<dholbach> I'm happy to help brainstorming there
 * txwikinger hugs dholbach for all his good work
<man-di> two small groups combined make a bigger group
<dholbach> absolutely
 * dholbach hugs txwikinger back - thanks :)
<man-di> dholbach: I'm all for it
<dholbach> rock and roll :)
<dholbach> are there good java "example packages"?
<dholbach> or a java team TODO list?
<man-di> dholbach: for libraries, yes: for apps: not really
<txwikinger> or bytesize problems
<txwikinger> I think bytesize problems are very good for new people trying if they like to do it
<man-di> dholbach: my current TODO is: http://pkg-java.alioth.debian.org/cgi-bin/qareport.cgi
<man-di> dholbach: this checks SVN, debian BTS and archive
<dholbach> man-di: good work
<man-di> dholbach: stolen from debian pkg-perl group
<man-di> *g*
<dholbach> :-)
<dholbach> man-di: if you find the time, do you think you could add some "reference packages" to https://wiki.ubuntu.com/PackagingGuide/Lists/ReferencePackages ?
<dholbach> man-di: I don't know much about java, but I was asked a couple of times "how do I do java packaging" - just listing a few "good ones" would be a good start already
<man-di> dholbach: not yet, still at work...
<dholbach> OK
<dholbach> man-di: do you know if there are a lot of Ubuntu Java related bugs?
<dholbach> sorry I meant bug reports
<man-di> I do a private daily multidistrotools run
<man-di> there are currentl about 30 bugs in java packages that are maintained by pkg-java in debian
<man-di> not all java packages are maintained by pkg-java in Debian
<dholbach> right, my question was rather: are there a lot of java bugs reported in Launchpad?
<man-di> some of them probably already fixed
<man-di> I meant the bugs reported in Launchpad against packages pkg-java maintains in Debian
<dholbach> ahhh ok
<dholbach> gotcha
<man-di> in Debian BTS we have some reports more
<dholbach> were they of good quality?
<man-di> some are, some not
<man-di> sometimes I miss bugs because they are in launchpad and I never saw them
<dholbach> I found that people who filed good bug reports sometimes could be dragged into helping out fixing them
<dholbach> *nod*
<man-di> so a first big help would be to always forward launchpad bugs to debian bts
<dholbach> some of them to upstream to?
<dholbach> too?
<man-di> yes
<man-di> tracking upstream bugs is another issue
<man-di> when maintaining a lot of packages you cant follow all upstream mailing lists/bug trackers
<dholbach> sounds like a bullet points on a good todo list :)
<dholbach> of course not
<man-di> so some bugs might be fixed upstream already
<man-di> dholbach: yes
<man-di> there are many tasks beginners could do
<dholbach> in Launchpad you can add an upstream task to the bug report (and keep it empty) to indicate: this needs forwarding upstream
<dholbach> absolutely
<man-di> like creating watch files or so
<dholbach> I think a wiki page indicating which tasks are suitable for whom might be a good start
<dholbach> and maybe a kick-off event (like a IRC meeting) to get interested people into it
<txwikinger> dholbach: for Kubuntu wie have agreed for three new tags
<dholbach> txwikinger: which are those?
<txwikinger> needs-upstream, upstream, needs-upstream-sync
<man-di> dholbach: your ubuntu week idea was very good, if would have had time...
<txwikinger> first needs someone to forward the bug to upstream
<txwikinger> second means there is a pending upstream bug
<txwikinger> and the last the bug is fixed upstream
<txwikinger> maybe we should make that a wider policy
<man-di> txwikinger: in debian we have something similar with tags and some automatic tool which can track upstream bugzillas and so on
<man-di> txwikinger: so tags get automatically set when upstream fixed a bug
<dholbach> txwikinger: I can just tell you how the I did this when I worked together with seb128: for 1) we opened an upstream task (you can query LP for a list of those), 2) we didn't have a separate tag for that, 3) marked bugs as 'fix committed' once they were fixed upstream, so we could close them with the next upload
<man-di> of course the forwarding task is manual
<txwikinger> the tracking is already done by LP
<txwikinger> what the tags help is to make lists of those bugs easily
<dholbach> txwikinger: you can query those 'states' in LP too (without tags)
<dholbach> that's what I tried to say
<dholbach> best to ping kiko about it
<txwikinger> well.. not the first
<txwikinger> or you mean you just create an empty upstream one?
<dholbach> yes
<txwikinger> ah
<dholbach> https://bugs.launchpad.net/ubuntu/+bugs?advanced=1 - "Show bugs that need to be forwarded to an upstream bug tracker"
<txwikinger> I will look inot this
<dholbach> if there's anything missing that you need, kiko's your man
<dholbach> ROCK
<dholbach> man-di: I'll try to set up a mail with ideas I have and mail it out to you and others I think are interested
<man-di> dholbach: cool, thanks for your help
<dholbach> will likely be sometime next week
<man-di> dholbach: take your time
<dholbach> there are millions of java developers out there - there MUST be people who can help us out :)
<dholbach> and millions of java developers who'd appreciate a great-working java world in Ubuntu and Debian
<man-di> dholbach: the more I work with Java developers the more I think bad about them...
<txwikinger> cool dholbach
<man-di> dholbach: and I'm one of them...
<txwikinger> depressingly I found work for myself again :)
<dholbach> txwikinger: there's always work to do :)))
<txwikinger> I know :)
<dholbach> do we have any other questions? :)
<txwikinger> Are there any urgent things to do for hardy?
<dholbach> one of my pet peeves are unmet dependencies
<dholbach> there are just too many of them
<dholbach> apt-cache -i unmet    might give you an idea
<txwikinger> ok.. I will resync and look into it
<dholbach> but there are millions of other things to work on
<dholbach> another pet peeve of mine are all the bugs that have patches attached but nobody had the time to check them out yet
<txwikinger> sorry I fear I can't help out there :)
<dholbach> or all the bugs that are fixed upstream or in a different distro (easily checkable in LP) and the fix hasn't been incorporated
<dholbach> (I linked them from http://wiki.ubuntu.com/5-A-Day)
<dholbach> a lot of them are really low-hanging fruit
<txwikinger> ok.. I have a look there too
<dholbach> especially with hardy being an LTS, we should try to get as many of those "nearly fixed bugs" fixed for good
<txwikinger> true
<dholbach> if that's all the questions we have right now, I'll tend after my dog and go for a walk outside
<dholbach> the weather is gorgeous
<txwikinger> have fun :)
<man-di> dholbach: have fun
<dholbach> ok... have a great day everybody, weekend too
<txwikinger> thanks dholbach
<dholbach> and thanks for showing up and your great questions
<dholbach> see you around
<crevette> Ksalut
<Lokian> Oh a smaller room, yay!
<Lokian> Anyone home?
<Megaqwerty> Lokian: indeed.
<Lokian> Oh wait, is this a help channel?
<Megaqwerty> nope
<Lokian> The wiki entry seems to suggest it's not, per say
<Megaqwerty> #ubuntu
<Lokian> dammit x_x
<ompaul> no it really is not a help channel
<Lokian> And there are over 9000 people in there =/
<ompaul> it is an educational channel more so
<ompaul> Lokian, wrong
<ompaul> less than 1300
<Lokian> O RLY?
<Lokian> well bye anyhow
 * ompaul scratches his head
#ubuntu-classroom 2008-03-01
<baldebono> Hi
<rzr> hi
<rzr> i am having a question, can we upgrade packages in hardy with new upstream versions or it is frozen now ?
<james_w> rzr: it is frozen, but it is possible to get a new package if there is good reason, for instance it is a bug fix release.
<james_w> rzr: #ubuntu-motu may be a better channel for these sorts of queries.
<rzr> ok
<Antkin> Hello this is my first night on IRC
#ubuntu-classroom 2008-03-02
<ebaynoob> i need help
<ebaynoob> :(
<ebaynoob> i am trying to boot ubuntu fiesty fawn from live cd
<ebaynoob> and am getting io erros
<ebaynoob> Buffer I/O Error on device fd0, logic block 0
<rzr> http://www.eol.org/terms_of_use
<herlo> pirate|: poke
<Heartsbane> Zelut: Mar 2nd proposed meeting agenda is posted https://wiki.ubuntu.com/Classroom/MeetingAgenda2008Mar2
<Heartsbane> just a FYI
<Heartsbane> There is a also a copy in gobby for anyone who wants to make a adjustment (collaboration is great)
<visualdeception> nice
 * visualdeception is seth
<Heartsbane> visualdeception: I think for the purposes of assignments we should use our real names, if you want to make a adjustment, just so we can all keep each other straight on the mailing list
<Heartsbane> just a thought
<Heartsbane> BRB gotta take care of the laundry, feel free to start without me
<Heartsbane> I shouldn't be long
<visualdeception> sounds good
<visualdeception> is everyone here?
<visualdeception> back
<Heartsbane> here
<visualdeception> zelut is in gobby but not in here?
<Heartsbane> I think he might dealing with the new baby
<visualdeception> ahh yes
<visualdeception> is anyone else here?
<Heartsbane> pleia2: are you here?
<visualdeception> runst8 are you around?
<Heartsbane> popey: ?
<visualdeception> welcome Zelut!
<Zelut> howdy
<visualdeception> here or gobby?
<Zelut> pleia2: ping
<Heartsbane> Laney: ping
<Zelut> gobby I guess.
<Heartsbane> popey: ping
<popey> pong
<visualdeception> runst8: ping
<popey> just putting the kids to bed
<popey> be around in 10 mins
<Heartsbane> ah
<Zelut> which document? classroommeeting?
<visualdeception> that was the one i grabbed
<visualdeception> ubuntu-classroom meeting is in gobby
<Heartsbane> unless anyone has any objection
<Heartsbane> s/objection/objections/
 * popey returns
<nixternal> hola
<visualdeception> nixternal do you have gobby?
<nixternal> who is running the classroom now? it went from Mez to nalioth to Mez to pleia2 to who?
<nixternal> hehe
<nixternal> ya I have it somewhere
<visualdeception> lol
<visualdeception> gobby.ubuntu.com
<visualdeception> zelut
<visualdeception> thats where we are now
<nalioth> nixternal: nobody and everyone
<nixternal> nalioth: right
<nixternal> haha, I remember when I pimped out the classroom and all of a sudden it was information overload
<nalioth> nixternal: i put all ubuntu members on the access list, so anyone can use it
<Heartsbane> herlo: ping
<herlo> Heartsbane: pong
<Heartsbane> you up for food
<herlo> yup
<herlo> where to?
<Heartsbane> VI?
<herlo> nah
<Heartsbane> I hafta run to the hospital afterwords
<Heartsbane> k
<herlo> we can do Wingers tho maybe?
<Heartsbane> k
<herlo> wanna meet there?
<Heartsbane> ya in 30
<herlo> 15 minutes?
<herlo> oh, 30 works
<Heartsbane> ok 15
<herlo> or 15
<herlo> :)
<herlo> so which is it?
<Heartsbane> 15
<herlo> Heartsbane: ??
<herlo> k
<loser2012> when is the next class?
<Heartsbane> loser2012: we are shooting for 3rd week in March
<loser2012> ok
#ubuntu-classroom 2009-02-24
<error404notfound> when I run date, it shows correct date but with CET, I want it to be PKT, how to do that?
<error404notfound> oopss, wrong channel
<error404notfound> man, I keep confusing ubuntu and ubuntu-classrom
<oly562> id like to remove avahi-daemon, but it deps on ubuntu-desktop. of course i know better, but howto remove with apt-get above the normal remove switch so that the desktop doesnt go away... thanks
<oly562> ill be here for a bit, let me know your suggestions
<oly562> maybe i could just shut the service off in /etc/rcX
<oly562> also, how exactly can i do this, im new to ubuntu, not linux
<oly562> whats the "ubuntu" way to remove a service from init, and i just read lately about how ubuntu will ditch the init process? something to that effect and move to another way.....
<oly562> comments, suggestions, thanks.. bbiam
<oly562> ... is now reading man update-rc.d
<oly562> this doc update-rc.d is a little outdated... 2005 nov
<oly562> anyone know BUM?
<oly562> man sysv-rc-conf
<oly562> no manual
<oly562> should i just chmod 400 /etc/initd.d/avahi-daemon  will this break other things on the ubuntu-desktop? if so,, what?
<oly562> bbiab
<maxb> oly562: #ubuntu-classroom is used for scheduled classes only. Ad-hoc questions are welcome in #ubuntu
<oly562> back
<oly562> sorry
<oly562> maxb: im banned from #ubuntu. can you have them lift me, its been over 2 months now... sighs
<oly562> id glady go there, but ya know... shrugs... i believe it was fennel something like or someone else... let me know if you can help out. i only come on here when i need a little help, and i pretty much talk the same way i did here, YET, they banned me, cheesy....
<oly562> howto list the admins of a room in here? i forgot... so i can pm one of them
<maxb> fennel is a vegetable. I don't understand what you mean :-)
<oly562> lol
<oly562> its a nic
<oly562> ferral fennel somthing like that, its been 2 months
<oly562> i dont remember
<oly562> can you ask or tell me how i can pm one of them, i forgot the command to list admin with / switch
<oly562> in here
<oly562> note, he is in this room as well quite often.. last i remember
<oly562> if you can help, that would be great!
<oly562> whats the command to list ops? in a room
<maxb> oly562: I have asked on #ubuntu, apparently #ubuntu-ops is the place you need to ask
<oly562> k
<oly562> tanks
<tinel> date -u
<oly562> how can i send mulitple pm's im's to people on irc?
<oly562> or do i have to do that one by one
<maxb> (1) This isn't a suitable channel to be asking that. (2) There's no reasonable reason to mass PM people.
#ubuntu-classroom 2009-02-25
<subzero_> hi
#ubuntu-classroom 2009-02-26
<MOGUL-TECH> hello
#ubuntu-classroom 2009-02-27
<cprofitt> woah
<giudecca> hello
#ubuntu-classroom 2009-02-28
<harlemdavvey> hey
<seanw_> Hello.
<Pricey> seanw_: the way there are sliders like that there makes me think the sound card is fine, there's just something muted somewhere silly.
<seanw_> That is what I am thinking too.
<seanw_> I just have no idea where.
<Pricey> seanw_: or maybe there's a pulse failing... give me a second
<seanw_> epic win
<seanw_> Just got test sound playing
<seanw_> CHanged from autodetect to ALSA which wasn't there before
<seanw_> HAng on
<seanw_> Win!
<seanw_> YouTube test success
<Pricey> woop woop :)
<Pricey> what exactly happenned?
<seanw_> I am going to try rebooting to see if still works. If I don't come back on IRC, Pricey, thanks for all your help :)
<seanw_> I'll check precisely
<seanw_> I opened SOund from PReferences
<seanw_> Under sound events
<seanw_> Drop down was set to auto detect
<seanw_> Since earlier, ALSA is now in the list (or I didn't notice somehow
#ubuntu-classroom 2010-03-01
<jono> [SLIDE 1]
<jono> [SLIDE 1]
<persia> jono: Please also advertise a URL of your slides for those not using lernid :)
<jono> testing
<persia> (or make lernid do this at class start)
<jono> persia, will do
<jono> just testing right now
<jono> [SLIDE 1]
<persia> Cool!
<jono> [SLIDE 2]
<jono> [SLIDE 3]
<jono> [SLIDE 1]
<jono> all seems to be working :-)
<mhall119|work> test
<sfsoc> mhall119|work: yes
<mhall119|work> sorry, seeing if Lernid works
<mhall119|work> I had to setup an SSH tunnel and change my /etc/hosts file
<mhall119|work> but finally I can enjoy lernid from work
<Wesss> Hi All, Ubuntu class had a session on Python for beginners last week, do you know where I can look at that session?
<gotik_> http://irclogs.ubuntu.com/
<gotik_> which day was the python session?
<Wesss> no sure if it was last thursday or friday
<mhall119|work> the 25th
<gotik_> thanks
<Wesss> found it.. tnx gotik
<wharp> mhall119|work: what did you change your hosts file to get lernid to tunnel?
<mhall119|work> wharp: I did ssh -L 6667:irc.freenode.net:6667 $myserver
<mhall119|work> then I had to set 127.0.0.1 as irc.freenode.net in /etc/hosts
<mhall119|work> so when Lernid connects to irc.freenode.net:6667, it connets to localhost:6667, which tunnels to the real irc.freenode.net:6667
<wharp> huh, that's not how I've done it in the past, but then again, I can't get it working atm so what do I know
<mhall119|work> because irc.freennode.net is hard coded in lernid, and port 6667 is assumed from somewhere (I couldn't figure out how to set a specific ip)
<mhall119|work> I did it this was
<mhall119|work> way
<hemanth> Permission denied (publickey).!
<mhall119|work> hemanth: you need to have ssh access to $myserver
<mhall119|work> for that matter, you need to have a server, $myserver is a placeholder
<hemanth> are there any open severs? yes i know abut that access, as my machine is an ssh server with dydns as of now
<mhall119|work> I don't know of any open servers, no
<mhall119|work> if you can ssh to your server, that would work
<hemanth> mhall119|work,shh tunneling with gmail server worked for you?
<mhall119|work> huh? ssh with gmail?
<mhall119|work> I ssh into my webserver
<wharp> ah, nice, it works, thanks mhall119|work
<hemanth> mhall119|work, got it, but my asking another question like have you tried ssh to gmail
<mhall119|work> nope
<mhall119|work> I didn't think gmail offered that kind of access
<hemanth> i had tried it once, but i do blv they have ssh thinge
<mhall119|work> cool
<mhall119|work> I had no idea
<hemanth> 8001 can also be used ? like  ssh -L 8001:irc.freenode.net:8001 localhost, cos i m getting bind address already in use, as i'm connected to irc with another client
<mhall119|work> not for the local port, Lernid assumes 6667
<mhall119|work> but if freenode listens on port 8001, you should be able to do that
<mhall119|work> unless you wanted to do some kind of iptables port forwarding
<hemanth> what is achieved my tunnel actually ? in this scenario, i had tunneled to servers to achieve more stable connect for a longer duration
<mhall119|work> but that would affect your other client too
<mhall119|work> hemanth: at work I am behind a firewall that blocks IRC
<mhall119|work> but the firewall doesn't block ssh
<mhall119|work> so I can make an ssh tunnel to the outside of the firewall, and send IRC traffic over that tunnel
<hemanth> mhall119|work, ha ha ok :) i missed the main part so was confused what was going on uber kool +1 to power of GNU/Linux
<mhall119|work> yes, ssh==win all the time
<hemanth> hacking==win==happy :)
<hemanth> mhall119|work, found ssh for gmail ssh -g -L 5223:talk.google.com:5223 -N you@yourserver.com
<mhall119|work> hemanth: I'll check that out, thanks
<hemanth> mhall119|work, np :)
<agbemenu> what's the topic
<agbemenu> ?
<mhall119|work> agbemenu: opening ceremonies start in ~ 45 minutes
<keine-ahnung> test, if lernid opens every page, even if there is no session running: https://wiki.ubuntu.com/Lernid
<keine-ahnung> https://wiki.ubuntu.com/UbuntuOpportunisticDeveloperWeek
<nonchipIRSSI> just testing irssi. http://www.google.de
<nonchipIRSSI> https://wiki.ubuntu.com/UbuntuOpportunisticDeveloperWeek
<cjohnston|cell> Mornin
<nonchipIRSSI> morning
<cjohnston|cell> Me
<jono> nearly there :)
<cjohnston|cell> Hey jono
<jono> :)
<etrusco> nhandler_: hello. since you're in the Contacts page, what about adding a link in the wiki page to the irclogs of the sessions? ;)
* ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - http://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Event: Ubuntu Opportun istic Developer Week - Current Session: Welcome! Ubuntu For Opportunistic Developers - Jono Bacon - Instructor: jono || Questions in #ubuntu-classroom-chat
<jono> alright!
<jono> lets just wait a min for late folks to join :)
<jono> [SLIDE 1]
<jono> Lernid folks, click on the Session tab to see the slides
<jono> Lernid may go a little grey while it downloads the slides
<jono> but it will come back :)
<jono> ok, non Lernid folks can grab the slides at http://www.jonobacon.org/files/uodw-welcome.pdf
<jono> welcome everyone to Ubuntu Opportunistic Developer Week! woooooooo!
<jono> [SLIDE 1]
<jono> click Session to see the slides folks
<jono> I know a bunch of you, but some of you are new here, so let me first explain who I am
<jono> my name is Jono Bacon and I am the Ubuntu Community Manager working at Canonical
<jono> my job is to help grow a fun, productive and inspiring Ubuntu community: a place where we can all be together to celebrate an ethos, and work together to help build awesome software and community facilities around that ethos
<jono> [SLIDE 2]
<jono> Ubuntu is a way of life, a philosophy and an ideal: and being part of this incredible community is heaps of fun
<jono> our community is a phenomenal place to be: this picture was taken at our Ubuntu Developer Summit (UDS) in Barcelona
<jono> each UDS is where we get together to discuss, design and plan our next version of Ubuntu
<jono> right now, we are working on this baby
<jono> [SLIDE 3]
<jono> Lucid.
<jono> hehe I am cut and pasting to a part way through and then I start typig
<jono> typing :)
<jono> Ubuntu 10.04 Lucid Lynx will be the most exciting Ubuntu release in our history
<jono> ...so far
<jono> :)
<jono> I think this release really defines who we are, where we have been and where we are going, and it packs some stunning features such as social networking build right into the desktop, incredible boot speed, refined look and feel, software center improvements, new apps and more
<jono> so...Ubuntu Opportunistic Developer Week, let me explain the idea behind the event
<jono> [SLIDE 4]
<jono> Ubuntu is here to help people learn, create and interact
<jono> when I first put these slides together, it was for a talk in LA that was doing at SCALE
<jono> there I was throwing together a description of my talk, and the words "learn, create and interact" just popped into my head
<jono> [SLIDE 5]
<jono> I then realized that this is a process in which each word helps us define and learn from the next one
<jono> we have all been passionate about build a system in which you can not only consume free software easily, but to also build a system, framework and tools that help you to collaborate
<jono> if you can easily LEARN how to be creative, you can CREATE and that can help you INTERACT with those people who use your creations or other creators
<jono> [SLIDE 6]
<jono> Ubuntu Opportunistic Developer Week is all about kicking off a set of ideas that inspire you good folks to CREATE
<jono> the whole point of the week is to break down the gap between having a cool idea and going ahead to implement it
<jono> [SLIDE 7]
<jono> this gets to the core of the Ubuntu philosophy - we are who we are because of who we all are
<jono> if we can break down the barriers to people creating, we can all create together, continuing to build an incredible platform and set of tools that lets *everyone* create, irrespective of their interest or discipline
<jono> [SLIDE 8]
<jono> with this goal in mind, I have been working hard really to socialize the term "Opportunistic Developers"
<jono> Opportunistic Developers are people like you and me: people who have cool ideas for software, but are not necessarily programmers by definition - we are people who have the ability to write code, but we write it for fun, often in our spare time, working on projects that are specifically interesting to us
<jono> [SLIDE 9]
<jono> the platform that really changed this was the iPhone - much as it niggles at our free software tendencies, Apple did an incredible job not only delivering a device that people loved, but also a platform that harnessed the create ideas from opportunistic developers
<jono> developers have written everything from serious exercise apps to apps where you press a button and it makes a fart noise
<jono> in the opportunistic developer world, all apps are welcome, irrespective of how specialized or niche: you want to write an app for a specific service or site? go ahead!
<jono> the goal here is *enabling creativity*, irrespective of how it will manifest :-)
<jono> Ubuntu provides an absolutely incredible platform for this: we have facilities for creating applications, using multimedia, networking, creating graphics, and all manner of other things
<jono> while Ubuntu supports many languages and frameworks, we are particularly big fans of Python, and Python is simple, effective and can do pretty much anything you need it to do with the vast library of plug-ins and modules that we ship - this makes it a stunning platform for writing programs that are fun and interesting to you
<jono> this week provides a week of sessions on a wide variety of topics that explain how you can get started with this platform
<jono> now, to really get the most out of this week, I would recommend you each think of a program to write
<jono> think of something fun and interesting and simple for you to focus your efforts on
<jono> it could be a serious app that helps you life, or something silly and fun
<jono> whatever it might be, think of something over the next hour and use that as your focus for making that happen this week
<jono> I have also created a challenge this week for you all
<jono> to think of an app, see how much progress you make on it and send me screenshots on Friday so I can blog about it and show it off
<jono> more details on this are at http://www.jonobacon.org/2010/02/25/the-grand-app-writing-challenge/
<jono> so, let's look at the collaborative development process
<jono> [SLIDE 10]
<jono> creating programs follows this broad four step process
<jono> in this session I am going to talk about some of the work going on to help this process
<jono> [SLIDE 11]
<jono> we actually have an incredible platform for building software
<jono> this diagram basically explains some of our key components
<jono> firstly, we have a tonne of ideas
<jono> you lovely people tell me your ideas every day, and it is part of my job to help you realize them and see them happen
<jono> ideas are great, but we want to convert them into software that people can run
<jono> so we have a bunch of development environments, with GNOME and KDE as good examples, which help this happen
<jono> they both offer great facilities for writing integrated top-class apps
<jono> personally I don't care which environment you use, just use at least one :)
<jono> we then have Launchpad and Bazaar
<jono> these tools provide facilities in which we can collaborate together on software
<jono> bzr helps you share source code with each other
<jono> and Launchpad provides facilities for hosting code, bug reports, answers and a wide range of other things
<jono> so at this point you could create software, but software is pointless unless people use it
<jono> so the Debian packaging system, which we use in Ubuntu, comes next
<jono> with it you can create packages which are simple to install and install all of their dependencies too
<jono> finally, how do we deliver these packages?
<jono> Launchpad has a wicked-cool feature called Personal Package Archives
<jono> this is basically your very own Debian package archive where you can publish your software
<jono> and it can appear in the Ubuntu Software Center
<jono> so...we have an end to end set of tools for making software and delivering it
<jono> I now want to talk through some of the tools available and work going on which makes our four steps: imagine, create, collaborate and publish easier
<jono> [SLIDE 12]
<jono> the first thing we need to do is break down this insane idea that writing programs is for other people
<jono> that "I am not smart enough" to write a program
<jono> or that "only proper programmers write programs"
<jono> I can assure you that you all have the ability to unlock an incredible world of creativity
<jono> you just need to learn some key tools, and Python is an absolute doddle to use
<jono> to help break this down I have organized this week and I have been blogging up a storm on Planet Ubuntu and Planet GNOME about this
<jono> everyone *can* do it
<jono> you just need to give it a shot: think of a cool app to write, use the sessions this week to have a go at writing it and do it :)
<jono> you have nothing to lose
<jono> [SLIDE 13]
<jono> the next step is getting to the fun
<jono> this was a term Rick Spencer said to me once that stuck with me
<jono> the whole idea here is that we want to make software development so easy on Ubuntu that you don't need to suffer through the complexities that surround making software
<jono> in the past, build systems, Makefiles and other crap complicated things
<jono> all the things that did not involve writing code created a blocker for writing code
<jono> so we are keen to fix this
<jono> a great starting point here, and one encouraged throughout the week is Quickly
<jono> [SLIDE 14]
<jono> quickly is a tool which lets you create new apps easily
<jono> it has a bunch of templates such as ubuntu-project that create apps for a particular environment or use case
<jono> creating an app is simple:
<jono> quickly create ubuntu-project mycoolapp
<jono> bang that into a terminal and you have a new app
<jono> (btw, you can install quickly from the software center or with: sudo apt-get install quickly)
<jono> [SLIDE 15]
<jono> editing code in quickly is simple
<jono> inside the new directory you created (e.g. mycoolapp)
<jono> whack in: quickly edit
<jono> it loads all the code into GEdit
<jono> simple
<jono> [SLIDE 16]
<jono> editing your user interface is simple with glade
<jono> just type in:
<jono> quickly glade
<jono> and finally, if you want to run your app
<jono> [SLIDE 17]
<jono> type in: quickly run
<jono> creating a new app and getting started is really quick and simple
<jono> we recommend that you all create your new apps with quickly in this way
<jono> Rick Spencer has a quickly session later today
<jono> :)
<jono> also, if you want to get started writing programs, when you have created your new app, inside the new directory it creates, just run: quickly tutorial
<jono> it will show you how to create buttons, and have them do stuff :)
<jono> [SLIDE 18]
<jono> we have been really keen to help optimize how people collaborate together too
<jono> we have some key tools which people use to work together, such as Launchpad and bzr
<jono> let me explain broadly how this works and a new project which is making this whole process easier
<jono> [SLIDE 19]
<jono> imagine you want to fix a bug
<jono> this is basically how it works
<jono> 1. choose a bug to fix
<jono> this usually involves looking at bug reports on Launchpad
<jono> 2. download the code with bzr
<jono> 3. work on the code you downloaded to fix it
<jono> 4. commit the changes you made locally: this process basically generates a set of changes which represent your bug fix
<jono> 5. you then "push" you code: this is where you upload your changes to your account on Launchpad
<jono> 6. attach the branch with your bug fix in it to the original bug report
<jono> 7. finally, you propose your bug fix to be merged into the original project so everyone can use it
<jono> so it boils down to: decide what you want to fix, grab the code, fix it, identify the changes to share, upload them, propose them for inclusion in the main project
<jono> while incredible flexible, this is quite complex to get your head around
<jono> believe me, you get the hang of it, but it takes a few times to get used to it
<jono> Martin Owens (doctormo on IRC) has been working on a tool to build this workflow into the desktop
<jono> it is caled Ground Control
<jono> let me explain how it works for fixing a bug
<jono> [SLIDE 19]
<jono> [SLIDE 20]
<jono> you first identify a bug to fix
<jono> like this one, which is a test bug I added to the groundcontrol project
<jono> [SLIDE 21]
<jono> now go to the file manager in Ubuntu, and groundcontrol when installed (which is not on a default Ubuntu) will have a Projects directory in your home directory
<jono> when you view that directory it adds a few buttons to nautilus at the top
<jono> if you click on the second button 'Fetch Project' you can select a project to work on
<jono> [SLIDE 22]
<jono> it then pops up this dialog box
<jono> you can enter a project name, such as ground control, and it displays them in the dialog
<jono> select it and click ok
<jono> [SLIDE 23]
<jono> this will then create a 'groundcontrol' directory in Projects
<jono> now if you want to fix a bug, click the 'Fix Bug' button
<jono> [SLIDE 24]
<jono> here you can search for a bug: type in search terms or the bug number and it will list all the bugs that match your search
<jono> [SLIDE 25]
<jono> when you select  bug and click ok, the code is download into a folder called "bugfix-lp-<bugnumber>"
<jono> this is the branch where you will fix the bug
<jono> [SLIDE 26]
<jono> now go into that folder where the code is and fix the bug
<jono> imagine I just add some content to the README file as a test
<jono> [SLIDE 27]
<jono> when you have edited any of the files you will see an Upload Fix button appear
<jono> when your bugfix is ready, just click the button
<jono> [SLIDE 28]
<jono> this dialog then pops up
<jono> it asks you what changes you made: here summarize what you did to fix the bug
<jono> this is the commit message
<jono> [SLIDE 29]
<jono> you then see this dialog
<jono> this is where you can type in a message that the main project maintainers see when you propose your bug fix for merging - this gives you an opportunity to tell them your bugfix is good to be merged in
<jono> [SLIDE 30]
<jono> when you click OK, the bug fix is uploaded, attached to the bug report and the merge proposal is made
<jono> you will now see a View Request button
<jono> [SLIDE 31]
<jono> click that and you can see the merge request that was made
<jono> here it says that I am proposing a fix for this bug to the ground control project
<jono> the owners of that project can now go and approve my fix if they like
<jono> [SLIDE 32]
<jono> and here you can see the bugfix branch added to my bug report
<jono> as you can see, Ground Control merges the command line functionality right into bzr
<jono> making development much easier
<jono> [SLIDE 33]
<jono> so the final element is visability
<jono> visibility, rather :)
<jono> making it really simple for people to access your software and use it
<jono> this is all about packaging
<jono> packaging is a complex art, and one that many people struggle with
<jono> fortunately, Quickly makes it simple
<jono> [SLIDE 34]
<jono> if you want to create a local package, just run: quickly package
<jono> quickly uses a tool called distutils-extra that will look at all the python modules you use and set them as dependencies for the package
<jono> so if I have this in my program:
<jono> import gstreamer
<jono> quickly package will make sure my program has the gstreamer packages installed
<jono> :)
<jono> now, if you want to share your package with others, you can run: quickly release 0.1
<jono> this will release a 0.1 version of your software and publish it to your PPA in Launchpad
<jono> this makes it possible for anyone else to grab your software and use it
<jono> and because it is a PPA, all future updates will be automatically delivered to them
<jono> [SLIDE 35]
<jono> something we have been working on in Lucid is to raise the visibility of PPAs
<jono> and they are now displayed in the Ubuntu Software Center
<jono> this means that you can use these awesome tools to make your software and publish it easily via the Ubuntu Software Center
<jono> :)
<jono> so
<jono> [SLIDE 36]
<jono> I am a bug fan of eating your own dog food
<jono> so I have written some apps that highlight how this platform has enabled me, very much of a non-coder, to write software
<jono> a few examples...
<jono> [SLIDE 37]
<jono> Acire
<jono> so named after my wife, it is her name backwards: Erica
<jono> this is a tool which provides a library of Python examples which you can use
<jono> I just released a new version, see http://www.jonobacon.org/2010/02/26/acire-0-3-released/ for details
<jono> [SLIDE 38]
<jono> Lernid
<jono> which many of you are using to view this week :)
<jono> I was really keen to create an app which made connecting to events such as this really simple
<jono> so I created Lernid, added the ability to show slides and websites, the local schedule etc
<jono> now mbudde is maintaining Lernid as I am busy with other things, thanks Michael! :)
<jono> finally
<jono> [SLIDE 39]
<jono> as some of you will know, I do a podcast called Shot Of Jaq
<jono> you can check it out at http://www.shotofjaq.org
<jono> Shot Of Jaq is a podcast which provides the first 10mins of a discussion and we encourage others to join us and continue the discussion on the website
<jono> it is all about discussion, so I have been writing an app called App Of Jaq which specifically builds Shot Of Jaq into your desktop
<jono> it is specific, and niche, but remember, that is cool for opportunistic developers :)
<jono> so there we have it
<jono> [SLIDE 40]
<jono> a key resource which I set up for this is #ubuntu-app-devel on freenode
<jono> this is a channel filled with folks who are writing software
<jono> it is a great place to ask questions, share progress on your apps and more
<jono> also, the very final session every day this week is a hacking party
<jono> head over to that channel and spend a few hours hacking on your new app
<jono> and you can be around others to ask questions and more
<jono> hacking together is tonnes of fun :)
<jono> [SLIDE 41]
<jono> ok, we only have a few mins
<jono> any questions?
<jono> NilsR70, Do we have to share copyright with Canonical when we use Launchpad?
<jono> no
<jono> :)
<jono> eviltwin44, Isn't Acire something which would be much better suited as a website where people can submit snippits and people comment on them?
<jono> I deliberately made the library of snippets a separate project (http://www.launchpad.net/python-snippets) so you can provide any UI to thenm
<jono> Acire is a desktop UI, and you could have a web UI if you like
<jono> I am a desktop guy, and having it on the desktop is great for editing code, running snippets etc
<jono> w1nGNUtz, QUESTION: Do you have plans to integrate quickly, glade in any of the existing IDEs so that the user doesn't need to swtich bettween command line and gedit?
<jono> w1nGNUtz, most Linux hackers like using text editors and command line for running comands
<jono> commands
<jono> but there is no reason why someone could not create an IDE
<jono> too many people don't get started developing on Linux because of an IDE: it is a false prophecy, there are great tools such as GEdit and Glade to provide the equivalent functionality
<jono> ok, folks, thanks!
<jono> I am done, next up is aquarius who will get you all started with CouchDB! :-)
* ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - http://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Event: Ubu ntu Opportunistic Developer Week - Current Session: CouchDB support in your app with DesktopCouch - Stuart Langridge - Instructor: aquarius || Questions in #ubuntu-classroom-chat
<aquarius> thanks very much, jono!
<aquarius> Hi, all. Welcome to CouchDB support in your app with DesktopCouch.
<aquarius> I'm Stuart Langridge, desktopcouch architect. Normally I'm in disguise as a cool guy, but today I'm going to drop that disguise and talk about databases.
<aquarius> Over the next hour I'm going to explain what desktopcouch is, how to use it, who else is using it, and some of the things you will find useful to know about the project.
<aquarius> [SLIDE 1]
<aquarius> If you were part of Ubuntu Developer Week, you might find you know a lot of this!
<aquarius> but this is *opportunistic* developer week :)
<aquarius> I'll talk for a section, and then stop for questions.
<aquarius> Please feel free to ask questions in #ubuntu-classroom-chat, and I'll look at the end of each section to see which questions have been posted. Ask at any time; you don't have to wait until the end of a section.
<aquarius> You should prefix your question in #ubuntu-classroom-chat with QUESTION: so that I notice it :-)
<aquarius> Since I'm talking about databases, some of this is necessarily a bit technical. Do please ask questions or ask me to go over something again.
<aquarius> So, firstly, what's desktopcouch?
<aquarius> Well, it's giving every Ubuntu user a CouchDB on their desktop.
<aquarius> CouchDB is a "document-oriented database". If you're familiar with SQL databases, where you define a table and then a table has a number of rows and each row has the same columns in it...this is not like that.
<aquarius> In fact, CouchDB spearheads the "NoSQL" movement, which is all about new database stuff that isn't mired in a mass of SQL that belongs in the 1980s.
<aquarius> SQL was good for its time. Like, say, Purple Rain by Prince. Now, though...there's something better.
<aquarius> [SLIDE 1]
<aquarius> Instead of regimented tables and rows, in CouchDB you store "documents", where each document is a set of key/value pairs. Think of this like a Python dictionary, or a JSON document.
<aquarius> So you can store one document like this:
<aquarius> { "name": "Stuart Langridge", "project": "Desktop Couch", "hair_colour": "red" }
<aquarius> and another document which is completely different:
<aquarius> { "name": "Stuart Langridge",
<aquarius>   "outgoings": [
<aquarius>     { "shop": "In and Out Burger", "cost": "$12.99" } ,
<aquarius>     { "shop": "Ferrari dealership", "cost": "$175000" }
<aquarius>   ]
<aquarius> }
<aquarius> The interface to CouchDB is pure HTTP. Just like the web. It's RESTful, for those of you who are familiar with web development.
<aquarius> This means that every programming language already knows how to speak it, at least in basic terms.
<aquarius> [SLIDE 2]
<aquarius> CouchDB also comes with an in-built in-browser editor, so you can look at and browse around and edit all the data stored in it.
<aquarius> So, the desktopcouch project is all about providing these databases for every user, so each user's applications can store their data all in one place.
<aquarius> You can have as many databases in your desktop Couch as you or your applications want, and storage is unlimited.
<aquarius> well, assuming you have an infinitely large hard drive, anyway.
<aquarius> Desktop Couch is built to do "replication", synchronizing your data between different machines. So if you have, say, Firefox storing your bookmarks in your desktop Couch on your laptop, those bookmarks could be automatically synchronized to your Mini 9 netbook, or to your desktop computer.
<aquarius> They can also be synchronized to Ubuntu One, or another running-in-the-cloud service, so you can see that data on the web, or synchronize between two machines that aren't on the same network.
<aquarius> [SLIDE 3]
<aquarius> So you've got your bookmarks everywhere. Your own personal del.icio.us, but it's your data, not locked up solely on anyone else's servers.
<aquarius> Imagine if your apps stored their preferences in desktop Couch. Santa Claus brings you a new laptop, you plug it in, pair it with your existing machine, and all your apps are set up. No work.
<aquarius> But sharing data between machines is only half the win. The other half is sharing data between applications.
<aquarius> I want all my stuff to collaborate. I don't want to have to "import" data from one program to another, if I switch from Thunderbird to Evolution to KMail to mutt.
<aquarius> I want any application to know about my address book, to allow any application to easily add "send this to another person", so that I can work with people I know.
<aquarius> I want to be able to store my songs in Banshee and rate them in Rhythmbox if I want -- when people say that the Ubuntu desktop is about choice, that shouldn't mean choosing between different incompatible data silos. I can choose one application and then choose another, you can choose a third, and we can all cooperate on the data.
<aquarius> My choice should be how I use my applications, and how they work; I shouldn't have to choose between underlying data storage. With apps using desktopcouch I don't have to.
<aquarius> All my data is stored in a unified place in a singular way -- and I can look at my data any time I want, no matter which application put it there! Collaboration is what the open source desktop is good at, because we're all working together. It should be easy to collaborate on data.
<aquarius> That's a brief summary of what desktopcouch *is*: any questions so far before we get on to the meat: how do you actually Use This Thing?
<aquarius> pecisk> QUESTION: How CouchDB stores data? Multiple files, or something else?
<aquarius> each database is stored in a separate file, but you never, ever have to care about that :) Like how you don't have to care exactly how MySQL stores your databases
<aquarius> brunogirin> QUESTION: how do you control what apps see what data?
<aquarius> brunogirin, at the moment you can't limit which apps can see which databases, but it woul dbe possible to add that if there was a need for it -- authentication to desktopcouch is done with OAuth specifically for ths sort of thing
<aquarius> osteenbergen> QUESTION: Which programs are supported today??
<aquarius> any program that wants to use desktopcouch can do so!
<aquarius> danielbell> QUESTION: is there any limits on what kind of data you can store in a couchdb? can you store whole paragraphs of text - will it retain formatting like linebreaks and stuff like that?
<aquarius> no limit to what you can store. Line breaks will be retained.
<aquarius> ab28> QUESTION: Data migration and replication is possible with CouchDB?
<aquarius> yep. That's what I meant above by talking about how you can share data between machines
<aquarius> alanbelll> QUESTION: can I share a desktop couch database with someone else?
<aquarius> there's no built-in way to do that with desktopcouch at the moment. I have Plans, though. :)
<aquarius> fredo> QUESTION: Is desktopcouch intended to replace gconf?
<aquarius> no. gconf is about configuration. desktopcouch is about information. It ought to be possible to implement a desktopcouch back-end to gconf, though, and it's something that I've thought about and thought would be interesting
<aquarius> titeuf_87> QUESTION: how well does it work on other systems like Windows when you try to make an app cross-platform?
<ClassBot> titeuf_87 asked: how well does it work on other systems like Windows when you try to make an app cross-platform?
<aquarius> shut up, classbot. :)
<aquarius> there's an ongoing effort to port desktopcouch to Windows, led by mandel, who's doing an excellent job. I'm sure he'd be happy to get some help, though :)
<aquarius> webwurst> QUESTION: could you put this link to te panel top left? ;) http://couchdb.apache.org/
<aquarius> sure :)
<aquarius> damo35> QUESTION: Who defines the standards for how a music player should store it's data, for example? Would Rhythmbox and Banshee each have plugins to convert to CouchDB?
<aquarius> yes. there's a mailing list where this sort of thing is discussed; it's about rough consensus and running code, rather than schemas which are inscribed on stone tablets and Must Be Obeyed. What we want is for people to get together and talk through this stuff.
<aquarius> OK, I'll carry on now
<aquarius> The easiest way to use desktopcouch is from Python, using the desktopcouch.records module.
<aquarius> [SLIDE 4]
<aquarius> This is installed by default in Karmic and Lucid.
<aquarius> An individual "document" in desktop Couch is called a "record", because there are certain extra things that are in a record over and above what stock CouchDB requires, and desktopcouch.records takes care of this for you.
<aquarius> First, a bit of example Python code! This is taken from the docs at /usr/share/doc/python-desktopcouch-records/api/records.txt.
<aquarius> >>> from desktopcouch.records.server import CouchDatabase
<aquarius> >>> from desktopcouch.records.record import Record
<aquarius> >>> my_database = CouchDatabase("testing", create=True)
<aquarius> # get the "testing" database. In your desktop Couch you can have many databases; each application can have its own with whatever name it wants. If it doesn't exist already, this creates it.
<aquarius> >>> my_record = Record({ "name": "Stuart Langridge", "project": "Desktop Couch", "hair_colour": "red" }, record_type='http://example.com/testrecord')
<aquarius> # Create a record, currently not stored anywhere. Records must have a "record type", a URL which is unique to this sort of record.
<aquarius> >>> my_record["weight"] = "too high!"
<aquarius> # A record works just like a Python dictionary, so you can add and remove keys from it.
<aquarius> >>> my_record_id = my_database.put_record(my_record)
<aquarius> # Actually save the record into the database. Records each have a unique ID; if you don't specify one, the records API will choose one for you, and return it.
<aquarius> >>> fetched_record = my_database.get_record(my_record_id)
<aquarius> # You can retrieve records by ID
<aquarius> >>> print fetched_record["name"]
<aquarius> "Stuart Langridge"
<aquarius> # and the record you get back is a dictionary, just like when you're creating it.
<aquarius> That's some very basic code for working with desktop Couch; it's dead easy to save records into the database.
<aquarius> You can work with it like any key/value pair database.
<aquarius> And then desktopcouch itself takes care of things like replicating your data to your netbook and your desktop without you having to do anything at all.
<aquarius> And the users of your application can see their data directly by using the web interface; no more grovelling around in dotfiles or sqlite3 databases from the command line to work out what an application has stored.
<aquarius> You can get at the web interface by browsing to file:///home/aquarius/.local/share/desktop-couch/couchdb.html in a web browser, which will take you to the right place.
<aquarius> I'll stop there for some questions about this section!
<aquarius> (but first I'll fix the browser in lernid. Sorry about that, all. http://allaboutubuntu.files.wordpress.com/2008/02/bacon.jpg )
<aquarius> azathothgr> why a url ?
<aquarius> Two reasons: the first is that a URL is an easy way to ensure that record types are unique and don't clash (if you call your record type "recipe", someone else might independently pick that name)
<aquarius> and secondly, because you are encouraged (but not required!) to write something about the fields you expect in the record at that URL, so when someone else thinks "I would like my app to collaborate with yours on data", they can look at the detail of the record to find out why it's like it is.
<aquarius> virkang> QUESTION: can we store an entire file in a database record ?
<aquarius> sure. I mean, I wouldn't just dump the whole file in, I'd store it in some sort of structured way, but you can do so.
<aquarius> nadako70> QUESTION: how to configure the actual replication? :)
<aquarius> replication between machines on your network is set up with desktopcouch-pair, which is in the desktopcouch-tools package
<aquarius> replication to Ubuntu One is set up for you if you're an Ubuntu One user
<aquarius> danielbell> QUESTION: does record type have to be a single "word" can you have spaces in record types?
<aquarius> it needs to be a valid URL
<aquarius> something you can visit in your web browser.
<aquarius> brunogirin> QUESTION: can you limit replication to specific databases?
<aquarius> yes. At the moment it's harder than it should be, though. You need to edit the paired-server records in the management database in desktopcouch and add to excluded_names.
<aquarius> there's a Launchpad Answers question about this which should cover all the detail.
<aquarius> nvsbl91> QUESTION: does it matter what that url is?
<aquarius> nope, as long as it's unique to that record type.
<aquarius> OK, I shall carry on!
<aquarius> Next, on to views.
<aquarius> Being able to retrieve records one at a time is nice, but it's not what you want to do most of the time.
<aquarius> To get records that match some criteria, use views.
<aquarius> Views are sort of like SQL queries and sort of not. Don't try and think in terms of a relational database.
<aquarius> The best reference on views is the CouchDB book, available for free online (and still being worked on): the views chapter is at http://books.couchdb.org/relax/design-documents/views
<aquarius> Basically, a view is a JavaScript function.
<aquarius> When you request the records from a view, desktopcouch runs your view function against every document in the database and returns the results.
<aquarius> So, to return all documents with "name": "Stuart Langridge", the view function would look like this:
<aquarius> function(doc) { if (doc.name == "Stuart Langridge") emit(doc._id, doc) }
<aquarius> This sort of thinking takes a little getting used to, but you can do anything you want with it once you get into it
<aquarius> desktopcouch.records helps you create views and request them
<aquarius> # creating a view
<aquarius> >>> map_js = """function(doc) { emit(doc._id, null) }"""
<aquarius> >>> db.add_view("name of my view", map_js, None, "name of the view container")
<aquarius> # requesting the records that the view returns
<aquarius> >>> result = db.execute_view("name of my view", "name of the view container")
<aquarius> The "view container", called a "design doc", is a collection of views. So you can group your views together into different design docs.
<aquarius> Advanced people who know about map/reduce should know that this is a map/reduce approach.
<aquarius> You can also specify a reduce function (that's the None parameter in the add_view function above)
<aquarius> The CouchDB book has all the information you'll need on views and the complexities of them.
<aquarius> Questions on views? :-)
<aquarius> hemanth> QUESTION: can CouchDB used for webbased apps, like different user different db with the same login page?
<aquarius> It could be, yeah. That's a CouchDB question about running it on the server, which is a jolly useful thing to do, but desktopcouch isn't really about that; desktopcouch is about using the CouchDB technology to give people a cool DB on their desktop for their apps to use
<aquarius> so, it's a good question, I'm just not going to go into it here ;)
<aquarius> w1ngnutz> QUESTION:  You mentioned "record_type='http://example.com/testrecord". Does this need to be unique?
<aquarius> it's unique for a *type* of record.
<aquarius> so if you're writing an app which helps you remember recipes, and your app stores each recipe you want to remember as a record, then they'd all have the same record type
<aquarius> if your app stores a few different kinds of record, each kind of record would have a different record type
<aquarius> rovax31> QUESTION: is couchdb oython engine on for view parsing with desktop couch for js haters?
<aquarius> er, Crovax31, that was
<aquarius> it's not on by default (has mikeal finished writing it yet? :))
<aquarius> there's no reason why you couldn't install it and use it for your apps, though.
<aquarius> nadako70> QUESTION: oh, what about indexing, running a js function for every record seems not too optimal for frequent requests
<aquarius> it doesn't *really* run it every go. Instead, couchdb keeps cached versions of the values around, sort of, and when new records are added, they're added to the result sets for views at the same time. Sort of. But this is deep techie stuff. The Couch book has all the detail you could want about this.
<aquarius> osteenbergen> QUESTION: Why triple quotes?
<aquarius> so I can be lazy and not care if my JS code has quotes in. ;)
<aquarius> OK,I shall continue
<aquarius> There is an Even Easier way to have applications use desktop Couch for data storage.
<aquarius> One of the really cool things in karmic is Quickly: https://wiki.ubuntu.com/Quickly
<aquarius> quickly helps you make applications...quickly. :-)
<aquarius> and apps created with Quickly use desktopcouch for data storage.
<aquarius> If you haven't seen Quickly, it's a way of easily handling all the boilerplate stuff you have to do to get a project going; "quickly create ubuntu-project myproject" gives you a "myproject" folder containing a Python project that works but doesn't do anything.
<aquarius> So you can concentrate on writing the code to do what you want, rather than boilerplate to get started.
<aquarius> Quickly is gonna come up a lot this week. It's designed for opportunistic programming.
<aquarius> It's dead neat :)
<aquarius> jono's already covered quickly a bit in his introduction, and there's a session on it later in the week
<aquarius> Anyway, quickly projects are set up to save application preferences into desktop Couch by default. So you get the advantages of using desktop Couch (replication, browsing of data) for every quickly project automatically.
<aquarius> The quickly guys have also contributed CouchGrid:
<aquarius> >>> from desktopcouch.records.couchgrid import CouchGrid
<aquarius> >>> keys=["key","another key"] # to label the columns
<aquarius> >>> couchgrid = CouchGrid(db_name, record_type=record_type, keys=keys)
<aquarius> >>> mywindow.pack_start(couchgrid)
<aquarius> and then you have a CouchGrid, which is a data table where all the data is automatically retrieved from desktopcouch and stored back into desktopcouch when changed
<aquarius> http://www.youtube.com/user/calorielookup#p/a/u/0/Vwr5Xw5ZrIE has a video demonstrating couchgrids
<aquarius> oops, now everyone can hear rickspencer3 talking in the video ;)
<aquarius> CouchGrid is moving out of the desktopcouch core and into quidgets, a cool set of widgets deliberately designed to work well in quickly apps and be just as cool as quickly itself
<aquarius> You don't have to know anything about desktopcouch at all for this! Just use the widget and your data will be saved to the database and synced to your different machines with no effort or code on your part at all.
<aquarius> "quickly tutorial ubuntu-project" has lots of information about CouchGrid and how to use it.
<aquarius> Any questions about quickly? (I can't guarantee to be able to answer them, but #quickly is great for this.)
<aquarius> (specifically, questions about using quickly with desktopcouch. If you have questions about quickly itself, you'll be best asking them in the Quickly session, next)
<aquarius> So, who's already using desktopcouch?
<aquarius> Quickly, as mentioned, uses desktopcouch for preferences in projects it creates.
<aquarius> The Gwibber team are working on using desktopcouch for data storage
<aquarius> and that's working in the latest lucid, which is way, way cool
<aquarius> Bindwood (http://launchpad.net/bindwood) is a Firefox extension to store bookmarks in desktopcouch
<aquarius> Macaco-contacts is transitioning to work with desktopcouch for contacts storage (http://www.themacaque.com/?p=248)
<aquarius> Evolution can now, in the evolution-couchdb package, store all contacts in desktopcouch
<aquarius> Akonadi, the KDE project's contacts and PIM server, can also store contacts in desktopcouch
<aquarius> These last three are interesting, because everyone's collaborating on a standard record type and record format for "contacts", so Evolution and Akonadi and Macaco-contacts will all share information.
<aquarius> So if you switch from Gnome to KDE, you won't lose your address book.
<aquarius> I'm really keen that this happens, that applications that store similar data (think of mail clients and addressbooks, as above, or media players storing metadata and ratings, for example) should collaborate on standard formats.
<aquarius> lamalex_2> Is this as an alternative to gconf?
<aquarius>  no. gconf is about configuration. desktopcouch is about information. It ought to be possible to implement a desktopcouch back-end to gconf, though, and it's something that I've thought about and thought would be interesting
<aquarius> rickspencer3> A wiki space with existing record types would be nice
<aquarius> http://www.freedesktop.org/wiki/Specifications/desktopcouch has a few
<aquarius> but I do not want to give the impression that you have to get "approval" or anything, or be listed in a central repository
<aquarius> you can invent your own record types. Point them to whatever URL you choose. Get together with people and decide between yourselves.
<aquarius> There's no overall control. It's all about enabling people to work together. You don't have to "register" with the desktopcouch team or anything.
<aquarius> virkang> QUESTION: How are DesktopCouch and Ubuntu One related ?
<aquarius> Ubuntu One provides a home in the cloud for your desktopcouch data. This makes it easy to synchronize data between machines that aren't on the same network. You don't need to use Ubuntu One to use desktopcouch, and you can synchronize data between desktopcouches on your network without using Ubuntu One at all.
<aquarius> nilsr47> QUESTION: Any ideas for collaborating on record types?
<aquarius> if you've got an idea for a record type that you think that your app would use, and you think that others might want the same record type so you can all collaborate, get in touch with them and talk it over
<aquarius> the desktopcouch mailing list is a good place to have that discussion
<aquarius> (link shortly :))
<aquarius> [SLIDE 5]
<aquarius> so, why use desktopcouch? This is what you should take away from this talk.
<aquarius> It's an easy way to store data. You don't have to think about SQL statements. Just make a Python dictionary, which you already know how to do, and then store it.
<aquarius> Storing your data in desktopcouch means that it's everywhere, on all your machines. That's no extra work at all; we take care of all of that for you.
<aquarius> You get the web editor for free. It's so, so much easier to work with and play with and see what your application is doing if you can see all the data that it's storing.
<aquarius> And, where should you find more out?
<aquarius> [SLIDE 6]
<aquarius> Details about the desktopcouch project can be found at http://www.freedesktop.org/wiki/Specifications/desktopcouch
<aquarius> the documentation is also helpful (well, I hope it is), and http://www.freedesktop.org/wiki/Specifications/desktopcouch/Documentation#Iamadeveloper.2CandIwanttheapplicationsIwritetostoredatainandworkwithdesktopcouch is particularly relevant to this group
<aquarius> There's a mailing list at http://groups.google.com/group/desktop-couchdb
<aquarius> The code is developed in Launchpad: http://launchpad.net/desktopcouch
<aquarius> The best place to ask questions generally is the #ubuntuone channel; all the desktopcouch developers are hanging out there
<aquarius> The best place to ask questions that you have right now is...right now, so go ahead and ask in #ubuntu-classroom-chat, and I'll answer any other questions you have!
<aquarius> I've got about 3 minutes before rickspencer3 blows us all away with the sheer coolness of quickly :)
<aquarius> nilsr47> QUESTION: Do you have to do something special to run CouchDB?
<aquarius> NilsR47, no. Just use desktopcouch.records and it gets run for you. You never have to start it up manually.
<aquarius> titeuf_87> QUESTION if gconf is more for application configuration, why does quickly uses desktopcouch as default for storing settings?
<aquarius> that's a quickly question, that is ;)
<aquarius> there are benefits to using desktopcouch, like that you get the synchronization for free
<aquarius> it would be great if gconf had that, but that's quite a lot of work -- as mentioned earlier, one way to do that would be to implement a desktopcouch backend for gconf
<aquarius> <rickspencer3> mostly writing to gconf is too hard; writing to desktopcouch is dead simple; also, you get syncing
<aquarius> evrick67> hmm how do you get desktoopcouch to sync between computers on a network?
* ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - http://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Event: Ubuntu Opportunistic Developer Week - Current Session: Creating an application from scratch with Quickly - Rick Spencer - Instructor: rickspencer3 || Questions in #ubuntu-classroom-chat
<aquarius> if you're not using Ubuntu One, then check out the desktopcouch-pair program in the desktopcouch-tools package
<rickspencer3> aquarius, that was awesome!
<rickspencer3> since desktopcouch has come on the scene, I hardly persist anything anywhere else
<rickspencer3> it's so easy to use the records api
<rickspencer3> anywho, quickly time
<rickspencer3> ?
<rickspencer3> I have my class notes here:
<rickspencer3> https://wiki.ubuntu.com/UbuntuOpportunisticDeveloperWeek/Quickly/Intro
<rickspencer3> just in case it makes it easier to follow
<rickspencer3> Shall I begin?
<rickspencer3> let's roll
<rickspencer3> so what is Quickly?
<rickspencer3> first, Quickly is a community project that I started in my spare time
<rickspencer3> however, didrocks is the true author
<rickspencer3> I call Quickly, among other things, an "Application Templating System"
<rickspencer3> the essence of the project is to provide you boiler plate for the kind of program you want to write
<rickspencer3> so the code that you would have to write for every program of a certain type gets generated for you
<rickspencer3> that part, I call the "boiler plate"
<rickspencer3> but Quickly is also a set of commands
<rickspencer3> the boiler plate is designed to integrate with the Ubuntu Application infrastructure
<rickspencer3> thinks like bzr, launchpad, PPAs, etc...
<rickspencer3> and the commands are what make all that work
<rickspencer3> The moto of Quickly is "Easy and Fun"
<rickspencer3> to install it, go:
<rickspencer3> $sudo apt-get install quickly
<rickspencer3> this may take a while, as there are lots of tools and dependencies that get installed for you
<rickspencer3> Note that the current version is 0.2.5
<rickspencer3> this is the first iteration of quickly and comes with 1 template
<rickspencer3> it has support for PPAs and everything, but the launchpad integration is a bit brittle
<rickspencer3> the next version is 0.4, and didrocks will deliver that very very soon
<rickspencer3> it will be the version of Lucid
<rickspencer3> and it will have at least 2 templates, but maybe 3
<rickspencer3> the rest of the class will be in 4 parts:
<rickspencer3> Creating your app
<rickspencer3> Editing the UI
<rickspencer3> Writing Code
<rickspencer3> Packaging and PPAs
<rickspencer3> before we go, any questions?
<ClassBot> lamalex_2 asked: Is quickly always glade/python/etc., or is that template dependant
<rickspencer3> that is template dependant
<rickspencer3> since Ubuntu is a gnome based distro, the ubuntu-project template uses that
<ClassBot> stefodestructo asked: how hard is it to integrate an existing project into quickly?
<rickspencer3> there is no intrinsic importing system
<rickspencer3> I "ported' bughugger to quickly so I could get PPA support and such
<rickspencer3> since bughugger is python, I was able to generate a new quickly app, and then just start copying code over
<rickspencer3> it took about 30 minutes, I guess
<rickspencer3> there was a question about the new templates
<rickspencer3> didrocks added a command line app template (ubuntu-cli), and I am working on a pygame template
<rickspencer3> QUESTION: how much work would it be to create a kubuntu-project template?
<rickspencer3> probably not much
<rickspencer3> just write the boiler plate code
<ClassBot> brunogirin asked: are there plans to merge PPA/bzr integration with what ground contolr does?
<rickspencer3> all the launchpad commands and such could just inherit from the ubuntu-applcation template
<rickspencer3> I am very interested in pursuing that
<rickspencer3> I hope we have lots of productive sessions at UDS around the relationship between Quickly and Ground Control
<rickspencer3> let's move on to creating a project
<rickspencer3> in Karmic, to create an app, you do this:
<rickspencer3> quickly create ubuntu-project appname
<rickspencer3> where appname is a name you choose
<rickspencer3> note that in 0.2.5 ubuntu-project template only support one word application names :(
<rickspencer3> when you issue this command, an app will be generated for you
<rickspencer3> after you create it and test it out, there will be a new directory named after your app
<rickspencer3> so
<rickspencer3> cd appname
<rickspencer3> now you can run the app:
<rickspencer3> quickly run
<rickspencer3> or you can edit the code:
<rickspencer3> quickly edit
<rickspencer3> use tab completion to see all the commands you can do
<rickspencer3> or try
<rickspencer3> quickly help'
<rickspencer3> or
<rickspencer3> quickly tutorial
<rickspencer3> on 0.4, it will be slightly different
<rickspencer3> we changed the template name, so go:
<rickspencer3> quickly create ubuntu-application appname
<rickspencer3> also note that in .4 you'll be able to do multi-word names
<rickspencer3> like app-name
<rickspencer3> any questions about creating an app with quickly?
<rickspencer3> QUESTION: can you rename a quickly project once you've created it?
<ClassBot> danielbell asked: what are the other templates that might be in 0.4?
<rickspencer3> this is hard to do
<rickspencer3> sorry, I was very meant to cjohnston there :/
<rickspencer3> so, if you've created a project, there is all kinds of string replacement that goes on, so renaming is a hard manual process
<rickspencer3> maybe we should add a rename command
<rickspencer3> for the other templates, I mentioned ubuntu-cli, and maybe ubuntu-pygame or something
<rickspencer3> move on to editing the UI?
<rickspencer3> so, for the ubuntu-project, you'll use glade to edit the UI
<rickspencer3> Glade is a UI editing tool, that creates the XML you need to describe your windows and widgets
<rickspencer3> don't worry because the quickly template totally handles keeping the code and the XML hooked up
<rickspencer3> to start editing the UI in 0.2.5, use:
<rickspencer3> quickly glade
<rickspencer3> note that you MUST start glade this way
<rickspencer3> otherwise the correct files won't be loaded into glade and it won't work
<rickspencer3> in 0.4 we changed teh name of the command to:
<rickspencer3> quickly design
<rickspencer3> this is because perhaps other templates won't use glade
<rickspencer3> like I assume Kubuntu would not use Glade, for example
<rickspencer3> so here are some tips for using Glade if you are new to Glade
<rickspencer3> first, adding widgets works like a fill tool
<rickspencer3> you click the widget you want in the toolbox, and then click where you want it to be on the window
<rickspencer3> the widgets will then fill the space alloted to it
<rickspencer3> to layout the form, you use HBoxes and VBoxes
<rickspencer3> an HBox handles Horizontal layout, and a VBox handles veritical
<rickspencer3> so you will find yourself putting lots of boxes within boxes
<rickspencer3> when you add a widget to a window, you can select it in the "inspector" tree if it is hard to select in the window itself'
<rickspencer3> boxes can be hard to select in the window, for example
<rickspencer3> if a widget is in a box, use the position property in the "Property editor" window in the "packing" tab to change the order
<rickspencer3> you can also set the pack type to start or end to change the order
<rickspencer3> Fill and Expand control sizing
<rickspencer3> while Border and Padding control spacing
<rickspencer3> whenever possible, you should use "Stock" widgets
<rickspencer3> they get translated, the right icons, etc... automatically
<rickspencer3> finally, if you want to add a dialog to your project
<rickspencer3> you should:
<rickspencer3> 1. close glade
<rickspencer3> 2. go:
<rickspencer3> $quickly dialog dialogname
<rickspencer3> 3. quickly glade
<rickspencer3> that's for 0.2.5 in karmic
<rickspencer3> for 0.4 go
<rickspencer3> 1. close glade
<rickspencer3> 2. $quickly add dialog dialogname
<rickspencer3> 3. $quickly design
<rickspencer3> ok, that's the power trip through glade
<rickspencer3> and using it with quickly
<rickspencer3> any questions?
<ClassBot> astyguy asked: is there a front end for quickly for use with launchpad
<rickspencer3> quickly quite integrates with launchpad
<rickspencer3> I'll cover that int eh PPA section soon
<ClassBot> brunogirin asked: how much work would it be to create a kubuntu-project template?
<rickspencer3> I thik I answered that one
<rickspencer3> not too hard
<rickspencer3> how about this one:
<rickspencer3> QUESTION: do you have to use glade, or does quickly work with pygtk apps that don't use glade filez?
<rickspencer3> so, you do have to use the generated glade files
<rickspencer3> but if you want, you can just use good old python code to manipulate the contents
<rickspencer3> I do this all the time
<rickspencer3> so using Glade per say, is not required
<rickspencer3> every window or dialog created with the ubuntu-project template has a builder object built in
<rickspencer3> so you can easily go:
<rickspencer3> self.builder.get_object("vbox1")
<rickspencer3> and you have the main vbox for the window
<rickspencer3> you can start packing and removing children like that
<rickspencer3> let's talk coding a little
<rickspencer3> I have a couple of points here
<rickspencer3> oops
<rickspencer3> I forgot to discuss signals
<rickspencer3> signals are messages that your widgets send to your code
<rickspencer3> they get hooked up automatically for you
<rickspencer3> in glade, for an item in the editor, go to the signals tab of the editor for the widget
<rickspencer3> choose the "event" in teh widget that you want to create a signal for
<rickspencer3> then in the "handler" column, type the name for the handler that you want to use
<rickspencer3> a handler is just a function in your code file
<rickspencer3> it's a function that "handles" the signal
<rickspencer3> for running a function when the user selects a certain menu item, for example
<rickspencer3> create a handler in teh glade file for the "activated" signal
<rickspencer3> then create a function of that same name in the code file for that window or dialog
<rickspencer3> the handler signal should like this:
<rickspencer3> def handlername(self, widget, data=None):
<rickspencer3> so, some launchpad integration questions
<rickspencer3> we'll get to that in a few minutes, but it is MUCH improved in 0.4
<rickspencer3> anyway, a couple of notes about writing quickly code
<rickspencer3> but first, questions about signal handlers?
<rickspencer3> ok
<rickspencer3> so a quick tip or two
<rickspencer3> first, for Windows and Dialogs in the quickly template
<rickspencer3> don't write code in the __init__ function
<rickspencer3> rather, add your initialization code to the finish_initializing function
<rickspencer3> similarly, don't create instances of windows or dialogs directly
<rickspencer3> so, don't go
<rickspencer3> window = MyNamedWindow()
<rickspencer3> this will blow up
<rickspencer3> rather use the New*Window() or New*Dialog() functions that come with each window or dialog
<rickspencer3> for debugging, most people still just sprinkle print statements in their code
<rickspencer3> we added logging code to the quickly template
<rickspencer3> the idea being that you could use logging.debug(message) instead
<rickspencer3> but this is busted atm
<rickspencer3> we'll fix it before Lucid
<rickspencer3> there is also a debugger called pdb (for python debugger)
<rickspencer3> it works well, but is a bit complex
<rickspencer3> note that $quickly edit
<rickspencer3> will respect your default editor choices
<rickspencer3> QUESTION: And what's the benefit of using logger instead of print?
<rickspencer3> the advantage of logger is that you can cause it to only turn on using a command line switch
<rickspencer3> so you can run your app like:
<rickspencer3> $myapp -v
<rickspencer3> and only with the "-v" will it print debug statements
<rickspencer3> if you just use "print" and forget to delete them, whenever anyone runs the app they'll see your debug statements
<rickspencer3> QUESTION: New* even for default dialogs like a simple message?
<rickspencer3> use New* for Windows and Dialogs created by the ubuntu-project template
<rickspencer3> this is necessary in order properly instantiate the window or dialog and cause it to use the UI definition from Glade
<rickspencer3> this is a workaround for the way uibuilder works in pygtk atm
<rickspencer3> any more questions about coding before we talk packaging and PPAs?
<rickspencer3> QUESTION: any plans to include tasks for unit tests?
<rickspencer3> yes, this would be sweet
<rickspencer3> seems an easy matter to integrate trial into the templates
<rickspencer3> would love to see that soon
<rickspencer3> QUESTION so ground control is worth using with quickly ????
<rickspencer3> atm the projects are not coordinated
<rickspencer3> GC is really for the scenario of contributing to an existing project
<rickspencer3> where as quickly is currently about you creating and sharing your own project'
<rickspencer3> so for now, I would not mentally link them
<rickspencer3> however, they both have a lot of Launchpad integration code
<rickspencer3> and of course you would want folks to contribute to your project, right?
<rickspencer3> so I think some convergence is in store for Lucid + 1
<rickspencer3> also note that GC is very early stage development
<rickspencer3> I don't know that it will even be in universe for Lucid
<rickspencer3> but it's a very important project, so I would watch it closely
<rickspencer3> but in the meantime, if you are trying to get started with development, I would not conflate it with quickly
<rickspencer3> hth
<rickspencer3> ok
<rickspencer3> let'
<rickspencer3> s talk packaging
<rickspencer3> there is a command that goes:
<rickspencer3> $quickly package
<rickspencer3> it is very forgiving
<rickspencer3> it will create a deb for you without anyu configuration or mucking with Launchpad
<rickspencer3> a deb is suitable for testing on other computers and such
<rickspencer3> but let's talk about getting set up for packaging real quick
<rickspencer3> there are a few items to take care of first
<rickspencer3> 1. add your name and email to the copyright file
<rickspencer3> 2. $quickly license
<rickspencer3> this will add GPLv3 liscense to your code'
<rickspencer3> by default, your application is in the Applications -> Accessories category
<rickspencer3> you can change this in your appname.desktop.in file
<rickspencer3> finally, edit setup.py to add your name, email, a description, a long descriptions, etc...
<rickspencer3> this will make your deb a little nicer
<rickspencer3> then do
<rickspencer3> $quickly package
<rickspencer3> and you'll get a nice deb
<rickspencer3> QUESTION: Is the license always gplv3 or can you chose any foss license?
<rickspencer3> you can choose among a set of FOSS liscenses
<rickspencer3> I don't recall which are supported, but I bet that tab completion would show you
<rickspencer3> once you have a deb, you can double click on it, and it will install your app in your desktop
<rickspencer3> but then if you want to update your app, folks who installed it will have to find your deb and reinstall it
<rickspencer3> sux, right?
<rickspencer3> that's where PPAs come in
<rickspencer3> there are a couple of problematic areas here
<rickspencer3> first, PPAs are supposed to be secure, so they use encryption
<rickspencer3> encryption means "close is not close enough"
<rickspencer3> you have to be very precise in your setup
<rickspencer3> here is a quick set of steps:
<rickspencer3> 1. create ssh keys as per launchpad instructions
<rickspencer3> 2. create pgp keys as per launchpad instructions
<rickspencer3> BUT
<rickspencer3> be careful here
<rickspencer3> Don't use a comment!
<rickspencer3> after you have your keys set up, you want to tell your environment what it needs to know to use these keys
<rickspencer3> set DEBEMAIL and DEBFULLNAME in .bashrc, the same as what was in your gpg key
<rickspencer3> this should match what is in
<rickspencer3> match gpg --list-secret-keys
<rickspencer3> oops:
<rickspencer3> $gpg --list-secret-keys
<rickspencer3> so I add this to the end of my ~/.bashrc files:
<rickspencer3> export DEBEMAIL=rick.spencer@canonical.com
<rickspencer3> export DEBFULLNAME=Rick Spencer
<rickspencer3> of course, you need to create a PPA
<rickspencer3> if you are using karmic/quickly 0.2.5, name your PPA "ppa"
<rickspencer3> any other name won't work
<rickspencer3> with 0.4 you can choose the ppa to target
<rickspencer3> after you have that set up:
<rickspencer3> $quickly share
<rickspencer3> that puts your latest code into your PPA
<rickspencer3> or
<rickspencer3> $quickly release
<rickspencer3> does the same but also increments version and makes an announcement
<rickspencer3> then folks can subscribe to your PPA
<rickspencer3> also, don't forget to use:
<rickspencer3> $quickly tutorial
<rickspencer3> there is a good walkthrough there for getting an app going, and also some good links
<rickspencer3> note that the tutorial is not updated yet for 0.4
<rickspencer3> QUESTION: Why we shouldn't use comment when generating our gpg key?
<rickspencer3> because the template is not smart enough
<rickspencer3> it guesses what key to use based on your name and email
<rickspencer3> and the comment confuses it :/
<rickspencer3> ok, I guess that's my time
<rickspencer3> thanks
<rickspencer3> and head to #quickly for more questions!
* ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - http://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Event: Ubuntu Op portunistic Developer Week - Current Session: Building in Application Indicator support - Sense Hofstede - Instructor: qense || Questions in #ubuntu-classroom-chat
<qense> thank you rickspencer3!
<qense> Hello everyone! I'm Sense Hofstede and during the next hour I hope to learn you a bit about using Application Indicators in your application.
<qense> [SLIDE 1]
<qense> The slides for this session are located at <https://people.ubuntu.com/~qense/appind-session.pdf>.
<qense> If you've got a question, don't hesitate to ask in #ubuntu-classroom-chat. Start your question with 'QUESTION:' so it can be found.
<qense> [SLIDE 2]
<qense> First I'll talk a bit about what Indicator Application is and why you should use it.
<qense> After that we'll take a look at an example in Python, which I'm going to use to tell you about the way AppInd works.
<qense> Then I'll quickly explain the differences for other languages.
<qense> At the end of the session there will be time for questions. If you want to port your or someone else's application to Application Indicator and got a question about that, please save those for then.
<qense> It seems that I gave the wrong URL for the slides, people.ubuntu.comd eosn't suppoprt HTTPS, you want <http://people.ubuntu.com/~qense/appind-session.pdf> instead.
<qense> Everyone can get the slides now?
<qense> [SLIDE 3]
<qense> The purpose of Indicator Application is to give you a clean and consistent system tray.
<qense> This is done by taking the drawing of the status icon and its menu away from the applications and make them request the Indicator Application service to do it for them instead.
<qense> We are very strict, the only action allowed at the moment is the left mouse click, which spawns a menu. That is all, although we might see support for scroll events in the future.
<qense> For more information I would like to point you to the links some of you can already see at the slides:
<qense> https://wiki.ubuntu.com/DesktopExperienceTeam/ApplicationIndicators
<qense> That is the most important source of information.
<qense> And you've got:
<qense> https://wiki.ubuntu.com/CustomStatusMenuDesignGuidelines
<qense> and https://launchpad.net/indicator-application
<qense> [SLIDE 4]
<qense> Why should you all use Indicator Application?
<qense> One of the reasons is that the protocol we use is an implementation of the notification specification as proposed by KDE and as implemented in KNotify.
<qense> This means that  KDE applications using KNotify will show up in GNOME with native GTK+ menus and that applications using Indicator Application will show up in KDE with native Qt menus.
<qense> The most important thing, however, is that the tray is now under control of one application, which is much easier to configure and theme.
<qense> The behaviour of the tray icons is now consistent so users know what to expect.
<qense> If there are any questions about what I've just told, now is the time to ask.
<qense> If I'm going too fast, please let me know as well. ;)
<ClassBot> stefodestructo asked: does this work in windows and osx?
<qense> No, this works only on Ubuntu at the moment, and it could be built on other Linuxes as well. However, there is no port for Windows or Mac OS X and there is nothing like that planned either.
<ClassBot> titeuf_87 asked: is this an applet in the gnome-panel or does it actually use the "normal" system tray to display?
<qense> titeuf_87: AppIndicator uses the Indicator Applet that was introduced in Ubuntu with the Karmic release.
<ClassBot> PaulGit asked: If my application communicates with the indicator applet does it mean it will only run on Ubuntu and not other distros?
<qense> PaulGit: Good question. AppIndicator uses the standard KDE proposed at FreeDesktop. This means that anything implementing that standard will support it. At the moment this just are KDE 4 and Ubuntu Lucid. For other distributions you'll need a fall-back, which is integrated in the library.
<qense> one last question
<ClassBot> liems asked: Is it expected that this will be integrated into other distros?
<qense> This depends on the other distributions. The developers are actively working with GNOME upstream, so we'll have to wait what the outcome of that will be.
<qense> more on fallback, categories and your other questions later this session
<qense> [SLIDE 5]
<qense> We're now going to take a closer look at the way Indicator Applications work.
<qense> Karmic users wanting to see what's coming next in action need to install AppIndicator from a PPA: ppa:indicator-applet-developers/indicator-core-ppa
<qense> https://launchpad.net/~indicator-applet-developers/+archive/indicator-core-ppa/
<qense> We're going to walk through an example to get a better understanding of the applet.
<qense> At the wiki there are several examples in different languages. I've taken the Python example, adapted it a bit and uploaded it to
<qense> http://people.ubuntu.com/~qense/appind-example.py
<qense> First we import appindicator module in Python:
<qense> import appindicator
<qense> The we start with initialising the indicator:
<qense> ind = appindicator.Indicator ("example-simple-client", "indicator-messages", appindicator.CATEGORY_APPLICATION_STATUS)
<qense> The first argument is a unique identifier for the application. It is used in the file ~/.config/indicators/application/lru-file.json -- where a few details of the application are saved -- to identify it.
<qense> The second argument is the name of the icon that's to be used.
<qense> The third argument is a category that at the moment is just saved, but in the future Indicator Application could be extended to present the icons in a better way using that information.
<qense> We could e.g. sort the icons on category. Since we communicate with the applet over DBus other applications can listen in as well and process the tray icons if they would wish to. The categories are a possible filter.
<qense> However, at the moment the category not used.
<qense> You can find a list of possible categories at the wiki page.
<qense> The next line of code sets the status:
<qense> ind.set_status (appindicator.STATUS_ACTIVE)
<qense> There are three possible statuses, STATUS_ACTIVE, STATUS_PASSIVE and STATUS_ATTENTION, their meaning is: show, hide, show with the attention icon, which is set on the next line:
<qense> ind.set_attention_icon ("indicator-messages-new")
<qense> Again we're using an icon name, at the moment it is not yet possible to set the icon path in the Python bindings, but the developers are working on that bug.
<qense> In C# you can provide a path as the fourth argument of the constructor, in C you use the function app_indicator_new_with_path() .
<qense> By default we look in the icon theme for the icon.
<qense> Next thing we do in the code is creating a GtkMenu, we will later give it to the indicator.
<ClassBot> M58 asked: Does it support pixmaps for icons?
<qense> M58: It does not, the design team has chosen not to do so in order to make sure the icons blend nicely with the theme.
<qense> Again we're taking a bit power away from the application to make sure it integrates a bit nicer into the desktop.
<qense> Back to the menu: we tell appindicator about our menu with the following line of code.
<qense> ind.set_menu(menu)
<qense> Simple, not?
<qense> You can reuse existing menus if you want.
<qense> Signals connected to the menu items will be sent to their handlers like they would do when the menu was a part of the application.
<ClassBot> nadako70 asked: is gtkmenu actually used or is it only a sugar for creating some internal menu structure, so it can be recreated in qt by KDE applet?
<qense> nadako70: The menu is sent to libappindicator as GtkMenu and there it is processed as a GtkMenu, but it is sent over DBus in a structure that is toolkit-agnostic so it is drawn by the native GUI toolkit in both GNOME and KDE.
<qense> Don't forget to show() the menu items!
<qense> The little code I've pasted in this channel are about all method calls you have to make in order to set up an icon in the tray.
<qense> Are there any questions about what I've shown so far?
<qense> No?
<ClassBot> Fredo asked: Are there only two possible icons for an application?
<qense> Fredo: Yes, you can chose a default icon and another icon for when you want attention from the user.
<qense> There was some discussion about adding a basic function to the library for showing numbers, e.g. on the icon, but I'm not sure if that will get implemented.
<ClassBot> dael99 asked: what about adding items and connecting them with functions?
<qense> dael99: First you create just a regular GtkMenu like you would do for a GtkStatusIcon, you can often reuse the old menu when porting an application.
<qense> You add items, connect signals and then add the menu to the indicator.
<qense> [SLIDE 6]
<qense> The use of AppInd in other languages is pretty much the same,
<qense> in C you initialise the indicator with 'app_indicator_new(const gchar*, const gchar*, AppIndicatorCategory)', in C# with 'new ApplicationIndicator(string, string, AppIndicator.Category).
<qense> or, if you want to provide an icon path, you can use app_indicator_new_with_path() in C
<qense> You should be able to pass the icon path as the fourth argument of the C# constructor.
<ClassBot> NilsR47 asked: Is user choice of having the tray icon or not built in, or do we have to code that ourselves?
<qense> NilsR47: Good you mention this. The design guidelines for the use of the AppIndicator ( https://wiki.ubuntu.com/CustomStatusMenuDesignGuidelines ) say that it is preferable to give the user the possibility to hide the icon from the tray.
<qense> However, this is not implemented in the applet.
<qense> You're kindly asked to provide that option to the user by yourself.
<qense> However, since the tray is now controlled by one application it shouldn't be too hard to make it possible for the user to block an application there.
<qense> Back to the bindings in C and C#
<qense> In C you need to include the following header file:
<qense> #include <libappindicator/app-indicator.h>
<qense> The pkg-config name of the C bindings is 'appindicator-0.1'.
<qense> The package libappindicator-doc contains the documentation for the C library.
<qense> In C# you need to import the AppIndicator assambly:
<qense> 'using AppIndicator;'
<qense> The pkg-config name of the C# bindings is 'appindicator-sharp-0.1'.
<qense> Code examples for Python, C and C# -- the only three languages we're providing bindings for at the moment, work on Vala bindings is still ongoing -- can be found at the wiki page I mentioned a few times before already:
<ClassBot> bananeweizen asked: I'd like to use the API from Java. What's my best chance to get that working? Implementing a JNI wrapper around the C library?
<qense> bananeweizen: I'm not familiar with the procedure of generating Java bindings, so I'm afraid I can't help you with that. I do know that there is no one working on creating them at the moment.
<ClassBot> dscassel asked: What's the relationship with the Indictator Applet? Are they going to be folded into Application Indicators? If I just want to say "Hey, there's new stuff!" should I use Indicator Applet or Application Indicators?
<qense> dscassel: Although the the Indicator Applet listens to the Indicator Application service (and the users of KNotify) and is responsible for drawing the icons, we haven't put the tray in the indicator applet's envelope.
<qense> They're drawn next to it, on the left.
<qense> A great resource for all three available bindings for libappindicator is its main wiki page
<qense> https://wiki.ubuntu.com/DesktopExperienceTeam/ApplicationIndicators
<qense> it contains an example for all three bindings and an example of Autotools code you can add to your project's configure.ac
<qense> Earlier I heard someone ask about the fallback support I mentioned earlier this hour.
<qense> For the occasions where the Indicator Applet isn't reachable or when the user has chosen to remove it from her or his panel we provide a default fallback in two functions that can be overriden for those that want to implement a custom fallback.
<qense> These functions are in C "fallback()" and "unfallback()" and in C# "ApplicationIndicator.Fallback()" and "ApplicationIndicator.Unfallback()"
<qense> However, overriding the ApplicationClass in C# isn't possible at the moment. This is a known bug and we're working on it.
<qense> [SLIDE 7]
<qense> I've told everything I wanted to tell. Now I'm going to do a little Q&A. If your question doesn't get answered, or if you think of one later, please come to the #ayatana channel.
<qense> If you want to use AppIndicator in your application, but need help, now is the time to ask. Later you can also ask in the #ayatana channel or in #ubuntu-app-devel . At 23.00 UTC every night this week there will be a hacking party on #ubuntu-app-devel, that is also a good place to ask.
<ClassBot> liems asked: how long until the python bindings are feature-equivalent with the c/c# bindings?
<qense> liems: Of course it is impossible to say when specific bugs are fixed and features are ready. However, when the Python bindings lack in comparison with the C/C# bindings that is a bug and I would like to ask you to file it whenever you come across such a thing.
<ClassBot> nadako70 asked: offtop: was it inspired by osx? i remember there was some consistency in top panel indicators provided by ichat, their network manager, etc.
<qense> nadako70: It is certainly possible that some individuals partaking in the design process were influenced by what they saw on the Mac. However, I'm not aware that this is based on Mac OS's tray or was heavily inspired by.
<qense> The inspiration for this was the fact that the tray is too cluttered and doesn't go well with your theme, often.
<ClassBot> liems asked: Specifically, I'm interested in knowing when we can expect to be able to specify an icon path in python, and override fallback functions
<qense> liems: The goal is to fix as many of these bugs before the release of Lucid. I would recommend you to take a look at the indicator-application project on Launchpad. There is at least a bug report about the icon-theme-path not being supported by the Python bindings.
<ClassBot> Fredo asked: So is something like Rhythmboxâ tray icon, with several states like play, pause, stop, etc. out of the scope of AppInd?
<qense> Fredo: Rhythmbox is already using AppIndicators. There are different icons used to display the state of the player. For that we use the app_indicator_set_icon() function
<qense> You can also call the app_indicator_set_menu() function again when you've updated the menu.
<qense> My time's up!
<qense> Thank you all for listening!
<qense> And next is the incredible doctormo who will tell you more about Ground Control, you've heard a bit about that project already in the previous session.
* ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - http://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Event: Ubuntu Opportunistic Developer Week - Current Session: Integrated development workflow with Ground Control - Martin Owens - Instructor: doctormo || Questions in #ubuntu-classroom-chat
<doctormo> Hello everyone
<doctormo> We're here today to talk about Ground Control
<doctormo> So who here doesn't know what Ground Control is?
<doctormo> OK
<doctormo> So traditionally to get into Ubuntu development, where you can collaborate with other members of the community
<doctormo> You'd have to set up a launchpad account, set up your ssh keys, learn bzr and do a lot of red tape in the launchpad website
<doctormo> The ssh keys was actually the biggest barrier in userbillity studies
<doctormo> So what I've done is I've created a project called Ground Control that intergrates into launchpad
<doctormo> Sorts out your ssh keys, oauth tokens
<doctormo> Automatically
<doctormo> Then provides an interface in nautilus for dealing with launchpad projects and bzr branches
<doctormo> You can see a demonstration video of the version 1.0 here: http://blip.tv/file/3141629
<doctormo> In essence what we want to do is provide a way for _everyone_ to be able to use launchpad and the ubuntu desktop to create projects, get involved with existing projects and just feel more able to grab code and learn form it.
<doctormo> Does everyone have ground control installed?
<doctormo> https://launchpad.net/~doctormo/+archive/groundcontrol <- you can get it here
<doctormo> So the problem right now is that launchpad just changed it's login protocal to openid and groundcontrol is broken.
<doctormo> There isn't a lot we can do about that right now and since it's the configuration part, it's fairly useless without it.
<doctormo> For those who already had it installed and already logged in, you should be fine.
<doctormo> But I'm going to guess that we're all new here.
<doctormo> Right, so you can't use it right now no.
<doctormo> What we can do though is go through the work flow
<doctormo> OK so I've given you guys a couple of mins to finish the video off
<doctormo> When you first install GC (ground control), you will find a new menu item in your System > Preferences
<doctormo> This ground control configuration allows you to input your launchpad email address and password
<doctormo> and have the service activate everything required for development
<doctormo> It will also create a ~/Projects directory for you to hold all your projects
<doctormo> When you navigate to the Projects directory using nautilus file browser
<doctormo> You will see a bar at the top which says that you can [Create Project], [Fix a Bug] or [Fetch Project]
<doctormo> This allows you to step onto threee different workflows
<doctormo> Creating a project will create the directories locally for setting up your new project.
<doctormo> As well as a new trunk branch
<doctormo> This you can then start filling in files, and making your project. Once your happy with it, you can commit the code and it will automatically create the project in launchpad.
<doctormo> You then can invite other people to download your project and see what you've written
<doctormo> Using the Fetch Project button
<doctormo> This create a directory for the project and allows you to then download branches of code associated with the project.
<doctormo> Don't worry if you don't see Create Project, it's a new feature so older stable releases don't have it yet.
<doctormo> After downloading the code they can modify files and commit them back into launchpad under a different name from your trunk branch.
<doctormo> Then ground control will offer them a merge request button
<doctormo> which sends off a ticket to the original developer saying that this fix or addition is finished and needs to be submitted.
<doctormo> If it's your project, then you won't want to merge in your own changes, but instead will be merging in other peopole's
<doctormo> For that there is a button [Merge In] which allows you to see a list of all the merge requests and select from them which should be merged in and tested locally by you.
<doctormo> Once your happy with the modifications someone els ehas made
<doctormo> You can commit them like you usually would using the [Commit Changes] button.
<doctormo> The [Fix Bug] button is a special workflow
<doctormo> It allows you to select from a list of a project's open bug reports and have it download the trunk branch in preparation for you to try and fix it.
<doctormo> When you've fixed it, it commits the code, attaches the branch to the bug report and uploads the code with a merge request all in one action.
<doctormo> Any questions so far?
<doctormo> <M58> QUESTION: Does [Fix Bug] install packages required to build the project?
<doctormo> M58: No, not yet, but there are plans afoot for that.
<doctormo> <diplo> doctormo, I  already have a dir called ~/Projects, does this directory only have to have code for Ground Control or is it happy to co-exsist ?
<doctormo> You can have an existing Projects directory, it won't interfere.
<doctormo> It's based on context, so if you put the .groundcontrol file into another directory, you'll then be using that directory as your base of operations.
<doctormo> <doliomp95> QUESTION: When I hit [Fix Bug] is there anyone informed about my try to fix this bug? I mean, what happens if I just decide to leave it alone, will someone wait for me to fix this bug?
<doctormo> doliomp95: There is no notification in the bug report that you've downloaded the code to fix the bug. Not until you've submitted the fix will it notify anyone.
<doctormo> <bananeweizen> QUESTION: Is there any "sandbox" project for people wanting to try ground control for the first time? I really want to change typos, missing translation markers and other things in some projects but I'm afraid of making errors in the process.
<doctormo> bananeweizen: Don't worry! when you upload your fix it goes into it's own seperate branch, no matter how baddly you foul it up in your first fix, the developers will let you know that _your_ branch is broken in some way and how to avoid it in future.
<doctormo> bananeweizen: You can then redownload the branch and try and fix it again, or correct the problems in your first one
<doctormo> Because the code your submitting is your own personal copy
<doctormo> It doesn't interfere with the originals
<doctormo> Only once your fix is good, working etc will the developers merge in your changes to their central development branch.
<doctormo> <M58> Is there a KDE version?
<doctormo> M58: Not yet, KDE is very different and if the project had been made to work on both it might not have been possible.
<doctormo> M58: I don't know if a KDE version is possible, but the project would need a dedicated kde developer to kick it off.
<doctormo> <wilsonliam> QUESTION: How long will it be until new users are able to log in, fo you think?
<doctormo> wilsonliam: I'm hoping to get the bug fixed today or tomorrow and then put a release out of 1.6
<doctormo> If you can all sign up to my blog http://doctormo.ubuntu-ma.us you'll get a notification when it's done.
<doctormo> and I am sorry about that, it's a very recent change in launchpad and it just goes to show.
<doctormo> OK so are there any other questions about workflow, bzr, launchpad or functionality?
<doctormo> <w1nGNUtz> QUESTION: how developers merge code? Launchpad provide any tool for that you it is done via GC?
<doctormo> w1nGNUtz: Developers can merge in code using the [Merge In] button that appears in your directory when you have commited all your changes and you own the branch (it's important thtat you own the branch)
<doctormo> <titeuf_87> QUESTION: for more popular projects, what will happen if there are tons of branches from people messing around with it but abandon those branches? Will they just stay there?
<doctormo> titeuf_87: All branches will stay, but most branches will get marked as abandoned and so won't appear in the listings.
<doctormo> <M58> QUESTION: What if there is conflict during merge?
<doctormo> M58: Currently you will have to resolve conflicts manually.
<doctormo> But there is already an open bug report for it https://bugs.launchpad.net/groundcontrol/+bug/514531
<doctormo> <w1nGNUtz> QUESTION: Is there any way to update the baseline like, svn update for svn?
<doctormo> w1nGNUtz: There is an [Update] button that appears when you have no local changes, this allows you to re-pull to the parent.
<doctormo> OK we got 10 more mins of questions, or I can worrble on about how great ground control is :-) ... will be when it's fixed.
<doctormo> So what we're hopefully going to be able to do with ground control, is develop a real difference in the way we get people collborating
<doctormo> Because we want graphics project, writing projects, all sorts of ubuntu projects that isn't just related to programming
<doctormo> Now, one feature which I haven't explained yet, is for project managers. This allows you to specify script actions for your branches, so for isntance if you get the loco directory project code, it has a button to sync the database or run the server. These are configured in a .gcfunctions file int he code.
<doctormo> You can see this explained here: http://doctormo.ubuntu-ma.us/2010/02/15/groundcontrol-1-5-%E2%80%93-custom-scripts-and-bug-fixes/
<doctormo> <wilsonliam> QUESTION: Say if you and someone else are working on the same branch, and you both commit the changes at a similar time, would this cause a conflict, or would it merge the two together?
<doctormo> wilsonliam: If you are both working on the same branch (which you shouldn't be) one of you will experence an error saying that your local copy isn't up to date
<doctormo> wilsonliam: Then you will have to press the [Update] button to merge back in all changes just made and hopefully you won't get any conflicts. But it's the Update section is where you will experence those.
<doctormo> Once your up to date, you can commit and push as you normally would.
<doctormo> OK, 5 more minutes.
<doctormo> I think we're done here then. Thank you all for coming and asking such good questions
<doctormo> I'm sorry about the breakage, hopefully when it's fixed you'll give it a go and let me know what you think.
* ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - http://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi
#ubuntu-classroom 2010-03-02
<zubin71> hi im writing some documentation. id like to explain what an upstream is, in a clear manner. could someone please help?
<persia> zubin71: I can't find a nice definition from a quick wiki search.  Hunt up jcastro in #ubuntu-community-team :  he tends to have good answers to this class of question.
<zubin71> persia, ok... thankx! :)
<black_aprentice> let's hack
<black_aprentice> ?
<persia> black_aprentice: You might be early for a class.  You're looking for the opportunistic developer stuff?
<black_aprentice> yup, but I already got the new that it starts at 1 pm in my time here
<persia> black_aprentice: You might want to hang out in #ubuntu-app-devel in the meantime.  That's the all-day-every-day place for discussions about creating apps.
<black_aprentice> persia: already there, but no activity at this time also
<persia> Oh well :(
<Umpa> was isn nu eigentlich?
<rickspencer3> class time?
<rickspencer3> time to talk about goocanvas?
* ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - http://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Event: Ubuntu Opportunistic Developer Week - Current Session: Gooey Graphics with GooCanvas - Rick Spencer - Instructor: rickspencer3 || Questions in #ubuntu-classroom-chat
<rickspencer3> okay, let us rock
<rickspencer3> as usual I have put my class notes on the wiki:
<rickspencer3> https://wiki.ubuntu.com/UbuntuOpportunisticDeveloperWeek/GooCanvas
<rickspencer3> I'll be using python and pygoocanvas for code samples to talk about goocanvas today
<rickspencer3> There is good reference documentaion for goocanvas:
<rickspencer3> http://people.gnome.org/~gianmt/pygoocanvas/
<rickspencer3> llive it, learn it, love it ;)
<rickspencer3> Unfortunately, it can be a bit tough to find code samples and tutorials
<rickspencer3> :(
<rickspencer3> so, let's take a look
<rickspencer3> So what is a goocanvas?
<rickspencer3> A goocanvas is a 2d composing surface
<rickspencer3> You can use it to make pretty much any kind of "image"
<rickspencer3> It's kind of like an api around a drawing program
<rickspencer3> So you can have a ton of fun using a goocanvas, because you are pretty much freed from the constraints of a widget library in creating your UI
<rickspencer3> goocanvas is cairo under the covers
<rickspencer3> and is designed to easily integrate into your gtk app
<rickspencer3> so, before we get into specifics
<rickspencer3> questions?
<rickspencer3> and note, I will be trying Classbot for the first time, so bear with me for a bit
<rickspencer3> no questions?
<ClassBot> eviltwin asked: is goo canvas considered the "approved" replacement to libgnomecanvas?
<rickspencer3> I don't know
<rickspencer3> I like goocanvas for it's capabilities
<ClassBot> setimike asked: Is goocanvas sort of like glade?
<rickspencer3> not at all
<rickspencer3> glade is a tool which creates XML files that describe gtk layouts
<rickspencer3> goocanvas is a widget which you embed in your program and then use as a drawing surface
<rickspencer3> let's take a look
<ClassBot> nadako asked: is it some OO-wrapper for basic cairo drawing things?
<rickspencer3> yes
<ClassBot> luismmontielg asked: How do we get pygoocanvas?
<rickspencer3> from the repos
<ClassBot> damo12 asked: Can glade add a widget area for pygoocanvas?
<rickspencer3> I don't think there is a way to do that
<rickspencer3> but I will show you how to add it with code
<rickspencer3> So let's add a goocanvas to a pygtk app
<rickspencer3> Add it just like a normal pygtk widget
<rickspencer3> here's some code
<rickspencer3> self.__goo_canvas = goocanvas.Canvas()
<rickspencer3> self.__goo_canvas.set_size_request(640, 480)
<rickspencer3> self.__goo_canvas.show()
<rickspencer3> Be sure to set the size, otherwise it defaults to 1000,1000, it does not default to
<rickspencer3> the size alloted to it in your window.
<rickspencer3> this is different than normal gtk.Widgets where size is managed for you
<rickspencer3> Handle window resizing to resize your goocanvas as well
<rickspencer3> For example, if your goocanvas is in a VBox, you can do this:
<rickspencer3> rect = self.builder.get_object("vbox2").get_allocation()
<rickspencer3> self.__goo_canvas.set_bounds(0,0,rect.width,rect.height)
<rickspencer3> store a reference to the root item for your goocanvas, you'll need it later often
<rickspencer3> self.__root = self.__goo_canvas.get_root_item()
<rickspencer3> The "root" is kinda like the root of an item tree in XML
<rickspencer3> so if you do this, you'll have a goocanvas in your app, ready to rock
<rickspencer3> questions?
<rickspencer3> ok
<rickspencer3> let's look at adding things to your goocanvas surface
<rickspencer3> I got into goocanvas while working on photobomb
<rickspencer3> so I have some code that I can use for examples
<rickspencer3> so let's take the example of adding an image to your goocanvas
<rickspencer3> assuming you want to modify the image and combine it with other drawing items
<rickspencer3> Anything that can be added to a goocanvas is an Item. It get's it's capabilities by inheriting from ItemSimple, and by implementing the Item interface.
<rickspencer3> plus each items has some extra capabilities
<rickspencer3> so look at the reference for the specific item class, as well as Item and ItemSimple
<rickspencer3> Let's add an item to the goocanvas to get a look at how it works in general.
<rickspencer3> We'll start by adding an image.
<rickspencer3> First, you need to get a gtk.pixbux for your image:
<rickspencer3> pb = gtk.gdk.pixbuf_new_from_file(path)
<rickspencer3> Then you calculate where you want the image to show on the goocanvas. You'll need a top and a left to place most items on a goo canvas.
<rickspencer3> For example, to center the image, I do this:
<rickspencer3> cont_left, cont_top, cont_right, cont_bottom = self.__goo_canvas.get_bounds()
<rickspencer3> img_w = pb.get_width()
<rickspencer3> img_h = pb.get_height()
<rickspencer3> img_left = (cont_right - img_w)/2
<rickspencer3> img_top = (cont_bottom - img_h)/2
<rickspencer3> I've calculated the top and left of the item
<rickspencer3> now I am ready to create it
<rickspencer3> Note that I create the Item, but there is nothing like goocanvas.add(item)
<rickspencer3> rather, when you create the item, you set it's parent property.
<rickspencer3> it's different than most container relationships, like in PyGtk
<rickspencer3> The parent property is the root of the goocanvas
<rickspencer3> This is why I remember the root
<rickspencer3> because I will be using it whenever I create items for the goocanvas
<rickspencer3> finally, here's the code to create the image on teh goocanvas:
<rickspencer3> goocanvas.Image(pixbuf=pb,parent=self.__root, x=img_left,y=img_top)
<rickspencer3> This basic pattern is how you add all other types of items.
<rickspencer3> decide where to put the item, and set it's parent property to the root of the goocanvas.
<rickspencer3> To remove the item from the goocanvas, you don't tell the goocanvas to remove it
<rickspencer3> rather you tell the item to remove itself
<rickspencer3> item.remove()
<rickspencer3> questions so far?
<rickspencer3> no questions?
<rickspencer3> alright then
<rickspencer3> let's talk a bit about different types of items that you can add
<rickspencer3> In my mind, there are really 3 types of items
<ClassBot> nadako asked: why not standard add/remove functions from parent obj?
<rickspencer3> I have no idea
<rickspencer3> this is just how the API is
<rickspencer3> I presume it's because it is a wrapper around a c-api
<rickspencer3> as I was saying,
<rickspencer3> In my mind, there are really 3 types of items
<rickspencer3> first is normal items that you add to draw the stuff you want
<rickspencer3> this includes:
<rickspencer3> Ellipse, Image, Path, Polyline, Rect, and Text
<rickspencer3> then there are Layout and group items include:
<rickspencer3> Group, Grid, and Table
<rickspencer3> And then there is also Widget. Widget is pretty cool.
<rickspencer3> You can add a gtk widget to your goocanvas, but note that it will live in a world seperate from the goocanvas
<rickspencer3> gtk.Widgets won't be rendered if you create images form our goocanvas and such
<rickspencer3> However, this is a cool way to add in situ editing to your goocanvas
<rickspencer3> We'll just be talking about normal items for the rest of this class though
<rickspencer3> I'll take some questions now, if you've got 'em
<ClassBot> fagan asked: What formats does GooCanvas support? (png,jpeg,svg..etc)
<rickspencer3> ya know, I never really investigated
<rickspencer3> I would presume the first two
<rickspencer3> in terms of svg, perhaps that would be supported a bit differently, as many of the items are described with svg language
<rickspencer3> or can be
<rickspencer3> like an elipse in an svg would be turned into an elipse item
<rickspencer3> rather than rendered as an image
<rickspencer3> I would be interested to see what different things people try and how it works for them
<ClassBot> tm_lv asked: why goocanvas?
<rickspencer3> this is a good question
<rickspencer3> I used goocanvas for photobomb because:
<rickspencer3> 1. it was an easy API
<rickspencer3> 2. it integrate well with pygtk
<rickspencer3> 3. it had good reference docs
<rickspencer3> 4. it had the functionality to do the things I wanted
<rickspencer3> for #4 that was stuff like adding text, paths, etc...
<rickspencer3> and also the ability to render off images easily
<ClassBot> nadako asked: is there any ready-to-use things like connector lines that connects two elements and follow their positions
<rickspencer3> not that I know of
<ClassBot> nadako asked: also, what about interactivity? drag/drop, mouse clicks, etc
<rickspencer3> you handle that manually
<rickspencer3> I'll mention mouse handling briefly
<rickspencer3> late
<rickspencer3> r
<rickspencer3> ok, so moving on
<rickspencer3> So what are some of the things that you do with an item?
<rickspencer3> Well, you compose with it. So you scale it, move it, rotate it, change it's z-order and such
<rickspencer3> For a lot of things that you want to do with an item, you use set_property and get_property
<rickspencer3> this is the same way of interacting with properties in pygtk, but you do lots more of it in goocanvas
<rickspencer3> For example, to set the a might make a Text item like this:
<rickspencer3> txt = goocanvas.Text(parent=self.__root,text="some text", x=100, y=100, fill_color=self.__ink_color)
<rickspencer3> so here I am adding some text and it will say "some text"
<rickspencer3> it will be at x,y 100,100
<rickspencer3> and will use the stored ink color
<rickspencer3> then change the text in it like this:
<rickspencer3> txt.set_property("text","new text")
<rickspencer3> if I want to know what the text is, I can say:
<rickspencer3> my_string = txt.get_property("text")
<rickspencer3> some capabilities are accessed directly
<rickspencer3> such as bounds
<rickspencer3> but most are accessed like this
<rickspencer3> Let's look at colors for a moment.
<rickspencer3> There are generally two color properties to work with, stork-color, and fill-color
<rickspencer3> stork-color?
<rickspencer3> let's call that stoke-color
<rickspencer3> :)
<rickspencer3> If you've ever used a tool ink inkscape, this will make sense you to
<rickspencer3> for something like a rect, stroke-color is the outline of the rectangle, and fill-color is the inside of the rectangle
<rickspencer3> before I discuss a bit more about transforming items ...
<rickspencer3> any questions?
<ClassBot> nadako asked: so it's only about drawing things?
<rickspencer3> sort of
<rickspencer3> I was able to use goocanvas to make a pretty functional editing surface in photobomb
<rickspencer3> it included dragging, drawing lines with a pen too, and saving pngs
<rickspencer3> but essentially, yes, it's a drawing surface
<ClassBot> tm_lv asked: getters and setters seem to be result of crappy bindings. do you know if there is any work done to make them more pythonic?
<rickspencer3> I agree
<rickspencer3> but I don't know of any more work to make it more pythonic
<rickspencer3> while the API is not perfect, it is functional and robust
<rickspencer3> ok
<rickspencer3> moving on a bit
<rickspencer3> You can move, rotate, resize, and skew items
<rickspencer3> The APIs for doing this are intuitive, imho
<rickspencer3> To grow something by 10%
<rickspencer3> :
<rickspencer3> item.scale(1.1,1.1)
<rickspencer3> that says make it 1.1 times as tall and wide as it is now
<rickspencer3> And to shrink it a bit:
<rickspencer3> item.scale(.9,.9)
<rickspencer3> Note that the items always consider themeselves to be their original size and orientation, so doing this will cause an item to grow twice:
<rickspencer3> item.scale(1.1,1.1)
<rickspencer3> item.scale(1.1,1.1)
<rickspencer3> Now, when you start rotating and skewing items, some pretty confusing stuff can start happening
<rickspencer3> Essentially, an item tracks it's own coordinate system, and doesn't much care about the goocanvas's coordinate system
<rickspencer3> So if you rotate an item, for example, the coordinate systems are totally out of whack
<rickspencer3> So if you pass the x/ys to an item based on the canvas's coordinate system, it can get waaaay weird
<rickspencer3> like if you have a an item rotated 180 degrees
<rickspencer3> and you tell it to add 100 to it's x
<rickspencer3> it will move left!
<rickspencer3> because the items doesn't know or care that it is rotated
<rickspencer3> Fortunately, goocanvas has some functions on it that just do these transforms for you
<rickspencer3> let's say I catch a mouse click event on an item
<rickspencer3> and I want to know where on the item the click happened
<rickspencer3> well, the click coordinate are reported in the goocanvas's coordinate system, so I need to do a quick calculation to determine where the click happened on the item:
<rickspencer3> e_x, e_y = self.__goo_canvas.convert_to_item_space(self.selected_item,event.x,event.y)
<rickspencer3> here self.selected_item is the item who's coordinate system I want to convert to
<rickspencer3> so now e_x is x from the item
<rickspencer3> 's point of view, not the goocanvas point of view
<rickspencer3> phew
<rickspencer3> this is weird, but you get used to it
<rickspencer3> so, good time for some questions if there are any
<ClassBot> tm_lv asked: can you nest items in goocanvas?
<rickspencer3> yes, but I haven't done that
<ClassBot> nadako asked: can you give a link to that photobomb app?
<rickspencer3> sure, it's in my junk folder
<rickspencer3> https://code.edge.launchpad.net/~rick-rickspencer3/+junk/photobomb
<ClassBot> luismmontielg asked: What could be easier to implement, for a small pygtk app, using pyclutter or pygoocanvas? or whats the difference between those 2
<rickspencer3> clutter is also very cool
<rickspencer3> but it's a wrapper around OpenGL
<rickspencer3> I suspect that for a small 2d surface, goocanvas will be much better
<rickspencer3> however, for rendering animations, clutter will be much better
<rickspencer3> you can do drag and drop and such on goocanvas with no problem
<rickspencer3> and it has some animation support
<rickspencer3> by clutter is all about animations, especially in a cool 3d way
<ClassBot> tm_lv asked: following on the previous one, i'd like to insert a shameless plug - contender #3 the hamster graphics library, sprite-based and python pure: http://wiki.github.com/tbaugis/hamster_experiments/
<rickspencer3> shameless plug accepted ;)
<rickspencer3> ok
<rickspencer3> moving on
<rickspencer3> Just a quick word on paths
<rickspencer3> A path is essentially a "squiggle"
<rickspencer3> It is defined by a string that gets parsed into x,y coords, and then drawn with a bezier curve formula applied
<rickspencer3> let's take a look
<rickspencer3> the curve stuff is a bit of math that I don't much understand
<rickspencer3> but just to get you started, here is a string that describes a scribble
<rickspencer3> line_data = "M 4.0 4.0C4.0 4.0 5.0 4.0 5.0 4.0 5.0 4.0 6.0 4.0 6.0 3.0 10.0 1.0 13.0 2.0 9.0 15.0 6.0 36.0 28.0 11.0 28.0 11.0 29.0 11.0 33.0 12.0 33.0 15.0 32.0 19.0 27.0 51.0 27.0 53.0 27.0 54.0 27.0 54.0 27.0 54.0 36.0 49.0 37.0 49.0"
<rickspencer3> it just kind of traces some x/y coords
<rickspencer3> then I can make a path out of this:
<rickspencer3> path = goocanvas.Path(data=line_data, parent=self.__root, line_width=self.__ink_width, stroke_color=self.__ink_color)
<rickspencer3> so this will draw the squiggle in the goocanvas
<rickspencer3> Now, a path is also useful because you can use it to clip another object
<rickspencer3> like you can draw an arbitrary path around an item and use it kind of like a pair of scissorrs
<rickspencer3> You don't use a path object for this, just the string
<rickspencer3> item.set_property("clip-path",line_data)
<rickspencer3> pretty cool!
<rickspencer3> any questions about paths and such?
<rickspencer3> ok
<rickspencer3> let's go on then
<rickspencer3> somebody asked about managing mouse movements and such
<rickspencer3> In terms of mousing a goocanvas has the normal gtk mouse tracking capabilities
<rickspencer3> to track mouse clicks, for example:
<rickspencer3> self.__goo_canvas.connect("button_press_event",self.mouse_down)
<rickspencer3> so you can also connect to mousedown, mousemove, mouseup, etc... to handle dragging items around
<rickspencer3> self.__motion_handler = self.__goo_canvas.connect("motion_notify_event",self.item_moved)
<rickspencer3>                 self.__mouse_up_handler = self.__goo_canvas.connect("button_release_event",self.drag_stop)
<rickspencer3> so that's how I handle dragging items in photobomb
<rickspencer3> it's a manual process
<rickspencer3> questions?
<rickspencer3> ok
<rickspencer3> let's go on to the last section
<rickspencer3> rendering
<rickspencer3> a goocanvas can use cairo surfaces to render off snapshots of itself
<rickspencer3> So if I want to make a png, I use an image surface
<rickspencer3> x, y, w, h = self.__goo_canvas.get_bounds()
<rickspencer3> surface = cairo.ImageSurface(cairo.FORMAT_ARGB32, int(w), int(h))
<rickspencer3> context = cairo.Context(surface)
<rickspencer3> context.rectangle(0, 0, 1000, 1000)
<rickspencer3> context.set_source_rgb(1, 1, 1)
<rickspencer3> context.fill()
<rickspencer3> self.__goo_canvas.render(context)
<rickspencer3> surface.write_to_png(image_path)
<rickspencer3> (I sniped this originally from segphaults grabbersnap code)
<rickspencer3> There are other cairo surfaces as well, including a PDF surface
<rickspencer3> so you can render to a pdf, for example
<rickspencer3> okay, that's the last bit of material I prepared
<rickspencer3> any questions about anything?
<ClassBot> quappa1 asked: Can I try photobomb on Karmic? Seems that in your PPA it's only for Lucid.
<rickspencer3> I suppose
<rickspencer3> I think it should work
<rickspencer3> just pull from trunk and give it a try
<ClassBot> ems asked: any chance you could add some goocanvas snippets to acire?
<rickspencer3> I suppose
<rickspencer3> I don't know when I would get to it
<rickspencer3> I would be glad to help someone else who wants to give it a try
<ClassBot> luismmontielg asked: is there any code examples for this? simple working examples?
<rickspencer3> not too many
<rickspencer3> that's why I wanted to do the class
<rickspencer3> photobomb and grabber snap both use it a bit
<rickspencer3> so lots of samples there, but no snippets yet that I know of
<ClassBot> fagan asked: will photobomb get into the repo any time soon? :)
<rickspencer3> uh
<rickspencer3> well
<rickspencer3> look at the code and let me know what you think
<rickspencer3> there are lots of ideas cram in there, and some pretty bad bugs
<rickspencer3> :)
<rickspencer3> maybe sometime though
<rickspencer3> unless someone wants to take over and finish it off
<rickspencer3> no more questions and 7 minutes early!
<rickspencer3> you folks were a great class, thanks for coming
<ClassBot> quappa1 asked: photobomb requires something called quickly.prompts. so probably no luck on Karmic? :)
<rickspencer3> oh goodness
<rickspencer3> yes, that is not in karmic
<rickspencer3> but if you are dedicated, you could hack it together
<rickspencer3> like pull the quidgets project and stick the code in the photobomb library
* ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - http://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Current Session: Writing a Rhythmbox plug-in - Stuart Langridge - Instructor: aquarius || Questions in #ubuntu-classroom-chat
<aquarius> Hi, everyone, I'm Stuart Langridge
<aquarius> Today I'm going to talk about making a Rhythmbox plugin.
<aquarius> but first I should say: cool talk about goocanvas, rickspencer3 :)
<aquarius> If you're using Lernid, you'll see slides with code examples. If you don't have Lernid, don't worry; all the code for this plugin is available, and you can look through it to see what I'm talking about, or you can load the slide deck yourself from http://www.kryogenix.org/code/RBMicroBlog
<aquarius> Specifically, I'm going to talk about making a Python plugin. If you're hoping for in-depth C knowledge, you're talking to the wrong dude.
<aquarius> Feel free to ask questions in #ubuntu-classroom-chat, and I'll answer them at the end; if someone could collect them, that'd be great.
<aquarius> or, actually, I'll use ClassBot :)
<aquarius> What with this being Opportunistic Developer Week and all, I'm aiming for something which scratches a little itch.
<aquarius> The itch I want to scratch is explained by a tweet I saw from @mandel_macaque, which said
<aquarius> [SLIDE 2]
<aquarius> â¥ Space Oddity by David Bowie #lastfm: http://bit.ly/15zv4
<aquarius> and I thought: hey, that's quite cool, he's tweeting songs that he's playing that he likes.
<aquarius> I'd like to do that. But I don't use last.fm, I use Rhythmbox to play my music.
<aquarius> So why not have a "tweet this song" button, so I can hit it when a song that I like comes along?
<aquarius> A Rhythmbox Python plugin comes in two parts: an .rb-plugin file, which describes your plugin, and a Python module.
<aquarius> [SLIDE 3]
<aquarius> Our first stage, then, is to set up the plugin itself.
<aquarius> Create the Rhythmbox plugins folder, which you might already have:
<aquarius> mkdir -p ~/.gnome2/rhythmbox/plugins
<aquarius> Now, create a folder for our plugin, which we'll call RBMicroBlog
<aquarius> mkdir -p ~/.gnome2/rhythmbox/plugins/RBMicroBlog
<aquarius> In there create a __init__.py file:
<aquarius> touch ~/.gnome2/rhythmbox/plugins/RBMicroBlog/__init__.py
<aquarius> and an .rb-plugin file:
<aquarius> gedit ~/.gnome2/rhythmbox/plugins/RBMicroBlog/RBMicroBlog.rb-plugin
<aquarius> Your rb-plugin file has a specific format:
<aquarius> [SLIDE 4]
<aquarius> [RB Plugin]
<aquarius> Loader=python
<aquarius> Module=RBMicroBlog
<aquarius> IAge=1
<aquarius> Name=Microblogging
<aquarius> Description=Microblog what you're listening to
<aquarius> Authors=Stuart Langridge <sil@kryogenix.org>
<aquarius> Copyright=Copyright Â© 2010 Stuart Langridge
<aquarius> Website=http://www.kryogenix.org/code/rhythmbox-microblog
<aquarius> The important lines in that are the two that tell Rhythmbox "this is a Python plugin", and "the module name for this plugin is RBMicroBlog".
<aquarius> [SLIDE 5]
<aquarius> Python, as you will (hopefully) know, treats a folder called X with an __init__.py file inside as a module named X.
<aquarius> So, we have our RBMicroBlog folder, with __init__.py inside, which is therefore a Python module
<aquarius> and also in that folder a .rb-plugin file which says "this plugin is provided by the RBMicroBlog module".
<aquarius> Right now, then, you have a plugin which doesn't do anything. Which means it has no bugs, true, but isn't that useful.
<aquarius> On to editing the Python. Opportunistic development is fun!
<aquarius> Basically, we want our plugin to do this:
<aquarius> 1. be a plugin that can be enabled and disabled
<aquarius> 2. put a "tweet this" button on the toolbar, with the Gwibber icon in it, and a tooltip of "microblog this song"
<aquarius> 3. when the button is pressed, work out which song is currently playing...
<aquarius> 4. and use the Gwibber API to microblog a message saying "Listening to: One Vision by Queen"
<aquarius> So, start with the basics.
<aquarius> [SLIDE 6]
<aquarius> A Rhythmbox plugin is built as a subclass of rb.Plugin, named the same as the plugin module.
<aquarius> So, a basic plugin would look like:
<aquarius> import rb
<aquarius> class RBMicroBlog(rb.Plugin):
<aquarius>     def activate(self, shell):
<aquarius>         print "Activate!"
<aquarius>     def deactivate(self, shell):
<aquarius>         print "Deactivate!"
<aquarius> Your plugin's "activate" function is called when the plugin is loaded, so it can do setup, and "deactivate" is called when the plugin is unloaded.
<aquarius> So, start Rhythmbox -- your plugin hasn't been enabled yet, so in Edit > Plugins, find "Microblogging", and tick it to turn it on.
<aquarius> [SLIDE 7]
<aquarius> You might be thinking: where does the output from my print statement go?
<aquarius> Rhythmbox hides output from plugins unless you want to see it. So, quit Rhythmbox, and restart it as "rhythmbox -D RBMicroBlog"
<aquarius> Now, when you tick your Microblogging plugin on and off in Edit > Plugins, you should see output in the terminal:
<aquarius> (15:34:36) [0x8756028] [RBMicroBlog.activate] RBMicroBlog/__init__.py:9: Activate!
<aquarius> (15:34:38) [0x8756028] [RBMicroBlog.deactivate] RBMicroBlog/__init__.py:13: Deactivate!
<aquarius> Now, you've got an .rb-plugin file and a Python module, and it's loaded. That's the basics of every Python plugin. The only hard remaining bit is to, y'know, actually write the code that does what you want.
<aquarius> On, then, to stage 2: put a "tweet this" button on the toolbar.
<aquarius> This is about adding some UI, and is documented at http://live.gnome.org/RhythmboxPlugins/WritingGuide#Adding_UI
<aquarius> There are also more examples at http://live.gnome.org/Rhythmbox%20Plugins/Python%20Plugin%20Examples which is a very useful page.
<aquarius> If you come across more things that you want to do in Rhythmbox, please add them to that page!
<aquarius> (Also, adding those Rhythmbox plugin "snippets" to the python-snippets project in Launchpad would be pretty cool.)
<aquarius> Adding UI requires two stages: first, you define where you want to add the UI with some XML
<aquarius> [SLIDE 8]
<aquarius> and then you actually hook up a gtk.ActionGroup to the UI, as defined by the XML
<aquarius> [SLIDE 9]
<aquarius> To be honest, you can just borrow that bit from another plugin. Understanding gtk.Actions and gtk.ActionGroups is fine for those that want to, but if you just want to add a toolbar button and a menu item, steal the code from somewhere else (like this plugin).
<aquarius> Now, you'll have a button on the toolbar, and a menu item in the Tools menu. The button has no icon, though.
<aquarius> A bit more cookbook programming, now: how to load an icon and add it. The icon we want is /usr/share/pixmaps/gwibber.svg
<aquarius> So, some code to load that icon and make it available for your button
<aquarius> [SLIDE 10]
<aquarius> Again, don't worry too much about understanding this: the way Gtk deals with icons is pretty complicated. Borrow it for your own projects.
<aquarius> Now, you have a button on the toolbar and a menu item, and we've connected them up to call a function self.microblog.
<aquarius> Stage 3 is to implement that.
<aquarius> Handler functions, like this one, will be called with two parameters, "event" and "shell".
<aquarius> We want our microblog plugin to find out what's currently playing.
<aquarius> There are three ways you might approach the problem of "what do I do to find out what's playing?"
<aquarius> You could know already (if you're Jonoathan Matthew, the genius Rhythmbox maintainer)
<aquarius> (er, Jonathan)
<aquarius> (er, Jonathan)
<aquarius> You could look it up in the documentation (there isn't all that much; the pages linked above cover some things, but not lots)
<aquarius> Or you can do what I do, which is poke around in the Python objects.
<aquarius> For this, enable the Python Console plugin in Rhythmbox, and then run it from the Tools menu.
<aquarius> Now you have a Python console which is hooked up to Rhythmbox. You get a variable called "shell" for free, which is the Rhythmbox shell (and you'll notice that this shell is also being passed to your handler function).
<aquarius> In Python, to list all the properties of an object, use dir(). So, in the Python console, say: dir(shell)
<aquarius> [SLIDE 11]
<aquarius> Hm, that "get_player" looks useful.
<aquarius> So, say: shell.get_player()
<aquarius> <rb.ShellPlayer object at 0xa3ff9dc (RBShellPlayer at 0x9b68800)>
<aquarius> OK, and what's a "ShellPlayer"?
<aquarius> >>> player = shell.get_player()
<aquarius> >>> dir(player)
<aquarius> and "get_playing_entry" again looks useful
<aquarius> >>> player.get_playing_entry()
<aquarius> <RhythmDBEntry at 0xb3543150>
<aquarius> THe way Rhythmbox is set up is that there's a database, the RhythmDB, and each song in that database is defined by an "entry", of type RhythmDBEntry.
<aquarius> So, we've got the "entry" for the currently playing song. But an entry doesn't help much; we want the artist and the title.
<aquarius> Looking at the properties of the entry doesn't help much here, either.
<aquarius> Fortunately, the documentation comes to the rescue: http://live.gnome.org/Rhythmbox%20Plugins/Python%20Plugin%20Examples#How_do_I_get_the_metadata_details_of_a_song.3F
<aquarius> So, given an entry, we can get its title with shell.props.db.entry_get(entry, rhythmdb.PROP_TITLE)
<aquarius> The first attempt at our microblog handler function, then, could look like this:
<aquarius>     def microblog(self, event, shell):
<aquarius>         entry = shell.get_player().get_playing_entry()
<aquarius>         title = shell.props.db.entry_get(entry, rhythmdb.PROP_TITLE)
<aquarius>         artist = shell.props.db.entry_get(entry, rhythmdb.PROP_ARTIST)
<aquarius>         print "Listening to: %s by %s" % (title, artist)
<aquarius> and that should, when we hit the button, print out the message to the terminal.
<aquarius> And indeed it does (remember, rhythmbox -D RBMicroBlog !)
<aquarius> (16:38:44) [0x907a028] [RBMicroBlog.microblog] RBMicroBlog/__init__.py:112: Listening to: You Shook Me All Night Long by AC/DC
<aquarius> One more thing, though: what if there's nothing playing?
<aquarius> Well, poking around in dir(shell.get_player()) a bit more in the Python console reveals "get_playing".
<aquarius> So let's make the button not do anything if we're not playing.
<aquarius> Just add one new line to the top of the microblog function:
<aquarius> if not shell.get_player().get_playing(): return
<aquarius> OK, so now we have a button which prints out our microblog message. The final stage is to use Gwibber to actually post it for us.
<aquarius> Fortunately, someone's already done the work for us here. There's a snippet in the acire program which shows how to post a message via gwibber.
<aquarius> (If you don't know about acire, there's a session about it on Thursday; it's a library of useful Python snippets, and it's great.)
<aquarius> You can see the snippet itself, if you don't use acire, in Launchpad at http://bazaar.launchpad.net/~jonobacon/python-snippets/trunk/annotate/head:/gwibber/sendmessage.py
<aquarius> So add a couple more lines to our microblog function:
<aquarius>         gw = gwibber.lib.GwibberPublic()
<aquarius>         gw.SendMessage("Listening to: %s by %s" % (title, artist))
<aquarius> [SLIDE 12]
<aquarius> and we're all done!
<aquarius> This has been an incredibly brief tour of creating a Rhythmbox plugin, which ties into other cool bits of the Ubuntu platform.
<aquarius> If this has interested you, a few things you might want to try are:
<aquarius> Make the plugin tell you when it's successfully posted!
<aquarius> Change the plugin to disable the button and menu item when nothing is playing (you'll want to connect to Rhythmbox's start playing and stop playing signals)
<aquarius> Make "quickly create rhythmbox-plugin" work so no-one has to remember all the boilerplate
<aquarius> OK, that's it for the talk. I'll take some questions now.
<aquarius> strycore_lernid> IconSource, IconSet, IconFactory ... seems a bit confusing , at least to me
<aquarius> it is. This is why I suggest just copying the code from an existing plugin, like RBMicroBlog :)
<aquarius> you don't really have to worry about why it works, just that it does
<aquarius> enli> what PROP stands for?
<aquarius> "property", as ems confirmed on #ubuntu-classroom-chat
<aquarius> so PROP_ARTIST is the "artist" property of a RhythmDBEntry (song)
<aquarius> eviltwin> QUESTION: Surely we should disable the button when playback stops and reenable it when playback starts rather than a dirty, dirty if statement?
<aquarius> hence the "extra credit" part at the end of the talk ;)
<aquarius> definitely that would be the way to do it, yes
<aquarius> but I've tried to keep RBMicroBlog tiny so that it's a simple thing that can be learned from
<aquarius> if someone wants to trick it up into a proper application, that's a great idea :)
<ClassBot> danyR asked: No way to get the plugin available to the masses? or in vanilla-lucid? just what i was looking for!
<aquarius> well...
<aquarius> to do that, you'd need to package it
<aquarius> you can do that, certainly
<aquarius> but I'm not the person you want to talk to about that
<aquarius> one of the reasons that I'd really like to see "quickly create rhythmbox-plugin" is that it could set up the packaging stuff for you as well
<ClassBot> stevec49 asked: For those looking to add plugin support to their own applications, do you think RhythmBox is a good model to follow?
<aquarius> broadly, yes
<aquarius> Rhythmbox plugins have a number of special methods (like activate and deactivate, but there are lots more) because there are lots of places in the Rhythmbox startup and usage procedures that plugins might want to plug into.
<aquarius> I, personally, like plugins to be one file rather than two, so when I implement Python plugin loading for an app, I put the stuff that's in .rb-plugin into the Python plugin itself, as variables.
<aquarius> because I like single-file deployment of plugins -- it's easier to install a plugin if it's one file that you drop in a folder.
<aquarius> but that's flat out personal perference on my part :)
<ClassBot> eviltwin asked: is this a plugin that you've written and made available somewhere? if so, where's the project homepage/code repo?
<aquarius> http://www.kryogenix.org/code/RBMicroBlog
<aquarius> the plugin code is downloadable from there
<ClassBot> danyR asked: Shouldn't this be available in out-of-the-box Lucid? "What i'm listening to" sharing?
<aquarius> if someone makes RBMicroBlog better, so that it's worthy of inclusion, sure. You might have missed out on getting it into Rhythmbox in lucid by default, but it would make it into universe, I'm sure, and could them be installed
<ClassBot> oskude asked: does a rhythmbox plugin have access to the audio stream/data ?
<aquarius> it does, yes; you can work with the underlying gstreamer code. http://live.gnome.org/RhythmboxPlugins/WritingGuide#Adding_elements_to_the_GStreamer_playback_pipeline has details about that.
<ClassBot> stevec49 asked: Is the RhythmBox "shell" itself a python module?
<aquarius> sort of.
<aquarius> it's passed to your handler functions, and to your plugin
<aquarius> and it's available in the Python console
<aquarius> but it only exists if you're a Rhythmbox plugin
<aquarius> you can't do "import rb.shell" from a random Python program and get access to control Rhythmbox
<aquarius> if you want to control Rhythmbox from an outside application, use D-Bus.
<ClassBot> quigs asked: is the UI stuff not included in the package you provided?
<aquarius> does it not work, then?
<aquarius> ha. quigs points out there is a bug in the deactivate handler in the plugin :)
<aquarius> my fault.
<aquarius> I'll take a look at that later
<aquarius> Any other questions?
<aquarius> There is a rhythmbox-plugins package in lucid, which you may already have installed, which contains lots of plugins
<aquarius> and there are others at http://live.gnome.org/RhythmboxPlugins/ThirdParty
<aquarius> and http://live.gnome.org/RhythmboxPlugins/WishList lsts some plugins that people want but don't have, if you want to work on something but aren't sure what
<aquarius> what with Rhythmbox being the default media player, more plugins will make it do more stuff and generally be cooler, which I'm all in favour of :0
<ClassBot> duanedesign_ asked: Where does the XML file go?
<aquarius> I normally just put the XML in a string inside my plugin
<aquarius> since it only defines where a button or menu go, it's normally pretty short
<aquarius> if you want to put it in a separate file, then put the file in the folder with the plugin, and use shell.find_file("myxmlfile") to get its pathname, that way it'll work no matter where your plugin is installed
<aquarius> OK, cool, no more questions?
<ClassBot> strycore_lernid asked: It's a bit off topic, but in the third party plugins there are some that say "It is not an Internet radio server", GloveSoap and IceCast can do the job, but is there a way to send the audio stream to a server without opeing ports on a firewall ?
<aquarius> erm
<aquarius> there might be. I don't know the answer there, I'm afraid.
<aquarius> the people in #gstreamer may be able to give you some pointers on whether there are gstreamer elements that can do that, which you could add to the pipeline
<aquarius> so, we get to finish a little bit early and everyone can go get a cup of tea before kenvandine explains how to *really* use the Gwibber API, beyond the two lines I've just used!
<aquarius> thanks, all
* ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - http://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Event: Ubuntu Opportunistic Developer Week - Current Session: Microblog from your app with the Gwibber API - Ken VanDine - Instructor: kenvandine || Questions in #ubuntu-classroom-chat
<kenvandine> Yay!
<jcastro> \o/
<kenvandine> jcastro, as usual you are my hero
<kenvandine> ok... only 16 minutes late
<kenvandine> ok, we are here to talk about the Gwibber API
<kenvandine> A quick intro to Gwibber
<kenvandine> Gwibber is a social networking client as well as a desktop service
<kenvandine> that can be used to post messages to a variety of services
<kenvandine> facebook, twitter, identi.ca
<kenvandine> etc
<kenvandine> it can also pull feeds from them, images, etc
<kenvandine> the client is just a frontend to the desktop service that does the real heavy lifting
<kenvandine> the desktop service also provides both dbus and python APIs
<kenvandine> as an application developer, you can embed some social networking features into your application pretty easily
<kenvandine> i have some examples prepared and we can browse through them
<kenvandine> first there are some python docs at http://people.canonical.com/~kenvandine/gwibber/docs/html/
<kenvandine> right now that mostly documents the python api
<kenvandine> we want to generate docs for the DBus API as well
<kenvandine> so if anyone knows how to do that in epydoc, please let me know after the session... :)
<kenvandine> all of the examples are available in bzr at lp:~ken-vandine/+junk/gwibber-api-examples
<kenvandine> bzr branch lp:~ken-vandine/+junk/gwibber-api-examples
<kenvandine> or
<kenvandine> you can get them in the browser as well, i'll provide links as we discuss them
<kenvandine> most common operation would be posting messages of course
<kenvandine> http://people.canonical.com/~kenvandine/gwibber/api-examples/send_message.py.txt
<kenvandine> as you can see the api is quite simple
<kenvandine> import gwibber.lib
<kenvandine> gw = gwibber.lib.GwibberPublic()
<kenvandine> GwibberPublic is the class we provide with all the public python methods
<kenvandine> so most of the examples will use this
<kenvandine> gw.SendMessage("This is a message")
<kenvandine> SendMessage takes a single argument as a string
<kenvandine> which is the content of the message to post
<kenvandine> also note, the method names match the DBus method names
<kenvandine> so it should be pretty easy to discover how to do the same thing from a C, mono, vala, etc app
<kenvandine> via dbus
<kenvandine> i should mention gwibber is broken down into two parts, gwibber and gwibber-service
<kenvandine> the service runs independently of any UI
<kenvandine> and is dbus activated, so if it isn't already running it will start up automatically
<kenvandine> so that is sending a message, pretty easy
<kenvandine> there are some other operations you can do as well
<kenvandine> if you want to tell the service to refresh it's feeds
<kenvandine> you can call Refresh
<kenvandine> http://people.canonical.com/~kenvandine/gwibber/api-examples/refresh.py.txt
<kenvandine> also very simple API
<kenvandine> no arguments, it just tells the service to go refresh itself
<kenvandine> you might want to do something a little more complex
<kenvandine> like perhaps query accounts that are configured and find specific accounts or services
<kenvandine> http://people.canonical.com/~kenvandine/gwibber/api-examples/get_accounts.py.txt
<kenvandine> the GetAccounts method returns json formated string of accounts
<kenvandine> you can then iterate over the accounts and find specific values, one of interest might be "send_enabled"
<kenvandine> or "receive_enabled"
<kenvandine> those tell gwibber which accounts to post to or pull data from
<kenvandine> so back in the SendMessage example, gwibber would post to all accounts that have send_enabled = True
<kenvandine> you may want to find all the accounts that are enabled and display that in your application
<kenvandine> just as an example
<kenvandine> http://people.canonical.com/~kenvandine/gwibber/api-examples/get_services.py.txt
<kenvandine> is very similar
<kenvandine> it queries all services known to gwibber
<kenvandine> some of which you might not have accounts setup for
<kenvandine> and if you want to use gwibber to shorten a url, there is a method for that as well
<kenvandine> http://people.canonical.com/~kenvandine/gwibber/api-examples/shorten.py.txt
<kenvandine> Shorten takes an argument of a string and returns a shortened string using the user's configured preferred shortening service
<kenvandine> is.gd, tinyurl.com, etc
<kenvandine> these are the basic method provided in GwibberPublic
<kenvandine> any questions so far?
<kenvandine> that was the goal :)
<kenvandine> ok
<kenvandine> moving on
<kenvandine> there is also a gtk widget available that you can embed into your application
<kenvandine> and we hope people will create a variety of useful gtk widgets and contribute those back to gwibber
<kenvandine> making it even easier to make your application social :)
<kenvandine> http://people.canonical.com/~kenvandine/gwibber/api-examples/gwibber-widget.py.txt
<kenvandine> i am not going to talk about the part of this that creates the gtk window, etc
<kenvandine> that is just a place holder so you can run the example if you like
<kenvandine> there are just a couple of key lines you need
<kenvandine> from gwibber.lib.gtk import widgets
<kenvandine> that gives you the widgets
<kenvandine> poster = widgets.GwibberPosterVBox()
<kenvandine> GwibberPosterVBox is a VBox that contains a text input, text overlay for character count, send button and toggles for each service
<kenvandine> http://people.canonical.com/~kenvandine/gwibber/api-examples/poster.png
<kenvandine> that is what the widget looks like
<kenvandine> so you could embed that into your application
<kenvandine> so
<kenvandine> poster = widgets.GwibberPosterVBox()
<kenvandine> window.add(poster)
<kenvandine> http://people.canonical.com/~kenvandine/gwibber/api-examples/gwibber-widget.py.txt
<kenvandine> is really all you need
<kenvandine> let me put up the screenshot again
<kenvandine> http://people.canonical.com/~kenvandine/gwibber/api-examples/poster.png
<kenvandine> the toggle buttons on the botton that have the icons for the services
<kenvandine> those are all live and tied into the gwibber service
<kenvandine> so toggling those enables and disables sending to those services desktop wide
<kenvandine> if you are running Lucid, you can see this in action by running gwibber-poster
<kenvandine> another variation there
<kenvandine> http://people.canonical.com/~kenvandine/gwibber/api-examples/gwibber-widget-with-contents.py.txt
<kenvandine> this shows adding some default content
<kenvandine> so if your application has some context about what you are going to post about, like perhaps in the rhythmbox example
<kenvandine> you just marked a song you liked, rated it or whatever
<kenvandine> you could have that pre-populate the text input with information about the song you just rated
<kenvandine> and let the user edit the text if they like and hit Send
<kenvandine> to post it
<kenvandine> poster.input.set_text(contents)
<kenvandine> where contents is a string that gets added
<kenvandine> note: if that text STARTS with a url
<kenvandine> it will get shortened automatically
<kenvandine> i don't think that works if the url isn't at the beginning, but i could be wrong
<kenvandine> our hope here is to get lots of application developers to embed this functionality
<kenvandine> really utilize gwibber as a desktop service
<kenvandine> not just as a gui for viewing/posting tweets :)
<kenvandine> i have just one more area i want to touch on, then we can open up some discussion
<kenvandine> gwibber stores all of it's data in desktopcouch
<kenvandine> a very nice document oriented database
<kenvandine> which also has replication features, so your settings can replicate to other computers either directly through desktopcouch or through ubuntu one
<kenvandine> some features of gwibber aren't exposed (at least yet) through the python or dbus APIs
<kenvandine> things like retrieving message contents
<kenvandine> but it is easy to do with desktopcouch directly
<kenvandine> here is an example
<kenvandine> http://people.canonical.com/~kenvandine/gwibber/api-examples/messages_from_couch.py.txt
<kenvandine> this uses the desktopcouch records API to connect to the database and get records
<kenvandine> that match the record_type for gwibber_messages
<kenvandine> results = messages_db.get_records(record_type = record_type, create_view = False)
<kenvandine> results would be a big json string of all your messages
<kenvandine> which you can then iterate over and get individual messages out
<kenvandine> and various bits of data
<kenvandine> your application could also define views for data your app uses regularly
<kenvandine> so perhaps you want to get all the records that have images
<kenvandine> so you could view all your facebook friend's albums
<kenvandine> the data is pretty easy to get at in desktopcouch
<kenvandine> someone just needs to write an extension for f-spot to make it easy to browse them :)
<kenvandine> and maybe even comment
<kenvandine> ok, i think that is all i have
<kenvandine> questions? comments?
<kenvandine> the widget doesn't provide that, but that would be useful
<kenvandine> it is on my todo list :)
<kenvandine> but won't happen for 2.30, we are in feature freeze already
<kenvandine> next?
<kenvandine>  QUESTION: Are the special gtk widgets available in languages other than python? Say I want to use this in an app written in c# and use gtk#? or just plain c?
<kenvandine> not yet
<kenvandine> but for 2.32 (or 3.0, we are following gnome version numbering now)
<kenvandine> i would like to have a libgwibber
<kenvandine> to provide just that
<kenvandine> if there are any C gurus out there and want to help
<kenvandine> please let me know
<kenvandine> ideally we want to move the widgets to C and just create python bindings for it
<kenvandine> QUESTION: how can an user disable an app from using gwibber if that app doesn't have it as a preference? I don't really feel comfortable with random apps being able to send messages out to the public without me having to confirm it first
<kenvandine> hadn't really thought about that
<kenvandine> there isn't really any mechanism for applications register with gwibber to control access
<kenvandine> we'll discuss that next cycle
<kenvandine> well, thanks everyone
<kenvandine> i'll be back for the next session which is showcasing gwibber
* ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - http://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Event: Ubuntu Opportunistic Developer Week - Current Session: SHOWCASE: Gwibber - Ken VanDine - Instructor: kenvandine || Questions in #ubuntu-classroom-chat
<kenvandine> anything we have to do to get lernid to show the slides?
<kenvandine> [SLIDE 1]
<kenvandine> ok everyone, welcome to our little showcase on Gwibber
<kenvandine> Gwibber is a social networking desktop service and client
<kenvandine> Gwibber has kind of a fun history, started out as just a playground and has really blossomed
<kenvandine> [SLIDE 2]
<kenvandine> Ryan Paul created Gwibber as a tool to learn about pygtk development while writing an article for Ars Technica
<kenvandine> back in 2007
<kenvandine> and for a while it was really just his little playground for experimenting with new technologies
<kenvandine> research for other articles he wrote
<kenvandine> etc
<kenvandine> i don't think he had any idea it would become quite so popular :)
<kenvandine> Ryan is seg|ars :)
<kenvandine> who is listening in here, so hopefully he can correct me when needed :)
<kenvandine> [SLIDE 3]
<kenvandine> the slides are mostly here as a place to stick some screenshots to show how gwibber has evolved
<kenvandine> which is actually quite from to see, as a long time user
<kenvandine> s/from/fun
<kenvandine> [SLIDE 4]
<kenvandine> this is gwibber in it's first incarnation
<kenvandine> back in 2007
<kenvandine> mostly all pygtk
<kenvandine> quite simplistic
<kenvandine> [SLIDE 5]
<kenvandine> this was when Ryan was experimenting with using cairo directly to render the messages
<kenvandine> [SLIDE 6]
<kenvandine> Gwibber was starting to look a bit nicer here
<kenvandine> Ryan had moved on to using webkit to render the messages pane
<kenvandine> and styling with css
<kenvandine> it was quite slick looking and easily themed at this point
<kenvandine> and he had just added facebook support
<kenvandine> this was 2008ish
<kenvandine> [SLIDE 7]
<kenvandine> this is from about the same time, maybe even the same version
<kenvandine> shows the accounts dialog
<kenvandine> [SLIDE 8]
<kenvandine> this was the 2.0 era, which is what we were working on getting into Karmic
<kenvandine> but i hate to say 2.0 was never really robust enough
<kenvandine> it was the first version that split out the separate service
<kenvandine> and relied heavily on DBus for all of it's message handling
<kenvandine> which actually proved quite problematic
<kenvandine> but you can see it is starting to look a little differnent now
<kenvandine> [SLIDE 9]
<kenvandine> this is what Gwibber looks like today
<kenvandine> it has come a long way
<kenvandine> the desktop service is now working very well
<kenvandine> the python API is proving to be useful
<kenvandine> as is the DBus API
<kenvandine> there have been quite a bit of buzz around about the new look, which is nice
<kenvandine> [SLIDE 10]
<kenvandine> and now it is included in Lucid Lynx by default
<kenvandine> Gwibber has come a long way!
<kenvandine> thanks seg|ars, you rock!
<kenvandine> Gwibber has matured enough that we are including it in Ubuntu, and in an LTS even
<kenvandine> i don't have screenshots of this
<kenvandine> but if you are running Lucid
<kenvandine> you can see it for yourself
<kenvandine> the Me Menu, up to the left of the Session menu in the top panel
<kenvandine> there is a text entry now
<kenvandine> that posts to Gwibber
<kenvandine> so right from the panel you can fire off a quick post
<kenvandine> http://arstechnica.com/open-source/reviews/2010/03/hands-on-ubuntu-goes-social-gains-me-menu-in-1004-alpha-3.ars
<kenvandine> an article from Ryan about it
<kenvandine> http://static.arstechnica.com/ubuntu1004a3/me-menu.png
<kenvandine> there's a screenshot
<kenvandine> lets talk a little about some of the technology used in the current gwibber and talk about how Gwibber has benefited
<kenvandine> [SLIDE 11]
<kenvandine> python, pygtk and webkit
<kenvandine> Gwibber has been using those since nearly the beginngin
<kenvandine> a bit about webkit
<kenvandine> the messages pane is completely rendered in Webkit which makes themes, etc easy
<kenvandine> and it fits the model well
<kenvandine> one thing to note, which is interesting
<kenvandine> the navigation bar on the left side and the bar to the bottom of the text input with the toggle buttons
<kenvandine> that isn't gtk
<kenvandine> those are all rendered in webkit
<kenvandine> Ryan was having a hard time bending pygtk to do what he needed to do, so he moved all that to webkit and made them look like they belong
<kenvandine> quite nice
<kenvandine> so just something you might want to look at the source for if you ever feel restricted and want to break outside the box
<kenvandine> not saying it is good or bad... it would be nice if pygtk was able to do what he wanted
<kenvandine> also in the 2.30 series Gwibber has moved to desktopcouch for data storage
<kenvandine> so preference, accounts and messages are all stored in desktopcouch
<kenvandine> there are many pluses to this
<kenvandine> one is we get syncing for free, if you pair desktopcouch instances on your local network or if you are an ubuntu one user, your gwibber accounts/settings sync automatically
<kenvandine> so you only have to configure it in one place
<kenvandine> but desktopcouch also helped us solve the robustness problems we had with DBus
<kenvandine> we still use DBus for quite a bit of stuff
<kenvandine> but we never pass data around
<kenvandine> the message data is a pretty complex data structure that used to make dbus tip over
<kenvandine> now we access the message data directly from couch
<kenvandine> desktopcouch also gives us events so we could remove code, which is always good
<kenvandine> for example
<kenvandine> notifications and messaging indicator support
<kenvandine> now instead of the service getting a new message and telling a bunch of different moving pieces to go off and do things
<kenvandine> it just writes it out to the database
<kenvandine> we see the event for a new record added to the database, and we show a notification for it
<kenvandine> removed a bunch of the logic we had in place before
<kenvandine> and let couchdb do the work
<kenvandine> same for adding replies/mentions to the messaging menu
<kenvandine> also the client uses those same events to know when to render the messages pane, etc
<kenvandine> it is used all over the place
<kenvandine> so desktopcouch was a huge win for Gwibber imho
<kenvandine> ok, now lets move on to questions
<kenvandine>  QUESTION: Joined later but is there in Lucid with gwibber a daemon that monitors incomming messages (and notifies ofcourse) instead of having Gwibber open all the time?
<kenvandine> yes
<kenvandine> the gwibber-service will run in the background without the client open
<kenvandine> while running, if you have notifications enabled
<kenvandine> it will display them
<kenvandine> etc
<kenvandine> when you launch the client, it will just talk to the existing service that is running
<kenvandine> if you "Quit" the client in the Gwibber menu, it will shutdown the service
<kenvandine> to give users a way to stop it if they like
<kenvandine> but
<kenvandine> if you close the window it doesn't kill the service
<kenvandine> in the next cycle, i would like to make that configurable
<kenvandine> QUESTION: with those bars rendered in webkit, do they look out of place if you change the theme or does it somehow adapt to the colours of your gtk theme?
<kenvandine> they do honor some of the gtk values
<kenvandine> like color and such (i think)
<kenvandine> but for example the icons don't change
<kenvandine> i would like to move to a model where we provide icons that can be over ridden by the theme
<kenvandine> QUESTION: the desktopcouch is restricted but how are the passwords stored in the DB?
<kenvandine> it is stored as a string
<kenvandine> we should move those into the keyring in the next cycle, hopefully
<kenvandine> right now you need keyring access to access couch
<kenvandine> but ideally we shouldn't store them that way anyway
<kenvandine> QUESTION: As many users really don't get along well with microblogging, shouldn't the RSS functionality of gwibber get back and be improved, for them use gwibber, at least, like an rss reader?
<kenvandine> not sure i agree
<kenvandine> i personally don't see RSS reading as social networking, but i know others disagree with me
<kenvandine> i am more keen on growing the use cases
<kenvandine> like photo sharing
<kenvandine> etc
<kenvandine> there are many ways we can utilize gwibber outside of "microblogging"
<kenvandine> i don't really consider Gwibber a microblogging client anymore
<kenvandine> i see it is a social networking aggrigator
<kenvandine> a single mechanism for you and the applications you use more effectively interact with your friends
<kenvandine> like viewing your friend's facebook photo albums, tagging people in photos, commenting on them, etc
<kenvandine> all from inside of f-spot
<kenvandine> instead of through a web interface
<kenvandine> there are many other use cases like that
<kenvandine> which i would like to focus more on
<kenvandine> any more questions?
<kenvandine> ok... so thanks for your time
<kenvandine> i hope everyone enjoys gwibber!
* ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - http://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Event: Ubuntu Opportunistic Developer Week - Current Session: Building multimedia into your app with GStreamer - Laszlo Pandy - Instructor: laszlok || Questions in #ubuntu-classroom-chat
<laszlok> Alright I guess that's me
<laszlok> I'm going to be talking about GStreamer
<laszlok> I'm not sure how much you guys know already, so if you have any questions or I missed something, please ask in #ubuntu-classroom-chat
<laszlok> [SLIDE 1]
<laszlok> Seems the schedule in lernid isn't working
<laszlok> I'll get a link for those who aren't using lernid as well
<laszlok> For those that do still see the gwibber slides, is the schedule list loaded? On my lernid neither is there
<laszlok> Lets do it manually then: http://laszlopandy.com/files/opportunistic-developer-gstreamer.pdf
<laszlok> Thanks for reporting guys, it must be a server issue
<laszlok> I'm gonna start now and you can follow along manually from the link above
<laszlok> First slide!
<laszlok> So I'm talking about adding gstreamer support to your app
<laszlok> This means multimedia stuff
<laszlok> audio and video all that cool jazz
<laszlok> GStreamer can do pictures too, but most apps use separate libraries for images because of performance
<laszlok> However I am not talking about playing event sounds like an alert
<laszlok> those sounds which are really short and you just play, never pause, seek, etc
<laszlok> GStreamer is overkill for that, and there are better libraries for that (which could be covered in another talk)
<laszlok> Second slide!
<laszlok> GStreamer is a framework for putting decoders, filters, encoders, file readers, etc. together
<laszlok> if you are writing a decoder to integrate with ubuntu you are going to want to know about the framework aspects
<laszlok> [SLIDE 2]
<laszlok> but for us, in most cases we only care about GStreamer as a library
<laszlok> and GStreamer is a very good library, it takes very little code to achieve a great deal in your application
<laszlok> Slide three!
<laszlok> GStreamer can automatically detect which plugin to use depending on the protocol (file://, http://, etc) the media container, codec
<laszlok> you just have to tell it where to get the data and it works like magic
<laszlok> another important aspect is that it spawns its own threads for each stream and provides a nice interface so we don't have to deal with it
<laszlok> when you are playing video there is a thread for audio and one for video, but all the signals come in to your main thread like gtk callbacks; nice and clean
<laszlok> QUESTION: How portable is it? Can I make gstreamer apps for Win/Mac?
<laszlok> yes you can
<laszlok> its supports many platforms
<laszlok> I am part of the Jokosher project which uses GStreamer for an audio multitracker
<laszlok> and we have been doing windows releases for more than a year i think
<laszlok> the official releases don't have builds for any platform, but like the GStreamer PPA for ubuntu there is a win-builds which has all the latest releases for windows
<laszlok> I don't have any experience using it on the Mac, but I know it is supported
<laszlok> [SLIDE 4]
<laszlok> okay now we get into the real stuff
<laszlok> today's talk is mostly a high level usage of gstreamer, but i think it is important to understand a few concepts
<laszlok> QUESTION: This is a really specific one, and may want to wait, but can I seek into a movie and display a still thumbnail?
<laszlok> yes, remind me about that at the end and I will tell you specifically how to do it
<laszlok> So Gstreamer is concerned with moving data
<laszlok> data flow happens inside a pipeline
<laszlok> there are a bunch of elements all linked together
<laszlok> the source(s) provide data to the pipeline, and the sink(s) take it out and put it somewhere
<laszlok> an example pipeline would start with a file source, move it through a decoder, pass it to audioconvert (which makes sure it is in the right format) and that would pass it to the Pulseaudio sink
<laszlok> A bin is another important concept. It is just a collection of elements within a pipeline
<laszlok> you can think of it as a pipeline inside a pipeline
<laszlok> [SLIDE 5]
<laszlok> here are some example sources
<laszlok> gstreamer has lots
<laszlok> giosrc is important because it provides all the protocols of the gnome virtual file system
<laszlok> if you run the debugging tool gst-inspect-0.10 with no arguments in the terminal it will tell you alll the plugins you have installed
<laszlok> gst-inspect-0.10 pulsesrc will give you all the info about the pulse audio source
<laszlok> [SLIDE 6]
<laszlok> same deal with sinks
<laszlok> QUESTION: how does changing framerates fit into the pipline?
<laszlok> since its been brought up i will quickly cover another topic
<laszlok> the link between each element has a thing called caps (short for capabilities)
<laszlok> it specifies what kind of data is allowed to be sent from one element to another
<laszlok> for example pulsesink does not want to receive ogg vorbis data, it wants raw audio
<laszlok> so we have to feed it through the ogg vorbis decoder first
<laszlok> it is possible to manually specify the caps of each link, so you can say you want this audio converted to 44100Hz before sending to pulsesink
<laszlok> in the same way you can force the framerate of a video stream
<laszlok> but if you get the caps wrong, the elements will complain that they can't link
<laszlok> so its a bit more advanced, we won't be doing caps today
<laszlok> [SLIDE 7]
<laszlok> so here is an example pipeline
<laszlok> the gstreamer language syntax has the ! meaning link to
<laszlok> there is a debugging tool which uses this syntax, and you can test out all sorts of cool pipelines
<laszlok> every can try:
<laszlok> gst-launch-0.10 audiotestsrc wave=ticks ! pulsesink
<laszlok> gst-inspect-0.10 audiotestsrc will tell you near the bottom what other types of waves you can use
<laszlok> [SLIDE 8]
<laszlok> as I have mentioned there is all sorts of complicated stuff going on in gstreamer
<laszlok> but playback is a pretty simple use case, so they invented playbin2
<laszlok> it is used by totem and many gstreamer apps who just want to play audio and video
<laszlok> it internally manages almost everything for us
<laszlok> reading from the right protocol, finding decoders, it even handles subtitles and can do gapless playback
<laszlok> [SLIDE 9]
<laszlok> so lets try a really simple playbin example using some python
<laszlok> http://laszlopandy.com/files/playbin.html
<laszlok> as you can see in the code, we have to import gst and create a new playbin2 object
<laszlok> all gstreamer plugins are dynamically loaded, so you have to use the factory to create it
<laszlok> gst.element_factory_make('playbin2') will fail if the plugin 'playbin2' is not installed
<laszlok> the next step we set the URI
<laszlok> then we get the bus, which allows us to monitor the pipeline through signals, just like in GTK
<laszlok> we can attach a callback to the "message::eos" signal (EOS is end of stream)
<laszlok> then we set the playbin to the playing state
<laszlok> there are four states in gstreamer: NULL, READY, PAUSED and PLAYING
<laszlok> NULL is for when you want to free the resources and destroy the object
<laszlok> after we set the state we start the mainloop so we get receeve signals
<laszlok> *receive
<laszlok> any questions about this code?
<laszlok> [SLIDE 10]
<laszlok> QUESTION: what if it's a file not a url?
<laszlok> do it like file:///home/laszlo/... (it has to be an absolute path)
<laszlok> QUESTION: can you elaborate on states? what state a pipeline should have if we don't want to destroy it, but rather play next source?
<laszlok> you can have it in whichever you like
<laszlok> gstreamer allows the pipeline to be changed while its playing
<laszlok> though its probably best to move it to paused, switch the uri, and put it back to playing
<laszlok> QUESTION: what other proteries can we set with playbin.set_property()? And sourcefile is it allway an uri?
<laszlok> gst-inspect-0.10 playbin2
<laszlok> that will tell you about the properties
<laszlok> playbin2 only deals with URIs, but those can be file:/// ones too
<laszlok> QUESTION: and if we want to stop playing and restart it from beginning?
<laszlok> you should set it to PAUSED and seek to the start (seeking is slide 17 if we get there)
<laszlok> to clarify PAUSED means the same thing as PLAYING except that the data is not moving
<laszlok> the data is there on the edge, but the damn is closed
<laszlok> if you have a video in PAUSED you will see the first frame
<laszlok> QUESTION: does using playbin also handle installing packages for missing codecs like with mp3's? Or that's something that should still be manually programmed?
<laszlok> i dont think playbin does this itself
<laszlok> GStreamer will send an error on the pipeline ("missing codec!")
<laszlok> and you can catch the error and use another module (import gst.pbutils) to launch the codec install window
<laszlok> okay everyone got that code from slide 10?
<laszlok> its a GTK window, pretty simpel
<laszlok> its needs some gstreamer love
<laszlok> [SLIDE 11]
<laszlok> http://laszlopandy.com/files/playback_interface.html
<laszlok> [SLIDE 12]
<laszlok> http://upload.wikimedia.org/wikipedia/commons/d/df/Hurricane_Connie_1955.ogg
<laszlok> and back to the code http://laszlopandy.com/files/playback_interface.html
<laszlok> so we are gonna take the playbin2 example and put it into the GUI class
<laszlok> just make sure all code in __init__() is before the call to self.main_window.show_all()
<laszlok> [SLIDE 13]
<laszlok> on_finish becomes a class method, and we update the GUI when it is called
<laszlok> whoever was asking about to restart from the beginning, this is it
<laszlok> seek_simple, FORMAT_TIME, to position 0
<laszlok> [SLIDE 14]
<laszlok> this is straightforward
<laszlok> in the button handler we either set the state to PLAYING or PAUSED
<laszlok> right before we do gtk.main_quit() we should set the state to NULL otherwise gstreamer will print an error on the console about resources not being cleaned up properly
<laszlok> [SLIDE 15]
<laszlok> if you guys are building this code, it should sorta work now
<laszlok> QUESTION: the uris in playbin need to be absolute, or I can write them like relative paths for files?
<laszlok> I have not figured out a way to make file:/// work without absolute paths
<laszlok> you should get the current working durectory using the os.path.abspath('.') command in python
<laszlok> [SLIDE 16]
<laszlok> heres the tricky part, we have to attach the video to our GTK window
<laszlok> playbin2 has a video-sink property which allows us to switch where it sends the video
<laszlok> we should wait until the widget is realized before connecting it, cause it might not be on the screen and video_area.window will be None
* ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - http://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi
<laszlok> then we just set the xwindow id
<laszlok> and we're done
<laszlok> [SLIDE 17]
<laszlok> heres how to seek from the value on the slider
<laszlok> [SLIDE 18]
<laszlok> if there any questions about that, ask me
<laszlok> [SLIDE 19]
<laszlok>  QUESTION: How do I seek into a movie and display a still thumbnail?
<laszlok> thanks for reminding me
<laszlok> you should keep the state in PAUSED so that the first frame shows
<laszlok> and then seek with FLUSH and KEY
<laszlok> this is important because if it is plaused, there is data in the pipeline thats not moving
<laszlok> FLUSH will tell the elements to throw out the old data and only use the data from the new position
<laszlok> KEY_UNIT will tell the decoder to seek to a key frame, so you don't get a partially decoded blocky frame from the video
<laszlok> QUESTION: what do that seek flags mean?
<laszlok> is it clear from what i said on slide 18?
<laszlok> [SLIDE 18]
<laszlok> [SLIDE 19]
<laszlok> if you have not seen gobject.timeout_add() before, it will call your function at the time interval given as long as the mainloop is still running
<laszlok> 100 means 100 milliseconds, or 10 times per second
<laszlok> if you have some other intensive operation which is blocking the mainloop it will be called much less often and your GUI will be unresponsive
<laszlok> so every 100ms we query the position and update the slider, make sense?
<laszlok> [SLIDE 20]
<laszlok> here I am querying both the position and duration, because sometimes the duration changes
<laszlok> for many audio types like mp3, the duration is an estimate
<laszlok> there is no way to know the exact length without playing the file to the end and saving the result
<laszlok> QUESTION: Why would the duration change? for streaming files?
<laszlok> often with streaming files you don't know how long it is, the duration query will fail
<laszlok> other files like mp3 i mentioned the duration is estimated by calculating it form the size of the file and the bitrate
<laszlok> if the file is a poorly encoded variable bitrate file, the duration estimate may change
<laszlok> gstreamer requires you specify the format you want
<laszlok> but almost always we want TIME (which comes back in nanoseconds)
<laszlok> you can call query bytes or percent for example
<laszlok> [SLIDE 21]
<laszlok> so once we have the values from the query here is how we update the slider
<laszlok> make sure you block the on_slider_change function or that will be called with you do set_value()
<laszlok> [SLIDE 22]
<laszlok> http://laszlopandy.com/files/playback_interface_complete.html
<laszlok> heres the completed code
<laszlok> I added a little thing there to always read the file from the current directory
<laszlok> 120 lines and you can do the basics of what totem does
<laszlok> thanks guys, i'm just gonna answer questions now
<laszlok> QUESTION: possible to extract/record a slice of audio/video from a file to a file ? faster than real-time ? (yes/no answer is enough)
<laszlok> yes it is possible
<laszlok> if you don't have an element which requires real time (like going from files to files) gstreamer will go as fast as possible
<laszlok> to extract slices of audio/video files the elements you want are in the gnonlin package
<laszlok> they are used by pitivi for example
<laszlok> QUESTION: is it possible to seek to/display a still of a non-keyframe?
<laszlok> yes, i believe this is what happens when you leave out the KEY_UNIT
<laszlok> it will take longer to seek, because the decoder has to find a key frame and decode everything after that to get the full frame
<laszlok> but this is what totem does for its frame-by-frame step feature
<laszlok> QUESTION: Can you help me to find "wmap" codec for .wmv files?
<laszlok> find me later in #jokosher and i'll see
<laszlok> QUESTION: If I have a video in HD and only want to display it as a thumbnail, is this simple, and does gstreamer do clever stuff to provide low memory usage?
<laszlok> gstreamer is fairly good with memory usage
<laszlok> i believe the nautilus thumbnailer which gets those pictures of your videos uses gstreamer and just sets it to paused to extract a single frame
<laszlok> sometimes it does use a lot of IO though
<laszlok> okay so if the movie is playing, and you want a smaller copy of it
<laszlok> this is just the same as when you scale down the totem window
<laszlok> there is an element called tee to make copies of streams
<laszlok> so you can have one small copy and one large playing at the same time even
<laszlok> but for an HD video it sill have to decode the entire thing, then scale it down which will require a lot of cpu
<laszlok> however the gstreamer magicians have some more tricks which are currently only prototype and use cairo to draw the scaled video directly instead of copying the HD video around
<laszlok> you may have seen it on the planet, it sounds pretty much like what mattmole is looking for
#ubuntu-classroom 2010-03-03
<qwased> how can i look at past irc classroom logs?
<mbudde> http://irclogs.ubuntu.com/
<qwased> thanks
<reida010> s
<didrocks> jono: did you receive my slides? (and for generating the translation string, just quickly package or quickly share/release)
<jono> didrocks, yep, they are in there :)
<jono> didrocks, isnt there an argument to pass setup.py if I remember right?
<jono> I remember dpm did something
<RainCT> not sure if it's related at all with what you are talking about, but there is:  python setup.py build_i18n
<jono> RainCT, thats it!
<jono> woo!
<didrocks> jono: if you want to do that outside of quickly yes (but the previous command calls that). It's ./setup.py --build-i18n
<didrocks> let me check for the syntax exactly :)
<didrocks> one sec
<jono> thats cool for updating the translations template without packaging
<jono> thanks RainCT, didrocks!
* ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - http://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Event: Ubuntu Opportunistic Developer Week - Current Session: Creating stunning interfaces with Cairo - Laszlo Pandy - Instructor: laszlok || Questions in #ubuntu-classroom-chat
<laszlok> Hello everyone, i'm gonna be talking about using cairo with python today
<laszlok> I haven't prepared any slides, but I'll be using some links
<laszlok> and it will be less structured than usual, so feel free to shout out or ask questions at any time in #ubuntu-classroom-chat
<laszlok> I won't mind taking a large detour, we'll probably have plenty of time for it
<laszlok> So cairo is a drawing API
<laszlok> if you know about SVG graphics, it does the same sort of thing
<laszlok> it has strokes, fills, gradients, etc
<laszlok> Its also a very modern drawing api
<laszlok> the library was written quite recently
<laszlok> I mean modern in that it has good alpha support, and really good antialiasing
<laszlok> so when you draw graphics they scale well and look very clean
<laszlok> unlike previous generation APIs like Java graphics (don't get me started)
<laszlok> Cairo integrates really well with GTK, in fact most widgets in GTK are now drawn using cairo
<laszlok> I will show you how to use it with GTK and also how to use some other cairo backends like svg, pdf, and png
<laszlok> In terms of creating stunning interfaces, it can be done with cairo. If you create a stunning GTK app then you are doing it with cairo anyway ;)
<laszlok> however cairo is low level
<laszlok> if you are using cairo directly you are drawing all the lines and calculating all the geometry yourself
<laszlok> There was a talk yesterday about goocanvas, which uses cairo and gives a much higher level view. You can deal with objects instead of geometry calculations.
<laszlok> But if anyone has questions about that, please ask
<laszlok> http://www.cairographics.org/samples/
<laszlok> here is a page on the cairo website with some sample code and how it will look
<laszlok> the code is in C, but it is quite similar to python as you will see
<laszlok> QUESTION: Can we build all the application interface using Cairo (except for the Window container)?
<laszlok> yes you can, but it will involve a lot of trickiness if you want to detect mouse clicks on many different objects
<laszlok> it will work fine for a simple drawing, but once you start using lots of objects you might find the geometry to figure out which one is clicked it too much
<laszlok> this is why things like goocanvas were invented; to automate those things
<laszlok> QUESTION: can we use cairo to create the interface separate from the logic that runs the program?
<laszlok> yes, in the same way that you would have a GTK interface separate from the program logic
<laszlok> QUESTION: maybe for later, is there a preferred way of doing animations in cairo?
<laszlok> cairo does not provide support for animations, so it has to be done essentially the same as animations in other drawing apis
<laszlok> that means having a timer to redraw the screen and have code to redraw the whole screen (or just the parts that change)
<laszlok> so as you can see in the samples, cairo has primitives for arcs, lines, etc.
<laszlok> Thinking about an interface in these primitives is a bit low level, but it gives you the great flexibility
<laszlok> QUESTION: Does the animation redraw method you just described use a lot of cpu power?
<laszlok> if your drawing is complex, it probably will
<laszlok> but cairo is quite efficient, and allows you flexibility for caching drawings
<laszlok> for example if you have a background which requires a long time to draw, you can draw it to an ImageSurface in memory instead
<laszlok> and then it is one operation to draw it on screen
<laszlok> QUESTION: would like to add to performance that strokes are the ones that are expensive.
<laszlok> that's not a question ;)
<laszlok> http://www.cairographics.org/documentation/pycairo/reference/index.html
<laszlok> here is the python documentation for cairo
<laszlok> that is good reference when looking at the next link
<laszlok> http://laszlopandy.com/files/drawing_interface.html
<laszlok> here is some poorly commented python code I prepared
<laszlok> QUESTION: waht are all the required components to start working on cairo+python?
<laszlok> only cairo, python and pycairo
<laszlok> if you want to render directly on screen (as opposed to png or svg) you should have pygtk installed as well
<laszlok> for example, in the code i prepared I am importing both gtk and cairo
<laszlok> copy and paste this code into your editor
<laszlok> if you run it with no arguments you will get a gtk window
<laszlok> if you give it 'png', 'svg' or 'pdf' as an argument, it will generate that kind of file
<laszlok> so lets take a look at the GTK code, in the DrawingInterface class
<laszlok> it creates a window, and adds a gtk.DrawingArea
<laszlok> the DrawingArea is a widget which is like a blank canvas we can draw to
<laszlok> then we set the size of the window, and show it
<laszlok> not much to see there
<laszlok> the expose event is the event when the X server tells the window to redraw itself
<laszlok> so this is what we are using to trigger our drawing code
<laszlok> also notice that in the GTK code the cairo context is created directy from the widget. GTK is integrated with cairo and makes it easy
<laszlok> the context is what holds all the information about your drawing as you add lines and shapes
<laszlok> the draw_rounded_rentangle() method is converted from the C example on http://www.cairographics.org/samples/
<laszlok> if you compare them you can see it is mostly identical code
<laszlok> QUESTION: please explain the underlying functiosn used in on_expose
<laszlok> http://laszlopandy.com/files/drawing_interface.html
<laszlok> in on_expose we create the cairo context associated with the widget
<laszlok> so when we draw using that context, it will draw on the widget
<laszlok> widget.get_allocation() returns a renctangle with the width and height of the window, so we know how much space we have to draw
<laszlok> and self.drawing.draw() calls the method on the drawing class three lines below that
<laszlok> QUESTION: will the get_allocation be called only after drawing.draw is called?
<laszlok> this is equivalent to:
<laszlok> rectangle = widget.get_allocation()
<laszlok> self.drawing.draw(ctx, rectangle)
<laszlok> so the draw() method can know the size of the widget
<laszlok> by default, the DrawingArea widget is the default gtk colour
<laszlok> so in the draw() method I create a rectangle the size of the widget and fill it with white
<laszlok> the context remembers things like rectangles i have created, and also what colour i set it
<laszlok> after I call fill() the rectangle is removed from the context and put on the screen, but the colour is still set
<laszlok> so remember to change your colour or it will be whatever you set it previously
<laszlok> QUESTION: Is it possible to do some basic 3d transformation? (Like perspective on GIMP)
<laszlok> cairo is a 2d canvas, but you can do transformation
<laszlok> to fake a perspective
<laszlok> take a look at http://www.cairographics.org/documentation/pycairo/reference/matrix.html#class-matrix
<laszlok> In get_gradient() http://laszlopandy.com/files/drawing_interface.html
<laszlok> you can see cairo makes gradients really simple
<laszlok> you create a gradient with a start and end point to define how long the colour change will be and in what direction
<laszlok> and then you set stops on the gradient, just like you would do on inkscape or other graphics programs
<laszlok> the first argument to add_color_stop_rgb is the offset between 0 and 1
<laszlok> so i set two colour stops. One at the beginning and one at the end
<laszlok> you can easily add a third one in set it to offset 0.5 and your gradient will blend three colours
<laszlok> now look at the bottom part of the code where it says if arg == 'pdf':
<laszlok> i mentioned earlier about using image surfaces to store your drawing in memory
<laszlok> surfaces also allow you do store in files
<laszlok> QUESTION: can you set the gradient to go through the hues in the opposite direction?
<laszlok> yes
<laszlok> either reverse the offsets
<laszlok> (set the first one to offset 1, and second to offset 0)
<laszlok> or reverse the pairs of (x,y) parameters to the LinearGradient constructor
<laszlok> QUESTION: does the context variable acts as a placeholder or as a memory buffer?
<laszlok> it is the same as the drawing context created from the GTK widget except it writes to a file
<laszlok> so it will store your drawing in memory and write it to the file when you complete a fill() or stroke()
<laszlok> QUESTION: How to make it write to a jpg file?
<laszlok> JPG file compression is meant for pictures where there are not perfectly smooth lines
<laszlok> PNG compression works much better for drawings, things with smooth and sharp borders
<laszlok> so cairo does not support JPG directly, i would write to svg or png and use imagemagick to convert it
<laszlok> so as you can see, cairo surfaces make it really easy to export to other formats
<laszlok> and if you were writing on windows or mac, you would use a surface specifically for the platform and the rest of the api would be the same
<laszlok> any questions?
<laszlok> QUESTION: does cairo do that "redraw only changed parts" automagically, or do we manually tell what changed ?
<laszlok> you could have to do that manually
<laszlok> in this case i redraw the white rectangle each time, therefore blanking the entire screen
<laszlok> this is something that goocanvas would also automate for you
<laszlok> QUESTION: How difficult is it to use cairo in combination with pygoocanvas?  (For example, if I wanted to draw/animate something like a progress indicator on top of my goocanvas while waiting for goocanvas to update during a slow operation.)
<laszlok> that seems like a strange use case, but it should work
<laszlok> theoretically you can use cairo to draw on top of any GTK widget
<laszlok> as long as the proper flags are set
<laszlok> QUESTION: What are the advantages of using cairo directly instead of through goocanvas?
<laszlok> goocanvas is much higher level
<laszlok> and cairo is very lightweight
<laszlok> if you are doing something simple and want the flexibility, or don't mind doing the drawing manually then cairo is the way to go
<laszlok> its really easy to get started with, and can work with GTK mouse clicks, etc well for simpler things
<laszlok> if you know you have a bunch of objects you want to drag around on the screen, goocanvas will probably make your life much easier
<laszlok> QUESTION: the png format uses the format_argb32 constant. the manual shows 3 more. can u tell the formats they specify?
<laszlok> referring to http://www.cairographics.org/documentation/pycairo/reference/constants.html#constants-format
<laszlok> FORMAT_ARGB32 is colour surface with alpha support
<laszlok> FORMAT_RGB24 is the same without alpha support so you will not be able to do transparency
<laszlok> the others are for alpha only masks and do not store colour values
<laszlok> these formats are for image surfaces. You may need to specify alpha only if you want to make a transparency mask
* ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - http://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Event: Ubu ntu Opportunistic Developer Week - Current Session: What's new in Quickly 0.4 - Didier Roche - Instructor: didrocks || Questions in #ubuntu-classroom-chat
<didrocks> awesome laszlok, thanks for your session :) Just a question, when will you do a Quickly template for a cairo project? :p (kidding)
<didrocks> so, welcome everyone on the session about Quickly 0.4
<didrocks> [SLIDE 1]
<didrocks> who is interested on what we backed for Quickly 0.4? hands up in -chat!
<didrocks> nice
<didrocks> so, I'm Didier Roche, one of the Quickly developer and also desktop team member
<didrocks> (and fresh ubuntu core dev :))
<didrocks> for people not seeing the slide, you can get them at http://people.canonical.com/~didrocks/Quickly-0.4.pdf
<didrocks> it should be on the Session tab in lernid
<didrocks> so, first, what this session is *not* about
<didrocks> this session isn't a presentation of Quickly. This has already been done later this week by Rick Spencer. logs availabled at https://wiki.ubuntu.com/MeetingLogs/OpWeek1003/Quickly
<didrocks> [SLIDE 2]
<didrocks> (at least, it works me in lernid :p)
<didrocks> (and that's not Quickly's fault ;))
<didrocks> so, 0.4 is unfortunately still in development
<didrocks> it still needs some stuff to be added in launchpad to make things easier
<didrocks> and I prefer to do that the right way than a quickly screenscrapping
<didrocks> so, warning, it's unstable, the current version is 0.3.5
<didrocks> I hope to release the stable version before lucid beta 1
<didrocks> in any case, Quickly 0.4 will be in lucid :)
<didrocks> so, a little about stats
<didrocks> last version which is 0.2.6 has been release approximately 6 months before
<didrocks> and a lot happens in 6 months :)
<didrocks> you can see some stats for the addicts: 250 commits and 12930 changed lines
<didrocks> to be honest, some file had been moved, so if we want to be fair, I would say 4000 code of code have been really impacted
<didrocks> it's a lot, and I'll show you now what are in those lines :)
<didrocks> [SLIDE 3]
<didrocks> souces: how to be informed of what's new?
<didrocks> well, this session is dedicated to that, so that's a good first step :)
<didrocks> (I'll probably blog on planet ubuntu too when Quickly 0.4 will be out)
<didrocks> a more detailed sources the NEWS file in trunk
<didrocks> I try to keep it pretty complete
<didrocks> and of course, if you want full details, you have to read the 250 commits :)
<didrocks> let's first see what's the most noticeable changes
<didrocks> the first thing is that the ubuntu-project template (the only one which existed in 0.2.x) is no moreâ¦
<didrocks> don't be panic, it has just been renamed ubuntu-application
<didrocks> of course, existing project will be transitionned appropriately so that you don't have to change anything for existing Quickly users
<didrocks> Quickly 0.4 will welcome at least one new template, and even maybe a third one in trunk :)
<didrocks> ubuntu-cli template is to create a command line soft with all the ubuntu-application intgration
<didrocks> (a lot of people asked for a cli template :))
<didrocks> ubuntu-game (or pygame, or whatever) will be detailed later in this week by Rick, you should be already aware of that if you read planet ubuntu
<didrocks> also, artfwo (thanks to the template inheritance I'll described later) is beginning to implement a gedit-plugin template
<didrocks> so, a lot of goodness to come in a very short time :)
<didrocks> [SLIDE 4]
<didrocks> as there is no question, let's dive a little bit more on what's interest most of you: ubuntu-projectâ¦ humâ¦ ubuntu-application new capability ;)
<didrocks> first thing (and I'll come back later on that) you have to understand is that your existing app will be converted for 0.4
<didrocks> it will be the first time you run a quickly command on it
<didrocks> (also if you proceed some tab completion)
<didrocks> that's needed and it's a new Quickly core capability
<didrocks> that implies that projects which will be converted to Quickly 0.4 won't work anymore with a previous version of Quickly
<didrocks> (it's still possible to convert back by hand, but complicated)
<didrocks> as I wrote, ubuntu-application in 0.4 has a new versionning scheme
<didrocks> that means that project will follow by default ubuntu way of versionning thing
<didrocks> for instance, if I run "quickly release" just now, my release will be 10.03
<didrocks> if I run quickly release again, it will be 10.03.1
<didrocks> and so on :)
<didrocks> you are still able to provide your release version yourself
<didrocks> the second point is the most tricky one but the one on the top priority list
<didrocks> did you have some troubles setting up your gpg and ssh key on LP to make your first quickly share/quickly release?
<didrocks> that will be (we hope) part of the past in 0.4!
<didrocks> this is what I'm currently working and that needs a lot of work on launchpad sideâ¦ and I'm not a LP hacker
<didrocks> so, normally, if you don't have one, Quickly will do everything for your
<didrocks> you*
<didrocks> also, selecting the right email adress through some algorithms :)
<didrocks> moving onâ¦
<didrocks> quickly license has been totally reshaped
<didrocks> no more Copyright file which populate an AUTHOR file, you will only have to edit the AUTHOR one
<didrocks> (this confused some people before)
<didrocks> the next one is more interesting
<didrocks> when you quickly release, your changelog will automatically be collected with all the messages you provided in "quickly save <your message>" from the last release
<didrocks> it will create a release and milestone on launchpad
<didrocks> upload your tarball too to be available on the first page
<didrocks> and create an annoucement with your changelog
<didrocks> of course, as a good upstream, it signs the tarball file too (as it's recommended as a best practice)
<didrocks> you can see what it gives on my test project: https://edge.launchpad.net/fooby
<didrocks> next point is ppa
<didrocks> when Quickly 0.2 was released, launchpad only enabled you to have one ppa
<didrocks> which was calledâ¦ "ppa"
<didrocks> things have changed now and you can have multiple ppa
<didrocks> also, some people would like to upload the package to a team ppa
<didrocks> and to be honest, that makes sense :)
<didrocks> so, now, you can upload to any ppa you want
<didrocks> either by providing --ppa <ppa_name>
<didrocks> to quickly share and release
<didrocks> or to put it as a default with quickly configure ppa <ppa_name>
<didrocks> of course, shell completion still works there and give you the list of all ppa you have access
<didrocks> (/!\ it's slow on LP side, can take more than 10s)
<didrocks> ppa_name can be: "myppa" or "team/ppaname"
<didrocks> and shell completion works for everycase :)
<didrocks> on another aspect, as I wrote some commands have been rename to be more consistent
<didrocks> quickly dialog is now quickly add dialog
<didrocks> (that will avoid in the futur to have 50 commands in a template)
<didrocks> quickly lp-project is quickly configure lp-project
<didrocks> and quickly glade is now quickly design
<didrocks> of course, as always, statement completion is here to help you to find commands name and arguments to the commands :)
<didrocks> for instance quickly configure [tab][tab] will show you all available options like ppa, lp-project, bzr
<didrocks> [SLIDE 5]
<didrocks> ah, I like very much next option :)
<didrocks> when you "quickly release", now, you will have the about dialog automatically refreshed
<didrocks> that means, your logo, but also the new version number appears, the Copyright holder, the homepage, the Credit (authors) button and license one
<didrocks> so, no need to before or to think about them, Quickly is handling that for you :)
<didrocks> that avoid to make a .1 release with "I forgot toâ¦"
<didrocks> next item (no, not the blank one) had been asked also by a lot of persons
<didrocks> being able to add manual dependencies
<didrocks> "why care, quickly already grab all the depends for us?" you will tell meâ¦
<didrocks> that's both true and false to be honest :)
<didrocks> for instance, if you launch a command yourself as a subprocess pythondistutils-extra won't find it and you will have a missing dependency
<didrocks> so now, for that, you can just fire away $ quickly configure dependencies
<didrocks> as "dependencies" is typo-prone, think about using shell completion for that too :)
<didrocks> next thing is bzr branch, as for ppa, you can tell where you can push and pull your code if you are interested in :)
<didrocks> quickly configure bzr of course :)
<didrocks> maybe the tutorial which (I'm afraid) is still not internationalized will be thanks to fagan. But nothing sure yet, still ongoing work :)
<didrocks> of course, this was only the most important things I can list for that session for ubuntu-application template, but there are a lot of various fixes, new licenses available, packagin tweak, internationalized application, and so on :)
<didrocks> [SLIDE 6]
<didrocks> oh btw, I forgot about the apport hook!
<didrocks> all project will come (but you can still disabling that if you don't want) an apport hook by default
<didrocks> and the menu will have the launchpad addition for translation and help in the help menu
<didrocks> ok, so, now, really slide 6 :)
<didrocks> this is for prospective template developers and people interested in making a GUI for Quickly
<didrocks> first thing is importing commands between templates is available
<didrocks> QUESTION: does having an apport hook mean that if the program crashes and stuff you can send a detailed report to the launchpad project?
<didrocks> dbell: exactly :)
<didrocks> and you get that for free :)
<didrocks> so, back on importing commands
<didrocks> if one day you want to look at the ubuntu-cli template
<didrocks> you will see that there is 0 line of code
<didrocks> yes, no typo, I said 0!
<didrocks> it's just a new boiler plate, and I import all commands from ubuntu-application
<didrocks> so, basically, there is a commandsconfig with:
<didrocks> [ubuntu-application]
<didrocks> IMPORT=configure;create;edit;license;package;release;run;save;shar
<didrocks> (for obvious reason for a cli template, I don't import design and add dialog :))
<didrocks> and then, I can create a ubuntu-cli application, edit, licence, packageâ¦
<didrocks> and get statement completion for all of those using the new boiler plate code :)
<didrocks> so, creating a template from an existing one is really really easy
<didrocks> QUESTION: Will apps still work if python-launchpad-integration isn't installed (eg. on other distros)
<didrocks> RainCT: we try to include that as a patch, so that pristine tarball doesn't have that code and so other distros aren't impacted
<didrocks> (it's basically a try: pass)
<didrocks> well, other functions (quickly ;))
<didrocks> you can now pass option to template
<didrocks> we have apport integration
<didrocks> so ubuntu-bug quickly is your friend :)
<didrocks> as I told you, you can now quickly configure [tab][tab] --ppa [tab][tab]
<didrocks> that means that the core has now option completion for you
<didrocks> we handle template upgrade
<didrocks> (even if you launch a command from one template into another project)
<didrocks> like quickly --template my-awesome-template foocommand
<didrocks> we have also now an API
<didrocks> so, if you want to build a GUI or integrate it into an IDE, that's the way to go :)
<didrocks> of course, in addition to thing, many fixes and refactoring
<didrocks> [SLIDE 7]
<didrocks> I've already talked about the ubuntu-cli template
<didrocks> the most important thing is that it's a new boiler plate for no code for the commands :)
<didrocks> if you want to implement your own template with import of ubuntu-application command, that's where to look for examples
<didrocks> QUESTION: Any examples on the API?
<didrocks> osteenbergen47: basically, you just have to "from quickly import api" and then, look at the api file
<didrocks> if you are interested in that, join #quickly and I can help you :)
<didrocks> QUESTION: is there a tutorial on how to do own/custom templates ?
<didrocks> oskude: I've written one for Quickly 0.2, let me find the link
<didrocks> http://blog.didrocks.fr/index.php/post/Build-your-application-quickly-with-Quickly%3A-Inside-Quickly-part-6
<didrocks> (and now, I kill my Internet connexion as I host myself my server ;))
<didrocks> this is quite outdated
<didrocks> I will refresh that once 0.4 out
<didrocks> [SLIDE 8]
<didrocks> so, you want to try Quickly 0.4? (well, 0.3.5)
<didrocks> as I mentionned before, we warned, you can't convert back your project to the previous format
<didrocks> and I don't have the time to ensure that everycommand works at each commit, but I try to fix the issue within the day
<didrocks> so, jump into #quickly, so that you can yell at me that it's broken :)
<didrocks> and if you want to test, branch the trunk
<didrocks> bzr branch lp:quickly
<didrocks> export PATH=<path_to_your_trun>/bin:$PATH
<didrocks> (note the /bin :))
<didrocks> quickly --version should normally answer you about the current version
<didrocks> [SLIDE 9]
<didrocks> of course special thanks to Rick to have the idea of this project
<didrocks> and he will do the two next session, stay around :)
<didrocks> also some contributors are really awesome and help pushing the project further :)
<didrocks> [SLIDE 10]
<didrocks> so, taking questions now in the 5 remaining minutes
<didrocks> QUESTION: Is there an easy way to try fresh quickly on Karmic? The straightforward setup.py build/install way results in a lot of errors.
<didrocks> right, there is a bug logged about that
<didrocks> I don't see anything preventing for backporting to karmic
<didrocks> BUT
<didrocks> you need last distutils-extra version
<didrocks> (else you can't add depends, nor you have the automated changelog goodness)
<didrocks> and I probably have to fix setup.py
<didrocks> I think I'll try to provide a package in the quickly ppa for karmic
<didrocks> QUESTION: Is there a ppa-daily of Quickly for auto installing the last one?
<didrocks> there is a daily ppa, jcastro was the owner IIRC, I don't know the current state to be honest
<didrocks> I think export PATH is more convenient :)
<didrocks> and that's what I do everyday :)
<didrocks> well, of course the day we can do "quickly release lucid", I think Quickly will take some thousands lines of code :)
<jcastro> The dailies work, if they don't work for you just poke me.
<didrocks> but as I still like my job, it won't happen :)
<didrocks> I guess it's time :)
<didrocks> and thanks jcastro
<didrocks> thanks all for your attention
<didrocks> now, stage is to you rickspencer3
<didrocks> and thanks for having launched Quickly once more :)
* ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - http://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Event: Ubuntu Opportunistic Developer Week - Current Session: Create games with PyGame - Rick Spencer - Instructor: rickspencer3 || Questions in #ubuntu-classroom-chat
<rickspencer3> hi all
<rickspencer3> ready for some pygame stuff?
<rickspencer3> great
<rickspencer3> as usual, I got my notes ready before hand and stuck them on the wiki:
<rickspencer3> https://wiki.ubuntu.com/UbuntuOpportunisticDeveloperWeek/PyGameClassNotes
<rickspencer3> so I'll go through each section and take questions
<rickspencer3> Pygame is a library for making arcade style sprite games
<rickspencer3> It features very easy blitting and colision detection
<rickspencer3> I have some sample code to help with understanding pygame here:
<rickspencer3> https://code.edge.launchpad.net/~rick-rickspencer3/pygame-template/trunk
<rickspencer3> I think you can go:
<rickspencer3> bzr branch lp:pygame-template too
<rickspencer3> note that some of this code is a bit old, and I need to reformat it and such
<rickspencer3> but it
<rickspencer3> s failry readable
<rickspencer3> however, it will eventually be a quickly template, hopefully in time for lucid
<rickspencer3> if you want to grab that it might help you follow the class a bit, but it is not required
<rickspencer3> it comes with some basic game play that you can study and modify
<rickspencer3> essentially, it is kind of like asteroids
<rickspencer3> you control the black triangle in the middle, and there are two enemies
<rickspencer3> Of course you will want some docs
<rickspencer3> Pygame has good docs here:
<rickspencer3> http://www.pygame.org/docs/
<rickspencer3> before we discuss how to set up a game
<rickspencer3> any questions?
<rickspencer3> ok, then let us rock
<rickspencer3> so, you're going to set up a game
<rickspencer3> first thing you need to do is set up a game surface
<rickspencer3> and do other initalizations
<rickspencer3> so ..
<rickspencer3> initialize pygame libraries
<rickspencer3> pygame.font.init()
<rickspencer3> pygame.mixer.init()
<rickspencer3> (assuming you are using fonts and sound of course)
<rickspencer3> then create a screen
<rickspencer3> the screen will be the surface on which your sprites will be drawn, essentially where your game will occur
<rickspencer3> screen = pygame.display.set_mode((800, 480))
<rickspencer3> that's for an 800 x 400 pixel game
<rickspencer3> also, create a couple of variable you will need later
<rickspencer3> like a background image
<rickspencer3> background = pygame.image.load(path_to_background)
<rickspencer3> notice the image is a PyGame image
<rickspencer3> and a clock
<rickspencer3> clock = pygame.time.Clock()
<rickspencer3> you'll see why we need the clock next
<rickspencer3> pygame games use a good old fashioned input loop
<rickspencer3> don't know if you all ever programmed with an event loop
<rickspencer3> but it was very common for writing GUI apps back around when dinosaurs used computers
<rickspencer3> essentially, you tell your app to keep looping
<rickspencer3> and whenever it goes through the loop do a few things
<rickspencer3> 1. respond to user input
<rickspencer3> 2.update data for any sprites on the screen
<rickspencer3> this includes seeing if any sprites have collided
<rickspencer3> 3. redraw everything
<rickspencer3> let's look at setting up a game loop
<rickspencer3>  while 1:
<rickspencer3>   clock.tick(15)
<rickspencer3>   if ControllerTick() == 0:
<rickspencer3>    return
<rickspencer3>   if not game.paused:
<rickspencer3>    ViewTick()
<rickspencer3>    if CheckCollisions() == 0:
<rickspencer3>     return
<rickspencer3> you can see this code in the crashteroids file at line 169
<rickspencer3> so first, the loop just runs and runs until etiher ControllerTick or CheckCollisions returns 0
<rickspencer3> the first line in the loop basically says to have 15 frames per second
<rickspencer3> this is not like a sleep function where the argument says how long to sleep
<rickspencer3> make sure that you pick a number that is low enough that a lower powered computer can keep up, if you care about that kind of thing
<rickspencer3> The next line calls ControllerTick()
<rickspencer3> This function checks for user input, which I will explain in a moment, and the updates all the game data
<rickspencer3> this is a function that *you* write
<rickspencer3> it's not built into PyGame
<rickspencer3> then next in the loop
<rickspencer3> assuming that the game is not paused, it will go ahead and update the view and do collision detection
<rickspencer3> The reason that controllertick is always called is because this function controlls pausing and unpausing of the game
<rickspencer3> if you didn't call it every time through, the user couldn't unpause
<rickspencer3> we'll look at each of these functions in more detail
<rickspencer3> but first, questions?
<ClassBot> mhall119 asked: what file is that in?
<rickspencer3> it's in crashteroids/bin/crashteroids
<ClassBot> ryzrecreel asked: What kind of image formats can you use?
<rickspencer3> dunno for sure
<rickspencer3> I always use png
<rickspencer3> ok, no more questions, so moving on
<rickspencer3> let's start by handling user input
<rickspencer3> pygame basically queues up input events
<rickspencer3> you can then loop through them and respond to each event
<rickspencer3> at line 93, you can see how the loop is set up
<rickspencer3>  for event in pygame.event.get():
<rickspencer3>   if event.type == pygame.QUIT:
<rickspencer3>    return 0
<rickspencer3> pygame.QUIT is called when the window closes or such
<rickspencer3> of course you could also do something smart and save game state or such
<rickspencer3> but this code returns 0, which causes the main event loop to quit
<rickspencer3> now, let's say what I want to do is make the ship go forward when the user presses the j key
<rickspencer3> (which is what crashteroids does by default)
<rickspencer3> first I ask what kind of event it was
<rickspencer3>   if event.type == pygame.KEYDOWN:
<rickspencer3> yup, I want to respond to key down events
<rickspencer3> so this I'll write some code here
<rickspencer3> and then if it was a key event, what key was pressed
<rickspencer3>     if event.key == pygame.K_l:
<rickspencer3>      #do something
<rickspencer3> oops
<rickspencer3> that's for l key :)
<rickspencer3> I guess l is for move, and j is to shoot
<rickspencer3> in any case, you can probably guess that the correct event.key is pygame.k_j to respond to the j key
<rickspencer3> ;)
<rickspencer3> you can see the whole tree of if, else statements starting at line 89
<rickspencer3> there are also events for the mouse and joysticks even
<rickspencer3> so it's easy to create games that aren't only using the keyboard if you want
<rickspencer3> so that's how to handle input
<rickspencer3> let's look at sprites, but first, any questions?
<ClassBot> mhall119 asked: any kind of vector graphics?
<rickspencer3> could be, but PyGame is really sprite based
<rickspencer3> vector graphics is how games like asteroids and battlezone, and starcastle and stuff were created
<rickspencer3> but sprites are when you use images
<ClassBot> M49 asked: Does pygame have any dialog for key configuration?
<rickspencer3> not that I know of
<rickspencer3> that would be a nice thing to add to a quickly template though, wouldn't it
<rickspencer3> I would guess that you would just use PyGtk for this
<rickspencer3> create it yourself
<rickspencer3> ok
<rickspencer3> let's move on to sprites
<rickspencer3> A sprite is basically an image in an arcade game
<rickspencer3> pygame handles blitting for you, which is quite nice
<rickspencer3> I'll discuss blitting in a bit
<rickspencer3> If you wrote games long ago, you may remember rendering a sprite strip to an offscreen graphics world
<rickspencer3> and then selecting bits of that strip and copying them to the onscreen graphics world
<rickspencer3> pygame does not reqiure that at all
<rickspencer3> it is much more fun and easy
<rickspencer3> you just subclass the Sprite class
<rickspencer3> one key thing a sprite has is an Pygame.Image member, called image
<rickspencer3> I usually like to keep the original image around, as if you keep rotating the image and such, it will get more and more distorted over time
<rickspencer3> so when I create a sprite object, I set up the image member like this:
<rickspencer3>   self.masterImage = pygame.image.load(path_to_image_file)
<rickspencer3>   self.image = self.masterImage
<rickspencer3> this is all in the BastSprite class, btw, if you want to see the code in situ
<rickspencer3> a sprite also has a "virtual" function, called update
<rickspencer3> update is supposed to be called to tell a sprite to update it's data for a tick
<rickspencer3> you set things like the sprite's x, y coordinates in this function, and such
<rickspencer3> all your sprites should use this because you can then add a sprite to a RenderUpdates sprite group
<rickspencer3> don't add your own custom named method to do this, or you will lose a lot of benefits of PyGame
<rickspencer3> call update for that group, which will call update for each sprite
<rickspencer3> you create a sprite group like this:
<rickspencer3> enemies = pygame.sprite.RenderUpdates()
<rickspencer3> and then you can add an sprite to that group
<rickspencer3> enemies.add(create_enemy())
<rickspencer3> you can also empty a sprite group
<rickspencer3> enemies.empty()
<rickspencer3> useful when you are resetting a level or something
<rickspencer3> as we'll see later, sprite groups also help lots with collision detection
<rickspencer3> back to sprites though
<rickspencer3> so you have an image on a sprite
<rickspencer3> you also need to define an x and y for your sprite
<rickspencer3> I in my sprite subclass, I might set x and y randomly like this:
<rickspencer3>    self.x = random.randint(0,300)
<rickspencer3>    self.y = random.randint(0,140)
<rickspencer3> (only when the sprite is created, of course)
<rickspencer3> but then on each call to update(), just change the x and/or y if the sprite is moving
<rickspencer3> sprites also have a "kill()" member function
<rickspencer3> calling kill causes the sprite to be removed from the playing surface
<rickspencer3> questions before we talk about updating the display?
<ClassBot> mhall119 asked: can you change the image on update?
<rickspencer3> yes
<rickspencer3> absolutely
<rickspencer3> you can also rotate it and other things
<rickspencer3> my sprites usually have an "explode" method
<rickspencer3> which causes a stage of an explosion to be displayed with each tick in update
<rickspencer3> so if you look at crashteroids, changing images on update is how I get the explosion effect
<ClassBot> mhall119 asked: Like, to animate your sprite
<rickspencer3> totally
<rickspencer3> like if you had a tank
<rickspencer3> and it was going to shoot a missle
<rickspencer3> you could have swap in images that make it look like a little guy loading the turret or something
<ClassBot> mhall119 asked: can you layer images to make a single sprite image?
<rickspencer3> hmmm
<rickspencer3> not that I know of
<rickspencer3> I don't think a sprite can composit images like that
<rickspencer3> ok
<rickspencer3> so now you have your event loop running, your game surface set up, and some sprites created
<rickspencer3> now we need to actually draw the sprites
<rickspencer3> for sprites that are not in a sprite group, we need to blit them
<rickspencer3> fortunately this does not involve the crazy gworld hackery of days of hold
<rickspencer3> pygame gives us a blit method
<rickspencer3> blitting is essentially the act of repainting parts of the screen that have changed
<rickspencer3> without blitting, the whole screen repaints and appears to flash
<rickspencer3> so to blit the blackgroud, we'll use the screen to blit
<rickspencer3> remember when we created teh screen object? now it's time to use it
<rickspencer3> screen.blit(background, [0,0])
<rickspencer3> I think that blitting the background like this basically repaints the whole background image over everything
<rickspencer3> if you are tuning for a very slow platform, or a game with lots and lots of sprites, you may not want do it this way or you get flashing
<rickspencer3> in those cases you might need to track the parts of the background exposed by moving sprites
<rickspencer3> this is a bit of work, but probably will not be necessary for you to do
<rickspencer3> I certainly have never run into trouble with this
<rickspencer3> for all I know, blit() is smart enough to not cause flashing
<rickspencer3> to blit an individual sprite, you have to tell the screen the image to use and the rect, or xy coords and dimensions, for hte sprite to blit
<rickspencer3> So if we have a sprite object called "g", we blit it like this:
<rickspencer3> screen.blit(g.image, g.rect)
<rickspencer3> sprites in a sprite group are a bit easier to blit
<rickspencer3> you can tell the sprite group to blit them all:
<rickspencer3>  enemies.draw(screen)
<rickspencer3> this blits all the enemies for you
<rickspencer3> we do this each time through the loop
<rickspencer3> in ViewTick()
<rickspencer3> question before we discuss collision detection?
<ClassBot> w1nGNUtz asked: will you explain anitmations? I'd like to understand how to animate an sprite using the clock
<rickspencer3> yeah
<rickspencer3> so let's say you want have an animation that shows a guy walking
<rickspencer3> create enough images to show taking a step smoothly
<rickspencer3> I'll guess it will take 8 frames to show smooth step
<rickspencer3> in the sprites update method
<rickspencer3> swap in the next image each time through
<rickspencer3> for example
<rickspencer3> when I show a guy exploding
<rickspencer3> I have 8 frames or so showing the explosion
<rickspencer3> named ship_explode_1.png to ship_explode_8.png
<rickspencer3> (or named similary, I forget exactly what I named them)
<rickspencer3> then I keep track in the update method of a counting variable
<rickspencer3> let me get the exact code, hold on
<rickspencer3>   if self.exploding:
<rickspencer3>    #do an explosion image for each tick
<rickspencer3>    self.explodestage += 1
<rickspencer3>    e = self.explodestage
<rickspencer3>    if e < 8:#there are 7 explosion images
<rickspencer3>     e = str(e)
<rickspencer3>     self.masterImage = pygame.image.load(crashteroidsconfig.guy_explode_stage + e  + ".png")
<rickspencer3>     self.updateImage()
<rickspencer3> updateImage is a function I wrote that rotates the image and does some other stuff
<rickspencer3> but essentially sets the sprites image member, like this:
<rickspencer3> self.image = pygame.transform.rotate(self.masterImage,self.orientation)
<rickspencer3> (if you weren't doing rotation and stuff, you could just assign the new image directly)
<ClassBot> mhall119 asked: does pygame offer any kind of "damage" data to tell what parts of the screen should be repainted?
<rickspencer3> I don't know
<rickspencer3> I always let the sprites blit() method take care of that for me
<rickspencer3> I don't think you'll to track this
<rickspencer3> back in the day, you would always track the previous rect for the sprites location
<rickspencer3> so that you could repaint it with the background
<rickspencer3> but I don't think PyGame requires this
<ClassBot> gooomba asked: Is pygame also suited for non-arcade games like chess for example?
<rickspencer3> yes
<rickspencer3> it wuold be good for board games for sure
<rickspencer3> ok, so collision detection
<rickspencer3> so let's say when an enemy rams our guy, we want both to be killed
<rickspencer3> but how to tell when an ememy hits?
<rickspencer3> detecting overlapping sprites is called "collision detection" and is handled quite well by PyGame
<rickspencer3> this saves you tons of work
<rickspencer3> (believe me, tracking rects and writing code to detect overlapping rects is not fun or easy!)
<rickspencer3> you can detect if two sprites have collided using pygame.sprite.spritecollide (), collideany, or groupcollide
<rickspencer3> so let's see if our guy, called g, has collided with an enemy
<rickspencer3>   e = pygame.sprite.spritecollideany(g, enemies)
<rickspencer3> call this each tick
<rickspencer3> I always have specific function to handle collision detection
<rickspencer3> if the guy has not collided with any enemies, e will be None
<rickspencer3> but when e is not None, that means boom
<rickspencer3> "boom"
<rickspencer3> let's say your guys shoots bullets
<rickspencer3> those bullets will most likely be managed in a sprite group
<rickspencer3> so we should also see if any enemies were killed by bullets
<rickspencer3> hits_dict = pygame.sprite.groupcollide(bullets, enemies, False, False)
<rickspencer3> since we are asking for a collision between groups of sprites
<rickspencer3> here you get back a dictionary
<rickspencer3> the keys are sprites from the first sprite group
<rickspencer3> and the values are keys from the second sprite group
<rickspencer3> so then we can just go through and kill each bullet and enemy for the collision:
<rickspencer3>    for b in hits_dict:
<rickspencer3>     for e in hits_dict[b]:
<rickspencer3>      e.kill()
<rickspencer3>      b.kill()
<rickspencer3> ok, next and last section is on playing sounds
<rickspencer3> any questions first?
<ClassBot> mhall119 asked: does pygame have any kind of scene-graph, to animate sprites without writing a whole bunch of python code?
<rickspencer3> if I know what that meant, I would give you a pithy answer
<rickspencer3> unfortunately, I have to say "I don't know"
<ClassBot> M49 asked: Does it track only bounding boxes or does it use trasparency information from sprites?
<rickspencer3> the bounding box one
<rickspencer3> actually, you can set the rect for the sprite specifically
<rickspencer3> I often set the rect for the sprite to be slightly smaller than the image itself
<rickspencer3> this give a nice effect where two sprites can just touch
<rickspencer3> and not explode
<rickspencer3> it gives a nice "near miss" effect
<rickspencer3> it also lets you tune each rect to different shaped sprites
<rickspencer3> note that the rect is only used for collision detection so far as I know
<rickspencer3> so the whole image will always be displayed
<rickspencer3> ok, finally, sounds
<rickspencer3> we use the Pygame.mixer module to manage sounds
<rickspencer3> we need to initialize it before we use it:
<rickspencer3> pygame.mixer.init()
<rickspencer3> now I'll load an explosion sound to play when my guy explodes:
<rickspencer3> self.explosionSound = pygame.mixer.Sound(path_to_sound_file)
<rickspencer3> let's assume this sound is a bit loud, we can adjust the volume as we like:
<rickspencer3>   self.explosionSound.set_volume(.2)
<rickspencer3> then we can play the sound:
<rickspencer3>    self.explosionSound.play()
<rickspencer3> we can stop it too if it's going too long:
<rickspencer3>    self.explosionSound.stop()
<rickspencer3> the mixer module is quite rich
<rickspencer3> there are channels, fades, and all kinds of stuff
<rickspencer3> so
<rickspencer3> that was the last "chapter" for the class
<rickspencer3> we're a bit early
<rickspencer3> any questions?
<ClassBot> gooomba asked: what are the "False"-arguments in groupcollide() for?
<rickspencer3> shucks, I forget
 * rickspencer3 looks at docs
<rickspencer3> huh
<rickspencer3> http://www.pygame.org/docs/ref/sprite.html#pygame.sprite.groupcollide
<rickspencer3> no longer seems part of the API
<rickspencer3> I guess I can just remove that from the template
<ClassBot> mhall119 asked: what audio formats does mixer support?
<rickspencer3> I know ogg and wav
<rickspencer3> don't know what else, sorry
<rickspencer3> there are nine minutes left
<rickspencer3> any last questions, requests?
<rickspencer3> (otherwise I'll grab some soda and get ready for my next session ;) )
<ClassBot> oskude asked: how do i use the examples on that pygame site ?
<rickspencer3> I'm not sure what you are asking specifically
<rickspencer3> but I don't think they are set up as runable samples, but rather like code snippets
<rickspencer3> I used those samples heavily back when I was learning PyGame tough
<rickspencer3> ok, looks like no more questions
<rickspencer3> please feel free to join us in #quickly
<rickspencer3> any feedback on the PyGame template and how to improve it, what's wrong with it, etc...
<rickspencer3> is much appreciated
<rickspencer3> thanks all!
* ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - http://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Event: Ubuntu Opportunistic Developer Week - Current Session: SHOWCASE: Photobomb - Rick Spencer - Instructor: rickspencer3 || Questions in #ubuntu-classroom-chat
<rickspencer3> hi all
<rickspencer3> soooo
<rickspencer3> I'm here to talk about photobomb
<rickspencer3> jono thought some folks might be interested in hearing about some of the technology that I used and such
<rickspencer3> to make it easier to walk through, I put some screenshots and some notes:
<rickspencer3> here:
<rickspencer3> http://theravingrick.blogspot.com/2010/03/photobomb-featured-app-for-opp-dev-week.html
<rickspencer3> shall I begin with photobomb?
<rickspencer3> I wrote the first iteration of Photobomb one Saturday afternoon.
<rickspencer3> does everyone know what it does?
<rickspencer3> it's basically a hacked together photo editor
<rickspencer3> that let's you mash up images from sources like your feeds, your computer, the web, your web cam, etc...
<rickspencer3> do some fun stuff
<rickspencer3> and then you can save the image or tweet it
<rickspencer3> I wrote this totally just for the fun of it in my spare time
<rickspencer3> during January, I set the goal of writing one new feature a night
<rickspencer3> so I got pretty far with it that way
<rickspencer3> of course, it's a bit buggy still
<rickspencer3> but it's kinda fun to use
<rickspencer3> anyone who wants to contribute to it, fork it, whatever
<rickspencer3> by all means, have a go
<rickspencer3> anyway ...
<rickspencer3> I used Quickly to get the project started, so it was just a matter of laying out some UI in Glade, and then figuring out how to manipulate images.
<rickspencer3> I used Python Imaging Library (PIL) to create a cropped version of that little squirrel, and to paste it onto the picture.
<rickspencer3> PIL is a complete and power library. It was a bit tough figuring out the masking to crop the squirrel image as desired, but I eventually managed.
<rickspencer3> I ended up moving away from PIL, but from what I saw, I was impressed
<rickspencer3> any questions do far?
<ClassBot> mhall119 asked: where can we get the code?
<rickspencer3> it's in a junk branch
 * rickspencer3 gets
<rickspencer3> https://code.edge.launchpad.net/~rick-rickspencer3/+junk/photobomb
<rickspencer3> party on!
<rickspencer3> I think it might be in my ppa too
<rickspencer3> ok
<rickspencer3> so following along to the next screen shot
<rickspencer3> I added the ability to choose an image to stick in there
<rickspencer3> and photobomb with that little squirrel
<rickspencer3> It turned out to be tedious to write code to open an image file.
<rickspencer3> So I added a prompt to quickly.widgets to handle opening files.
<rickspencer3> Having your own library of reusable widgets is quite a luxury.
<rickspencer3> if you look closely at the screenshot ...
<rickspencer3> Note that I didn't know the gtk.FileChooser API that well, so made a couple of early mistakes, such as handling the existing file replace functionality myself.
<rickspencer3> Didn't realize that the API could handle it
<rickspencer3> but in any case, the shell of photobomb is PyGtk of course
<rickspencer3> and I had to learn a bit about some areas of Gtk that I hadn't used too much
<rickspencer3> any questions about that one?
<ClassBot> mhall119 asked: Did you already know Glade before you started this?
<rickspencer3> oh yes
<rickspencer3> quite
<rickspencer3> at first, you think Glade is your enemy
<rickspencer3> but after a while, you learn it is our friend
<rickspencer3> but Glade can be a bit hard to learn
<rickspencer3> and it isn't designed to do everything
<rickspencer3> so writing gtk.UIBuilder code is still part of hte process
<rickspencer3> quickly makes this a bit easier, by giving each window a builder function
<rickspencer3> I mean builder member
<rickspencer3> so you can go:
<rickspencer3> self.builder.get_object("hbox1").pack_start(my_widget)
<ClassBot> mhall119 asked: does photobomb run on Karmic?  or just Lucid?
<rickspencer3> well
<rickspencer3> it's packaged for Lucid
<rickspencer3> because it uses quickly-widgets
<rickspencer3> which is in the quidgets project
<rickspencer3> however, if you want to run it
<rickspencer3> it shouldn't be too hard
<rickspencer3> just branch photobomb
<rickspencer3> then branch quidgets
<rickspencer3> then stick quidgets/quickly dir in photobomb/photobomb, and it might work
<rickspencer3> or just put quidgets somewhere on disk and set the python path when you run it
<rickspencer3> !PYTHONPATH="~/quidgets/quickly" python photobomb/bin/photobomb
<rickspencer3> for example
<ClassBot> mhall119 asked: Any good tutorials on learning to make Glade my friend?
<rickspencer3> mmm
<rickspencer3> not really
<rickspencer3> there are a bunch of tutorials
<rickspencer3> but many are out of date, since PyGtk moved form LibGlade to UI Builder
<rickspencer3> if you have Quickly installed, there is a bit in there to help you get started
<rickspencer3> #ubuntu-app-devel is a good place to ask specific gladey questions
<rickspencer3> unless it's about workign with a quickly template, in which case #quickly might be better
<rickspencer3> ok
<rickspencer3> so next section
<rickspencer3> When I tried to implement some captioning and other features, I came to realize that PIL was just not designed for the kind of stuff I wanted to do with it.
<rickspencer3> When I switched to GooCanvas, it became much easier to add features.
<rickspencer3> I was able to add resizing, rotation, and drag to move in a matter of an hour or so.
<rickspencer3> A couple of days later I fixed an issue with dragging rotated items that resulted from the craziness involved with items in goocanvas maintaining their own coordinate system seperate from the goocanvas they are in.
<rickspencer3> questions about PIL, GooCanvas, or anything else so far?
<ClassBot> mhall119 asked: it doesn't look like you did much with glade, do you find yourself doing most UI building directly in python?
<rickspencer3> yes
<rickspencer3> I genreally use glade to set up containers
<rickspencer3> then I target those container from code
<rickspencer3> especially for custom images and such'
<rickspencer3> also, I use subclassing a lot
<rickspencer3> and I haven't done much work to make my own widgets work within glade
<rickspencer3> ok
<rickspencer3> I could then go and the ability for users to use a pen tool in photobomb.
<rickspencer3> This required managing mouse events and creating a PolyLine object from the collected mouse points.
<rickspencer3> Later I found that a Path worked better than a PolyLine for creating the Ink. I still have not figured out how to add points to an existing Path.
<rickspencer3> As a result, Photobomb recreates the Path with each mouse move. This gets slow if the Path is not short.
<rickspencer3> I did a session on GooCanvas yesterday, but can take some quick questions on it today
<rickspencer3> I used the gtk.ColorChooserDialog for color selection.
<rickspencer3> I also added color button and ink width button.
<rickspencer3> originally, These hosted a goocanvas, and I just added a path to each and set the properties of the Path to display the selected color and width.
<rickspencer3> later I changed the color button to change it's background to show the correct color
<rickspencer3> I mean, selected color
<rickspencer3> there's a "color selection" button in Gtk, but it didn't quite suite my UI
<rickspencer3> in terms of getting settings from users
<rickspencer3> I had already created quickly.prompts to make it easy to collect a line width from the user. (quickly.prompts.integer()).
<rickspencer3> I could handle this with a GooCanvas.Widget object embedded in situ, but that's a lot of work and using quickly.prompts.string() is a one-liner.
<rickspencer3> questions so far?
<rickspencer3> following along, the next thing I implemented was adding text to the goocanvas
<rickspencer3> I added a gtk.STOCK_EDIT button to collect text from the user.
<rickspencer3> well, that was just to manage the correct icon
<rickspencer3> since i wanted buttons to be compact
<rickspencer3> I used toolbar buttons, and just setting them to stock worked well
<rickspencer3> later, I had to hack around some limitations to how "stock" works
<rickspencer3> I used a quickly.prompts.string() to collect the string to display from the user.
<rickspencer3> next I added the some feedback about the current selection
<rickspencer3> To display selection, I simply used a GooCanvas.Rect with a bit of buffer around the selected object.
<rickspencer3> I could have added stock selection points from gtk, but that sounded like a lot of work.
<rickspencer3> questions so far?
<rickspencer3> I added a bit of opacity to the selection box. This works better, as you can see what is behind the selected item
<rickspencer3> Then I added opacity to other selectable items.
<rickspencer3> I sniped some code from segphault's grabbersnap app to figure out how to set up rgba colors.
<rickspencer3> It's a bit of a hack, but seems to work well.
<rickspencer3> At this point in the project I also switched from having the user open individual images to add, to iterating through the Pictures directory and adding a button for each encountered image.
<rickspencer3> I accomplished this asynchronously by putting this on a thread, using quickly.widgets.asynch_task_progressbox()
<rickspencer3> This simplifies threaded coding a bit, but I am finding that threads + Python + PyGtk don't work out as well as I want, no matter how carefully I code it
<rickspencer3> happy to take questions now if you've gottem'
<rickspencer3> so moving on to the web cam feature
<rickspencer3> Web Cam support is an important feature for Photobomb,
<rickspencer3> but the available APIs looked daunting.
<rickspencer3> That is, until I discovered that Pygame had a simplified web cam interface.
<rickspencer3> I created a quickly.widget to handle web cam integration and added that widget to Photobomb.
<rickspencer3> Note that this means quickly.widgets depends on PyGame.
<rickspencer3> I think I shall move the webcam widget out of the default install and make it available in some other manner.
<rickspencer3> Having another source of images meant that I needed to add a gtk.Notebook to handle switching between the two sources.
<rickspencer3> I later went on to use icons for the notebook tabs, but labels worked fine when there were only 2 sources
<rickspencer3> Questions so far?
<ClassBot> w1nGNUtz asked: It seems some programs take too long to evolve. How could it be if you manage to do this so quickly?
<rickspencer3> hmm
<rickspencer3> interesting quetsion
<rickspencer3> I guess I just did one new feature a night
<rickspencer3> I refactored as I went
<rickspencer3> to support adding new features
<rickspencer3> this was a really fun project to work on
<rickspencer3> so I don't know
<rickspencer3> I guess PyGtk + GooCanvas are just really productive libraries
<ClassBot> titeuf_87 asked: is there any reasons you went with pygame instead of gstreamer?
<rickspencer3> for the simple reason that I discovered the PyGame api, and it looked like I could do it
<rickspencer3> I would switch to gstreamer if I saw sample code that convinced me it would be easy to do
<rickspencer3> I would love to break the PyGame dependency
<rickspencer3> ok
<rickspencer3> so Web image searching
<rickspencer3> I added this next
<rickspencer3> so you could search for a term, and then get back a list of related images
<rickspencer3> I ended up using the Yahoo! image search api for this
<rickspencer3> for the sole reason that the API was dead simple to use and well documented
<rickspencer3> around this time, someone picked up another program I wrote, and added good support for extracting image urls from a web page
<rickspencer3> so I sniped that code and made it so that if you entered a URL
<rickspencer3> instead of doing an image search, it would scrape images from that page
<rickspencer3> while I was at it, I also let the user type in a url directly to a photo and loaded that
<rickspencer3> I think the web image search functionality is really fun to use
<rickspencer3> like, "it would be funny if a picture of a cat were here"
<rickspencer3> type "cats"
<rickspencer3> and then you can get the cat, use the clipping tool, and drag it where you want
<rickspencer3> I'll pause to see if there are questions now
<rickspencer3> ok
<rickspencer3> so the next major change I made was from toolbar buttons to normal buttons
<rickspencer3> the motivation was this:
<rickspencer3> Changing size, rotation, and opacity required the user to click the button once for each increment.
<rickspencer3> So rotating something to be upside required the user to go "click click click click", etc...
<rickspencer3> What I wanted was the user to click the button, and hold it down as the image rotated, and then to stop when it was positioned as desired.
<rickspencer3> Sadly, there is no "key-down" event on gtk.Toolbars.
<rickspencer3> well, gtk.ToolButtons, I mean
<rickspencer3> So I had to switch Photobomb from using toolbars to using regular gtk.Button.
<rickspencer3> I achieved the layout by using a gtk.Table
<rickspencer3> I also created a new quickly.widget.PressAndHold widget to add press and hold functionality
<rickspencer3> I accomplish the asynch behavior with gobject.timeout_add(250, self.__tick).
<rickspencer3> At each tick the button emits a signal telling the consuming app to do something.
<rickspencer3> Questions?
<ClassBot> M49 asked: Does it check license metadata for pictures?
<rickspencer3> nope
<rickspencer3> that might be a nice feature to add though
<rickspencer3> especially if this is something that concerns you
<rickspencer3> but I don't think it's pertinent to the way I envisioned folks using photobomb
<rickspencer3> basically, making funny pictures from themselves and their friends
<rickspencer3> ok
<rickspencer3> last section is on the Social Network Integration
<rickspencer3> this was almost all achieved with Gwibber
<rickspencer3> Because Gwibber uses desktopcouch to store messages in Lucid,
<rickspencer3>  I could add the feature to grovel through the messages and extract images coming from social feeds to display.
<rickspencer3> Of course, this will only work in Lucid ;)
<rickspencer3> I also sniped Gwibber's fb credentials from desktopcouch, and used that and some FML to get images from Facebook.
<rickspencer3> so your gwibber tab of the notebook loads up all the images in feeds you subscribe to, and also any images in facebook ...
<rickspencer3> that are tagged with any of your friends so long as the image has been modified in the last 5 days
<rickspencer3> I think this aspect of photobomb is really fun
<rickspencer3> converging your personal feeds into an app that is designed to mash 'em all up
<rickspencer3> I used the Gwibber API to add broadcasting Photobomb images.
<rickspencer3> The GooCanvas renders a png that is saved to a temp location.
<rickspencer3> Then pycurl uploads the image to imgur.com, which returns a url.
<rickspencer3> Gwibber's GwibberPosterVBox to broadcast the URL.
<rickspencer3> So that
<rickspencer3> s the photobomb showcase
<rickspencer3> I would love finish off photobomb sometime and let folks have fun with it
<rickspencer3> but I've been a bit busy
<rickspencer3> there are few bugs here and there, some of them quite annoying, as they involve frozen UI
<rickspencer3> so, 10 minutes left
<rickspencer3> happy to discuss anything now, answer any questions
<rickspencer3> ok
<rickspencer3> I'm going to call that a wrap, then
<rickspencer3> thanks all for coming!
<rickspencer3> and if anyone wants to contribute to photobomb in any way
<rickspencer3> I am totally open to that'
<rickspencer3> it's more fun working on these things together ;)
* ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - http://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi
#ubuntu-classroom 2010-03-04
* ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - http://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Current Session: NBS and how to keep the archive fresh - Instructor: persia || Questions in #ubuntu-classroom-chat
* ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - http://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi
<jono> dpm about set?
<dpm> jono, ready to roll
<jono> you rock :)
<dpm> #community rocks!
<jono> :)
* ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - http://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Event: Ubuntu Opportunis tic Developer Week - Current Session: Hot rodding your app for translations support - David Planella - Instructor: dpm || Questions in #ubuntu-classroom-chat
<dpm> hello everybody!
<dpm> Welcome to today's first session of Ubuntu Opportunistic Developer Week
<dpm> let's just wait a couple of minutes, to see that everyone gets here...
<dpm> I should also remind you that today is a snippets day
<dpm> of which you'll find all details here: https://wiki.ubuntu.com/PythonSnippets
<dpm> There'll also be a snippets party in #ubuntu-app-devel later, so be sure to join the fun!
<dpm> Anyway, without further ado...
<dpm> [SLIDE 1]
<dpm> Welcome to this session on Hot rodding your application for translations support
<dpm> In the next hour we'll talk on how to get your app ready to speak a multitude of languages
<dpm> and set up so that our awesome translation teams can do their work
<dpm> For those who are not using Lernid, here's a direct link to the slides in this session: http://people.ubuntu.com/~dpm/Quickly-i18n.pdf
<dpm> This talk will be based on quickly as the framework to opportunistically create your application in no time
<dpm> parts of the talk were contributed by didrocks, Didier Roche, who's the main quickly developer
<dpm> Let's start having a quick look at the main players involved in the internationalization game:
<dpm> [SLIDE 2]
<dpm> == GNU Gettext ==
<dpm> Gettext is the underlying and most widely used technology to enable translations of Open Source projects.
<dpm> It defines a standard format of translation files translators can do their work with (PO files)
<dpm> and lets applications load those translations compiled in a binary format (MO files) at runtime.
<dpm> It has implementations for many programming languages, and amongst them, of course, Python.
<dpm> You'll find that the comprehensive gettext manual at http://www.gnu.org/software/gettext/manual/gettext.html can be a very useful reference,
<dpm> The Python implementation of the gettext API is what we'll use to internationalize our project with Quickly today.
<dpm> Needless to say, it also comes with some nifty documentation at http://docs.python.org/library/gettext.html
<dpm> == intltool ==
<dpm> Intltool is a higher level tool that adds functionality to gettext by allowing the extraction of translatable strings from a variety of file formats
<dpm> It has also become a standard tool when implementing internationalization for OSS projects. Nearly all (if not all) GNOME projects, for example, use intltool.
<dpm> == python-distutils-extra ==
<dpm> Python-distutils-extra is a python package that makes it easy to integrate themable icons, documentation and gettext based translations in your python install and build tools, and it's basically an enhancement to python-distutils.
<dpm> The project's page is at http://www.glatzor.de/projects/python-distutils-extra/
<dpm> The three above technologies (gettext, intltool, python-distutils-extra) are transparently used by quickly, so we won't get into much more detail for now.
<dpm> There are also more aspects involved in internationalizing applications, such as font rendering, input methods, etc., but this should get you started for now.
<dpm> == Quickly ==
<dpm> I'll be very brief here and let you figure out more on quickly as we go along
<dpm> For now, it will suffice give you a teaser and tell you that it is the tool which brings back the fun in writing applications!
<dpm> == Launchpad Translations ==
<dpm> Launchpad Translations ( https://translations.launchpad.net/ ) is the collaborative online tool which allows translation communities to be brought together and translate applications online through its web UI.
<dpm> Apart from the very polished UI to provide translations, it has other nice features such as message sharing across project series (translate one message in a series and it instantly propagates to all other shared series),
<dpm> global suggestions (suggestions of translations across _all_ projects in Launchpad), automatic imports of translations and automatic commits to bzr branches, several levels of permissions, and a huge translator base.
<dpm> On the right hand side of the URL I gave you you can see that there are quite a lot of projects using Launchpad to make translations easy both for developers and translators.
<dpm> Ok, enough theory, let's have a go at using quickly to create your first internationalized application
<dpm> You can install Quickly on Karmic or Lucid simply by executing 'sudo apt-get install quickly'
<dpm> or if you are brave, you can try the trunk version (bzr branch lp:quickly)
<dpm> let's focus on the stable version, though
<dpm> [SLIDE 3]
<dpm> You should see an overview of quickly here
<dpm> Quickly has two parts: the core, which basically parses your input and templates.
<dpm> Templates are sets of commands and code generators that are designed to work together in an end to end fashion to help developers write a certain kind of application.
<dpm> with templates, you can then create application or document set.
<dpm> We'll focus there only on i18n with the first template that Quickly 0.2 provides: ubuntu-project (renamed ubuntu-application on the coming 0.4 release!)
<dpm> (this template is using Glade, couchdb, has some nice trick for gedit, use bzr, and complete integration with LaunchPad and debian packaging)
<dpm> For instance, Lernid that some of you may be using, was created with the ubuntu-project template. (http://www.jonobacon.org/?p=2258 for a shot of the story)
<dpm> [SLIDE 4]
<dpm> So, let's create first a simple ubuntu-project (assuming you are using Quickly 0.2, the stable version):
<dpm> You can run this:
<dpm>     quickly create ubuntu-project fooby
<dpm> this tells Quickly to use the ubuntu-project template, and to call what is created "fooby"
<dpm> This causes a bunch of info to be dumped to the command line, but ends with the application being run
<dpm> What Quickly did was to copy over basically a sample application, and do some text switcheroos to customize the app
<dpm> You can see there the ui which contains some text that needs translation.
<dpm> To start making change to your app, cd to it (normally,
<dpm>     cd fooby
<dpm> You can then edit your code with $ quickly edit, change the UI with $ quickly glade, and try your changes with $ quickly run
<dpm> You can save your change with $ quickly save
<dpm> changes
<dpm> Finally, to package, share, release your apps so that other will be, with the following commands (not all are necessary): $ quickly package / $ quickly share / $ quickly release
<dpm> I won't cover in any more detail Quickly or the ubuntu-project template here (quickly help <command> does this for you),
<dpm> you can find more info at: https://wiki.ubuntu.com/MeetingLogs/devweek0909/QuicklyFun
<dpm> Let's see what you can do in "quickly edit" and "quickly glade": adding internalization support to your app
<dpm> As the project stands now, it has the infrastructure for internationalization in place, but we have to initialize it to enable it.
<dpm> This will include:
<dpm>  * Initializing gettext
<dpm>  * Marking strings for translation
<dpm>  * Updating the translation template
<dpm> [SLIDE 5]
<dpm> First of all, we'll initialize gettext, which will basically be adding four lines of code. Here's how it goes:
<dpm>     quickly edit
<dpm> This will open all your project files in a text editor (Gedit by default)
<dpm> 1. Go to the fooby file and add the following two lines below 'import gtk', near the top of the file:
<dpm>     import gettext
<dpm>     import locale
<dpm> This will import the required modules for internationalization
<dpm> 2. Still on the fooby file, add the following line below the 'import logging, optparse' one, near the end of the file:
<dpm>     gettext.install('fooby', unicode=True)
<dpm> This will install the _() function to mark (and call) translations as such in Python's builtins namespace, based on the 'fooby' domain. The domain basically tells gettext where to load translations from.
<dpm> This will also save you to include 'import gettext' statements in all of your project files using gettext. This will do for your first application
<dpm> Refer to the gettext documentation to find out more about translation domains.
<dpm> 3. Finally, add the following line to 'fooby', before the 'builder = gtk.Builder()' line
<dpm>     locale.textdomain('fooby')
<dpm> This will tell GtkBuilder about the translation domain as well
<dpm> So that was it! Let's move on to marking strings for translation:
<dpm> First of all we'll tackle the .destop file
<dpm> Open the fooby.desktop.in file and prepend the Name and comment fields with an underscore (_), so they look like:
<dpm>     _Name=Fooby
<dpm>     _Comment=Fooby application
<dpm> This will tell intltool that this strings contain translations
<dpm> Next comes the UI. Let's see how you can mark strings in the UI for translation. Try:
<dpm>     quickly glade
<dpm> This will open your UI files in the glade editor.
<dpm> Once opened, click on the "Your application has been created! ..." label, find it in the General > Label field on the right, click on the ellipsis (the three dots) button and...
<dpm> amaze at the fact that it has already been marked as "Translatable", so you won't have to do anything.
<dpm> Right, so next comes something very important that you'll have to bear in mind for all strings you'd like to be translatable in your application:
<dpm>  * using the _() function call.
<dpm> This will mark them as translatable and call gettext to load the translations, and should be used for all messages you'd like to present to users.
<dpm> Let's just see how we can do this.
<dpm> Go back to your fooby file and find the "parser.add_option("-v", "--verbose", action="store_true", dest="verbose", help="Show debug messages")" line near the bottom.
<dpm> We want the "Show debug messages" message to get shown to users in their language, so we'll enclose it with the _() function, and it will look like:
<dpm>     parser.add_option("-v", "--verbose", action="store_true", dest="verbose", help=_("Show debug messages"))
<dpm> Now we're done
<dpm> The last part will be to update the translations template.
<dpm> A translations template is a formatted text file generally named yourproject.pot
<dpm> which contains your project's translatable strings in English and is what translators use as a basis for their translations.
<dpm> You should do this at least before each release, so that translations are put in this template and are up-to-date for translators to work on.
<dpm> It is considered good practice to announce a string freeze (that is, the period in which strings are considered to be stable) a week or two before the release, so that translators know when they can start their work.
<dpm> This can be done in several ways with quickly, let's pick one:
<dpm>     quickly package
<dpm> After running this, you'll notice that (apart from having your application packaged!) there is a 'po' folder containing the translation template, ready for translators to work on.
<dpm> If you open it, you'll notice the format and will see that all the strings you marked for translation are there.
<dpm> You can also do this with 'quickly share', 'quickly release' or directly using the python-distutils-extra command: './setup.py build_i18n'
<dpm> == Launchpad Translations ==
<dpm> If this weren't awesome enough, once you've created a project in Launchpad ('quickly share', 'quickly release' or https://help.launchpad.net/ will help you on that) you can expose it for the world to translate
<dpm> so that you as a developer can use the automatic bzr import/export features to basically "forget" about translations and translators can use the web UI to translate.
<dpm> Let me tell you a bit more on those:
<dpm> [SLIDE 6]
<dpm> == Automatic imports ==
<dpm> Enabling this feature will allow you to automatically import the translation template for your application into Launchpad upon commit, with no further steps required.
<dpm> So the basic workflow will be: hack, hack, hack, update template, commit, have translators automagically see the new strings in Launchpad.
<dpm> You can find more about this at http://blog.launchpad.net/translations/import-translation-templates-from-your-projects-bazaar-branches and http://blog.launchpad.net/general/trying-out-launchpad-translations
<dpm> or at http://blog.launchpad.net/translations/screencast-importing-translation-templates-from-a-bazaar-branch
<dpm> == Automatic exports ==
<dpm> With automatic exports, you'll be able to complete the whole circle for automation: getting translations committed automatically (daily) to a bzr branch of your choice, so that neither you nor translators have to worry to get translations into your project.
<dpm> I personally find this one of the most coolest features
<dpm> Here's more info: http://blog.launchpad.net/general/exporting-translations-to-a-bazaar-branch
<dpm> And here's a screencast on how to enable it http://blog.launchpad.net/translations/screencast-exporting-translations-to-a-bazaar-branch
<dpm> == Permissions ==
<dpm> One very important aspect is how you want translations permissions for your project to be. This basically means choosing who will be responsible for submitting and reviewing those
<dpm> translations for each language.
<dpm> Launchpad is flexible in allowing different levels of openness for translating your project.
<dpm> This generally means that you as a maintainer will have to make a decision to balance openness (open translations for everyone) with quality control (a more closed process with reviewers and a QA workflow).
<dpm> The Launchpad help page on permissions at https://help.launchpad.net/Translations/YourProject/PermissionPolicies explains very well the different permissions you can use (Open, Structured, Restricted and Closed).
<dpm> If you decide for quality, you'll next have to choose to whom you assign the translation of your project.
<dpm> Here is where translation groups come to the rescue.
<dpm> Translation groups are confederations of translation teams, one for each language you can assign as a pack to translate your project.
<dpm> The teams in those groups are considered to be trusted to have experience with translations and generally have a review process in place.
<dpm> Here's a list of all current translation groups: https://translations.launchpad.net/+groups
<dpm> You can see that the two biggest ones are Launchpad Translators and Ubuntu Translators.
<dpm> While you can create a translation group specific to your project, we generally encourage maintainers to choose one of the existing ones,
<dpm> in order to reuse the pool of translators and not to further fragment translations communities.
<dpm> I personally recommend choosing Restricted (or Structured), assigned to the trusted Launchpad Translators or Ubuntu Translators (if your project is Ubuntu-specific) translations groups
<dpm> [SLIDE 7]
<dpm> I'll rapidly go through quickly's incoming features and then we can do some Q&A
<dpm> Quickly 0.4 will bring a lot of new experiences and commodities to the users (more than 200 commits, 6 months of hard work!) and will be delivered in Lucid.
<dpm> Regarding internationalization, all the tedious job of importing/initalizing gettext and adding _() will be done for you in all newly created apps.
<dpm> "$ quickly add pythonfile" will also add one boiler plate file containing that for you.
<dpm> Quickly 0.6 later on will try to achieve the automatic imports and exports previously described on each $ quickly share / $ quickly release command.
<dpm> So, normally, you won't have to bother anymore about localization and being in sync with the awesome work of your contributors
<dpm> just mark strings with _()
<dpm> So that was it!
<dpm> Questions?
<dpm> <gnunezr> QUESTION: How does one get the translation files for each language from the .pot file?
<dpm> That's usually the work of translators
<dpm> when you've committed the .pot file to your bzr branch, and it is exposed in Launchpad with automatic imports
<dpm> translators will see the translatable strings in Launchpad and start doing their work
<dpm> if you've got automatic exports activated, the PO files will be created for you whenever there is a new translation, and committed to your branch of choice
<dpm> So, in short, as a maintainer this will happen automagically for you :)
<dpm> keep them coming :)
<dpm> O I see, gnunerz is asking:
<dpm> QUESTION: I get that... I'm just curious as to how does the manual process goes :)
<dpm> if you were not using Launchpad, you'd announce that there is a new POT file available, and translators would fetch it, create a PO file containing the translation for their language, and would send it back to you
<dpm> The same process: translators always take care of translations, but with a bit more manual work for all people involved
<dpm> So, in shourt, I'd recommend using Launchpad and automatic import/export
<dpm> <alucardni> QUESTION: It is possible to define which languages I want my app be translated to?
<dpm> No, in general you want your application to be available in as many languages as possible, and Launchpad allows translating in almost any language
<dpm> You might be able to limit which translations are build in your project's build infrastructure
<dpm> But you'll have to explicitly set it up to use just some of the translations
<dpm> <gnunezr> QUESTION: Does this process also take care of locale stuff, like how is the date presented to the users?
<dpm> in general, yes
<dpm> but we'd need another session to go into the details :)
<dpm> basically, the app must set up the locale settings right on initialization
* ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - http://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Event: Ubuntu Opportunistic Developer Week - Current Session: Learning through examples with Acire and Python-Snippets - Jono Bac - Instructor: jono || Questions in #ubuntu-classroom-chat
<jono> :)
<jono> alrighty
<jono> thanks dpm
<jono> isn't that man such a freaking rock star?!
<jono> everyone needs to give him a hug in #ubuntu-classroom-chat :)
 * jono hugs dpm
<jono> hi everyone and welcome to the python snippets session at Ubuntu Opportunistic Developer Week!
<jono> how are we all doing today?
<jono> the focus of this session is some work I have been doing recently around building a library of python snippets and (a) how this library can be useful for you as an opportunistic developer, but also (b) how you contribute to it to make it an even better resource!
<jono> so, let's get started
<jono> I have always been the kind of person who learns via examples
<jono> when I started learning the guitar, I learned by watching other guitarists play, and when I started learning Python and how to build apps on Ubuntu, I have always learned by hunting out little source code examples that do what I need to do and then learning from them and merging them into my programs
<jono> the problem is that these snippets were scattered all over the Internet and sometimes pretty hard to find
<jono> my dream was to have a program that would bring these snippets together into a library so that I could select them, run them and learn from them
<jono> well, on a flight home from England at Christmas, armed with those small bags of peanuts and a few gin and tonics, I decided to write this little program and it is called Acire, named after my wife's name backwards (Erica)
<jono> Acire is a really simple program that provides an interface to this library of snippets
<jono> let's look at how it works
<jono> check out http://farm5.static.flickr.com/4045/4406908674_2934c4d5c0_o.jpg
<jono> this is a screenshot of the main Acire interface
<jono> in the top-left part of the window there is a drop-down combo box that lists a series of categories of different snippets
<jono> when you select a category, the list of snippets that are in that category are listed below
<jono> in the screenshot you can see the list of snippets that are in the Python Core category: that is, snippets that demonstrate features in the main Python language
<jono> to see a snippet you just click on it and it appears in the code view to the right, all nicely syntax highlighted so you can read it easily :-)
<jono> running the snippet is simple, just click on the Execute button
<jono> <LakomLacen33> how come i don't have python core in my acire ?
<jono> we had a few out of date python-snippets packages - you might have an old package
<jono> embedded in the window is a little terminal view: this is important for snippets that don't have a GUI (such as the Python Core snippets) - if you select a GUI snippet the window will appear when you click the Execute button
<jono> running the snippet gives you a good chance to play with it and see how it works and then take a look at the snippet code in the window
<jono> another feature is that you can edit the snippet code and when you hit Execute it will run your modified program too: this makes it really easy to play with the snippet inside Acire itself - you can then click the Save As button and save the code somewhere else if you like
<jono> we already have a bunch of snippets in Acire: 104 right now (as you can see in the status bar)
<jono> here is the current list of categories
<jono> http://farm5.static.flickr.com/4050/4406908744_d75cbac80f_o.jpg
<jono> if you are curious what my wallpaper is, it is the most awesome duck ever - http://www.flickr.com/photos/w9ned/3563985252/sizes/l/in/pool-1058695 :-)
<jono> anyway, back to the screenshot: http://farm5.static.flickr.com/4050/4406908744_d75cbac80f_o.jpg
<jono> as you can see, it is pretty cool: it provides a really nice resource for looking at a bunch of python examples and it helps you to learn quickly and easily and solve problems right away
<jono> let me now explain how to get it
<jono> I have deliberately split the actual python snippets from the graphical interface - this was because many people may want to produce viewers for the snippets (e.g. a KDE version, a web interface etc) so I did not want to depend on the GUI
<jono> as such, we have two projects:
<jono> acire - the graphical interface to the snippets available at http://www.launchpad.net/acire
<jono> python-snippets - the library of snippets available at http://www.launchpad.net/python-snippets
<jono> the first thing we want to grab are the snippets
<jono> part of my goal here is to make sure that the library of snippets is regularly updated as more snippets are made available
<jono> <nvsbl> how can i get the latest version of acire?
<jono> I will explain in just a moment :)
<jono> fortunately, we have an awesome technology for doing this - Personal Package Archives (PPA) - a place in which you can subscribe to a package and you get regular updates
<jono> <sam90> is acire going to be available in Lucid?
<jono> it runs on Lucid now :)
<jono> so, we have a PPA that generates a daily package of the latest python-snippets library
<jono> ryanprior, nope, what was it?
<jono>  QUESTION: can we add snippets in languages other than Python?
<jono> no, Acire and python-snippets is focused on Python
<jono> although I would love to see other languages have a similar project :)
<jono> so, we have a PPA that generates a daily package of the latest python-snippets library
<jono> adding the PPA is simple, just click Applications -> Accessories -> Terminal and add these commands:
<jono> sudo add-apt-repository ppa:python-snippets-drivers/python-snippets-daily
<jono> sudo apt-get update
<jono> sudo apt-get install python-snippets
<jono> this will add the snippets to /usr/share/python-snippets
<jono> you now need to install Acire to view them
<jono> we also have a PPA for this too
<jono> I recently kicked out a new release, but I haven't had a chance to provide a Karmic package yet, so the new release is just in Lucid right now - the PPA still has the older release though, so this still works
<jono> just follow these steps:
<jono> click Applications -> Accessories -> Terminal (or use the Terminal in Lernid!) and add these commands:
<jono> sudo add-apt-repository ppa:acire-team/acire-releases
<jono> sudo apt-get update
<jono> sudo apt-get install acire
<jono> all of the instructions for doing this are on https://wiki.ubuntu.com/PythonSnippets
<jono> ok, so let's now get to the question about running the latest bleeding edge Acire
<jono> some of you may want to grab the latest code for Acire and run it - this is also really simple, just follow these commands:
<jono> click Applications -> Accessories -> Terminal (or use the Terminal in Lernid!) and add these commands:
<jono> first install all the packages requires to run it:
<jono> sudo apt-get install bzr python-desktopcouch-records python-gconf python-gtk2 python-gtksourceview2 python-vte quickly
<jono> this will grab everything you need
<jono> it may take a little while to grab everything, but not too long :)
<jono> <evrick> :'( no amd64
<jono> yeah, but the 32-bit version should run I imagine
<jono> or you can follow these instructions
<jono> ok
<jono> first install all the packages requires to run it:
<jono> sudo apt-get install bzr python-desktopcouch-records python-gconf python-gtk2 python-gtksourceview2 python-vte quickly
<jono> next, let's grab the code
<jono> again, this is really simple thanks our pal, bzr:
<jono> just type in:
<jono> bzr branch lp:acire
<jono> this will grab the latest acire code from Launchpad
<jono> when it has got the code, now enter the directory:
<jono> cd acire
<jono> and then run it:
<jono> quickly run
<jono> <alucardni> A few broken dependencies in Karmic :(
<jono> yeah we had a few issues with dependencies, but you can solve them by making sure you run this line:
<jono> sudo apt-get install bzr python-desktopcouch-records python-gconf python-gtk2 python-gtksourceview2 python-vte quickly
<jono> that will get everything you need
<jono> and you obviously need to ensure the python-snippets PPA is installed, as I described above
<jono> :)
<jono> this will then get you up and running :)
<jono> awesome to see you folks getting it up and running :)
<jono> now, today is an exciting day as we are really keen to encourage you folks to join us in making a bunch of python snippets today to add to the library
<jono> this resource is only as useful as the snippets inside it, so I am really keen to crowdsource this and have any many people as possible join in and contribute snippets
<jono> right now we have 104 snippets
<jono> my dream for today is that we hit the 150 mark :)
<jono> you folks interested in helping?
<jono> interesting in helping to make this rock?
<jono> :)
<jono> we welcome snippets on *any* python module
<jono> so if you can do *something* in python, you could write a snippet
<jono> whether it is as simple as doing something to a list or using a module such as feedparser
<jono> <ryanprior> QUESTION: should snippets for a given package (like PyGTK for example) live in python-snippets, or in pythin-gtk2-doc, or where?
<jono> great question ryanprior
<jono> let me explain how the snippets are organized
<jono> ok
<jono> take a look at http://bazaar.launchpad.net/~jonobacon/python-snippets/trunk/files
<jono> this is a list of the content in the main python-snippets archive right now
<jono> as you can see, there are a bunch of directories
<jono> each directory refers to a particular python module
<jono> as an example, the gstreamer dir has snippets that use the GStreamer multimedia framework
<jono> <ryanprior> This seems like a great opportunity for upstream involvement. We can help people with their documentation.
<jono> exactly! :)
<jono> inside each dir lives the snippets
<jono> so if we click on the gwibber dir:
<jono> http://bazaar.launchpad.net/~jonobacon/python-snippets/trunk/files/head:/gwibber/
<jono> there is one snippet
<jono> gwibber is a python module that ships in Lucid that allows you to microblog right from your app
<jono> so the snippet we have is sendmessage.py
<jono> you can see it at http://bazaar.launchpad.net/~jonobacon/python-snippets/trunk/annotate/head:/gwibber/sendmessage.py
<jono> and that explains how in just a few lines of Python you can tweet, dent, Facebook etc
<jono> so in a nutshell the library of snippets is in /usr/share/python-snippets and in there are subdirs, each of which refers to a python module, and the snippets about that module live in there
<jono> so let me explain how a snippet is mad
<jono> made
<jono> a snippet is just a piece of code that demonstrates something
<jono> but what allows us to categorize and show it in Acire are some comments at the top
<jono> let's use http://bazaar.launchpad.net/~jonobacon/python-snippets/trunk/annotate/head:/gwibber/sendmessage.py as an examoke
<jono> example
<jono> the comments with 'SNIPPET' in them are what Acire uses for index and show them
<jono> here are the different lines:
<jono> [SNIPPET_NAME: Send a message]
<jono> this is the text that appears in the sidebar when you have select a snippet category
<jono> a short, sharp description of the snippet
<jono> [SNIPPET_CATEGORIES: Gwibber]
<jono> this is a tag for the snippet
<jono> this is the category that appears in the drop-down box
<jono> snippets can have multiple categories separated by commas if needed
<jono> we have a main list of categories in the CATEGORIES file in the main /usr/share/python-snippets dir
<jono> [SNIPPET_DESCRIPTION: Send a message using the Gwibber API]
<jono> this is the description that appears under the code - a longer description of what the snippet does
<jono> [SNIPPET_AUTHOR: Jono Bacon <jono@ubuntu.com>]
<jono> this is who wrote it with their email address
<jono> [SNIPPET_LICENSE: GPL]
<jono> and this is the license
<jono> again, a standard set of licenses are in the LICENSES file in /usr/share/python-snippets
<jono> I am happy to accept snippets into the library so long as they use a recognized free software license
<jono> so created a snippet is simple:
<jono>  1. pick which dir it should be in (or create a new one if your snippet is the first for a given python module)
<jono>  2. write the snippet
<jono>  3. include these comments at the top
<jono>  4. submit it :)
<jono> submitting a snippet is explained on https://wiki.ubuntu.com/PythonSnippets
<jono> so today we are having a snippets part
<jono> party
<jono> this is a session in #ubuntu-app-devel where I am encouraging folks to submit snippets for inclusion :)
<jono> so this is a great opportunity to join and get involved and share your knowledge
<jono> the snippets party takes place at 9pm UTC
<jono> and will go on for a few hours, so do come along and join us - it is really cool seeing a snippet that you made show up in the library for everyone to learn from
<jono> do you folks want me to explain how you contribute a snippet?
<jono> ok cool :)
<jono> so first run:
<jono> bzr branch lp:python-snippets
<jono> this will grab the python-snippets library
<jono> now go in and add your snippet
<jono> you can add it to an existing directory in there if the snippet is about one of those topics
<jono> or feel free to create a new dir for a python module that is not covered in the library yet
<jono> when you create your snippet make sure you have the comments at the top of the file
<jono> e.g:
<jono> # [SNIPPET_NAME: Playing a Pipeline]
<jono> # [SNIPPET_CATEGORIES: GStreamer]
<jono> # [SNIPPET_DESCRIPTION: Construct and play a pipeline]
<jono> # [SNIPPET_AUTHOR: Jono Bacon <jono@ubuntu.com>]
<jono> # [SNIPPET_LICENSE: GPL]
<jono> <raven_99> i'm seriously learning a lot this week. contributing as a developer actually seems possible now.
<jono> that is awesome! :D
<jono> when you have added your snippet, add it to the local library with:
<jono> bzr add your-snippet.py
<jono> obviously replace your-snippet.py with the filename for your snippet
<jono> now commit your changes:
<jono> bzr commit
<jono> when you run the above command you can enter a short message about what your snippet does
<jono> now you need to upload the snippet to Launchpad:
<jono> bzr push lp:~<your launchpad username>/python-snippets/<name of your branch>
<jono> so an example if I was to upload this I might use the following command:
<jono> bzr push lp:~jonobacon/python-snippets/new-gstreamer-snippet
<jono> finally,  go to https://code.launchpad.net/python-snippets and you should see your branch listed there. Click on it and when the branch page information page loads click on the Propose for merging link. Add a short description of what you examples do in the Initial Comment box and then click the Propose Merge button.
<jono> <titeuf_87> QUESTION: is it possible to run acire and make it look in that directory for snippets instead of the default one?
<jono> right now, no, but I am adding a feature to do that
<jono> what you can do is set up a symbolic link from /usr/share/python-snippets to wherever you checked out the python-snippets code
<jono> <alucardni> QUESTION: Can we use Ground Control to submit a new snippet?
<jono> absolutely!
<jono> so what I recommend you folks do is check out the python-snippets library, add a snippet and submit it and I can test if it works in Acire
<jono> meanwhile I will get as feature into Acire to point it at another directory so it is easier to test it
<jono> so we have our snippets party at 9pm UTC, that is two hours away - I recommend you all come along to #ubuntu-app-devel and join us and I can help you get started writing snippets :)
<jono> any more questions?
<jono> <evrick> How about adding snippets as design patterns or algorithms?
<jono> absolutely! we have a Patterns dir for design patterns
<jono> I would love an algorithms dir too
<jono> I am keen to ensure that *all* python snippets are welcome
<jono> if they run and they explain how to do something, I will make sure we add it :)
<jono> any more questions?
<jono> <ryanprior> QUESTION: if I run a snippet in Acire and it crashes, does that bring Acire down too?
<jono> usually no
<jono> if it does crash Acire, that is a bug and we need to fix it :)
<jono> <lsteeger> QUESTION: As Acire grows, how about adding some Search/Sort functions?
<jono> I am really keen to add that too
<jono> if someone wants to write a patch for this, do go ahead
<jono> I think Acire needs a search facility and a find facility for search snippets
<jono> <jgbel> QUESTION: how do contributors handle python versioning idiosyncacies (e.g., 2.5 functions versus 3.x)?
<jono> snippets that need to care about Python versions typically do a test in the code
<jono> there are a few snippets that have examples of this
<jono> awesome
<jono> I think we are done
<jono> thanks everyone for joining me here!
<jono> and I hope to see you all in #ubuntu-app-devel in two hours for the snippets party!
<jono> rockstar, all good?
* ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - http://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Event: Ubuntu Opportunistic Developer Week - Current Session: Write Beautiful Code (and Maintain it Beautifully) - rockstar - Instructor: rockstar || Questions in #ubuntu-classroom-chat
<rockstar> jono, starting now?
<rockstar> jono, starting now?
<jono> yep :)
<rockstar> Hi folks.  Apologies in advance for the Lernid users, but I'm not really a slide guy, so you'll just have to follow along.
<rockstar> So, dholbach asked me if I'd be willing to talk about writing beautiful code.
<rockstar> That puts me in a hard spot, since sometimes I write code that fell out of the ugly tree and hit every branch on the way dawn.
<rockstar> As I thought about it though, beautiful code is a process.  It's iterative, and the things you find beautiful now will (probably) be ugly to you in a year.
<rockstar> So I began thinking about that process - this is what I'd like to chat about today.
<rockstar> Since this is opportunistic developer week, I want to make this a story about opportunities.
<rockstar> The scenario I'd like to start with is this:
<rockstar> "You've been using Ubuntu and you're feeling very comfortable.  You're in an IRC channel when someone says 'It would be nice if I had an app that would...'"
<rockstar> Uh oh.  There's not an app for that.
<rockstar> But guess what?  You're an opportunistic developer!  This is an opportunity!
<rockstar> QUESTION: <JayFo> will you be going over some tips for making ugly code better? :)
<rockstar> ANSWER: Yes, as I said, making ugly code better is a process.  The process is the core of this talk.
<rockstar> So, we're going to start a new project.  In this scenario, staying away from ugly code is easy, since there's no ugly code to begin with.
<rockstar> When you start a new project, you should get a few things together.  First, you need some version control system (Renaming files to .bak doesn't count)
<rockstar> You also should have an issue tracker, even if you haven't even released your code.  This may be as simple as a TODO file.
<rockstar> Luckily, we have Launchpad.  Those Launchpad developers are awesome.  They do awesome things.
<rockstar> You'll also want a style guide.
<rockstar> Programmers have stolen the idea of a style guide from writers and journalists.  A style guide allows you to set some social contracts in how your code is structured.
<rockstar> This is a must.  If you don't have this right now in your project, your homework is to go out and establish one.
<rockstar> Everyone has different tendencies in their code, so code can get messy as soon as more than one person touches it.
<rockstar> QUESTION: <ylynfatt> I assume when you say style guide you mean the same thing as "coding standards"?
<rockstar> Yes, same idea.  You should have common idioms.
<rockstar> Document this well.  It makes life much better when contributors come aboard.
<rockstar> QUESTION: <JayFo> QUESTION: are there any good sample style guides to start with?
<rockstar> Python (my favoritest most bestedest language) has a language-wide style guide.
<rockstar> It's called PEP 8.
<rockstar> http://www.python.org/dev/peps/pep-0008/
<rockstar> Basically, it addresses where to put comments, how to name variables/classes/"constants"/functions/etc
<rockstar> \sh kindly points out https://dev.launchpad.net/StyleGuides
<rockstar> So, on the Launchpad team, there is a style guide that supplements PEP 8, and then we have a style guide for our javascript, etc.
<rockstar> I don't personally like some of the standard styles in the Launchpad team.  If I wanted, I could violate those styles, but then no one would approve the code review, and I'd never get anything done.
<rockstar> The "social contract" basically allows us all to come to the table with the same expectations for the quality of code.  That's what the style guide gives us.
<rockstar> <somename> QUESTION: Kinda offtopic but is there a reason why space indentation is preferred to tab indentation in PEP 8?
<rockstar> somename, the BDFL of Python has spoken.
<rockstar> That question is actually quite on-topic.  Sometimes there's no other reason to have the rule than to just have a standard rule.  You can't have both, so there as a choice made.
<rockstar> So put together your style guides.  They won't be set in stone.  In fact, they'll be quite fluid.
<rockstar> The Launchpad team meets once a week to evaluate if style changes are needed.
<rockstar> Just yesterday I proposed a change in style and everyone agreed.
<rockstar> QUESTION: <theDtTvB2`MB> When there is a small bug that needs to be fixed real quick, I violate all the style guides and fix it as fast as I can. Does anybody have the same problem as me?
<rockstar> I guess I don't know the specific situation, and sometimes you need to do some hacky things to get bugs fixed.  Your style guide shouldn't get in the way of your work.
<rockstar> However, when you violate the guide, you're automatically making your code harder to read for others.
<rockstar> This actually brings me to my next point (thanks for the easy segway).
<rockstar> In whatever language you're working with, the code you write is not for the computer.
<rockstar> The computer is going to take that code, translate it into something it understands, and then run it.
<rockstar> The code you write is for humans like you and me.
<rockstar> Remember that when you're writing the code.  Keep it in mind.  Read your code out loud.
<rockstar> C-code, for me, is especially difficult to read aloud, but it helps me to see where something doesn't make sense.
<rockstar> Since most documentation standards target US or UK English, your code should kinda make sense that way as well.
<rockstar> Sometimes (as in the case of asychronous code) you won't be able to write your code left-to-right/top-to-bottom
<rockstar> Use comments in those cases.
<rockstar> Alright.  We have about 20 minutes left.  In about 10, I'd like to take and review some "ugly code" that some of you would like to submit.  Please pastebin your examples of "ugly code" and then post them in the chat
<rockstar> Okay.  So let's look at another situation, one that is more common, and will probably help you to be better when you actually start projects.
<rockstar> You're in IRC, and someone says "<App> is really cool, but it has a problem with <feature-x>"
<rockstar> Opportunity awaits!
<rockstar> Often, this is where I see "ugly" code, because it's not my code, and it's not in a style I understand immediately.
<rockstar> If the project has a style guide, read it before sleuthing to fix the problem.
<rockstar> If it doesn't, Thor help you.  :)
<rockstar> After you're comfortable with reading the app's code (whether by style guide or fumbling around), find the code you want to work in.
<rockstar> As you write your feature, explore the idea of writing a test for that feature.
<rockstar> Many languages have great test frameworks that you can use.
<rockstar> Testing helps you to avoid embarrassment when (not if) your feature breaks.
<rockstar> Make sure, as you write your patch, that you're sticking with common coding conventions.
<rockstar> When I say "common" I mean "common the surrounding source code" - Make the code consistent.
<rockstar> Once you have your patch (and hopefully test), you're ready to show someone your code.
<rockstar> This step is the most important.
<rockstar> You're more likely to write ugly code when no one has to see it, and when you don't have to justify why it's ugly.
<rockstar> I had a friend who worked as an intern on a proprietary mobile phone platform that said "You would hate this source.  It's terrible, because no one has to see it."
<rockstar> Okay, so we submit our code for review.
<rockstar> Does anyone want to pastebin their ugly code?
<rockstar> QUESTION: <tgalati4> Question first:  Are there any Python style (say PEP 8) checkers?
<rockstar> Yes.  On Launchpad, we use pylint (slow, annoying) and pyflakes (doesn't handle exceptions to the rule well)
<rockstar> For javascript (my second favoritest language) jslint is what I use.
<rockstar> Let's look at the "ugly code" here: http://pastebin.com/1jWRpKCG
<rockstar> Thanks to theDtTvB2`MB for putting himself out there.  That's good.
<rockstar> Okay, so this javascript code.
<rockstar> Javascript is notorious for being a wild west "every man for himself" language.  It's easy to write messy code, it's easy to write code that leaks memory.
<rockstar> So as a reviewer, I'm first going to ask what "r" on line 4 is.
<rockstar> "r" doesn't tell me anything about the variable, what it contains, or what it's used for.
<rockstar> Neither does "c" or "is_DM"
<rockstar> That makes this code hard to follow.
<rockstar> I also don't have very many comments.
<rockstar> Line 53 is actually succinct and rather helpful.
<rockstar> Basically, are we starting with the first item in the index?
<rockstar> I also am not entirely clear on what the function returns.  It returns a few different things, depending on specific conditions.  A comment at the top of the function would go miles in helping understand what's going on.
<rockstar> I rather like jsdoc, and having been using it in my javascript gaming engine I've been working on.
<rockstar> By documenting, you help other young developers to start off knowing what the function is doing, and then they can use that context as they read the code.
<rockstar> <theDtTvB2`MB> And now I starting to forget what some of these line do.
<rockstar> theDtTvB2`MB, this is why we strive to write beautiful code.
<rockstar> :)
<rockstar> Any other questions?
<rockstar> Let me point out a potential opportunity here: <tgalati4> Does Lernid have a search feature in the Session window?  That would help to jump to code.
<rockstar> QUESTION: <theDtTvB2`MB> Does it need a rewrite?
<rockstar> So, rewrites can be scary, especially when you don't have tests (and sometimes even when you do).
<rockstar> Usually, when I get into code I wrote that I have forgotten about, I will take some time to sleuth the code, remind myself, and then document the code, and sometimes make slight changes (variable names, etc.)
<rockstar> Sometimes code is unsalvagable, and you'll have to re-write it, but just be careful there.  You don't want to be KDE 4.0, do you?  :)
<rockstar> <evrick> QUESTION: when does it makes sense to make code more generic (useful in many places). Or to make an abstraction to it?
<rockstar> I would say that you should NEVER repeat code.  Never, ever, ever, never, ever.
<rockstar> Sometimes, abstractions are harder to understand, so you'll have to "glue" that with good comments.
<rockstar> QUESTION: <tgalati4> So can I find good examples of python coding style by doing:  grep python /usr/bin/* ?
<rockstar> So, I'm not sure what that would give you.
<rockstar> Bazaar's source code is awesome for seeing good coding standards as well as ways to make python perform better.
<rockstar> They have some potentially difficult and crazy code that is commented with things like "we have to do this now, or the function won't return fast enough" and things like that.
<rockstar> Any more questions?
* ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - http://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Event: Ubuntu Opportunistic Developer Week - Current Session: Speed your development with quickly.widgets - Rick Spencer - Instructor: rickspencer3 || Questions in #ubuntu-classroom-chat
<rockstar> Thanks folks!
<rickspencer3> hi all
<rickspencer3> shall we dive into quickly-widgets?
<rickspencer3> or maybe you need some time to recover from that stellar class by rockstar
<rickspencer3> ok, I guess I'll get started
<rickspencer3> ok
<rickspencer3> my code is ugly
<rickspencer3> but functional ;)
<rickspencer3> as usual I put my class notes on the wiki
<rickspencer3> https://wiki.ubuntu.com/UbuntuOpportunisticDeveloperWeek/Quidgets
<rickspencer3> so, quickly-widgets started as a personal side project of mine
<rickspencer3> and it got totally out of control
<rickspencer3> at some point I discovered it was writing itself at night
<rickspencer3> the goal of quickly widgets is to make PyGtk programming more easy and fun
<rickspencer3> PyGtk is a fantastic UI tool kit
<rickspencer3> It is very powerful, functional, and flexible
<rickspencer3> However, at the moment, it lacks some higher order abstractions that developers have come to expect
<rickspencer3> The result being that developers have to write reams of code using multiple classes and such for things that are more simple in other frameworks
<rickspencer3> for example, popping dialogs, putting data into a grid and such
<rickspencer3> so I'm hoping quickly-widgets can fill in some of these use cases
<rickspencer3> please note that quickly-widgets is very early in development and experimental
<rickspencer3> this means that it is to be buggy and incomplete
<rickspencer3> or at least I strongly suspect that it is
<rickspencer3> but it also means that if you want to, you can have a lot of influence on how it develops
<rickspencer3> so bug reports and branches, more than welcome
<rickspencer3> btw
<rickspencer3> so what is Quidgets?
<rickspencer3> "Quidgets" is the original name of quickly-widgets
<rickspencer3> it was a silly name
<rickspencer3> I made it up without really thinking
<rickspencer3> the project is still called Quidgets
<rickspencer3> so you can get the code:
<rickspencer3> $bzr branch lp:quidgets
<rickspencer3> quickly-widgets is currently in universe for Lucid
<rickspencer3> (this scares me a bit, but what the heck ;) )
<rickspencer3> it is not packaged for Karmic
<rickspencer3> though if someone wanted to do that, I would not complain too much ;)
<rickspencer3> currently, quickly widgets has two modules
<rickspencer3> quickly.prompts
<rickspencer3> and quickly.widgets
<rickspencer3> quickly.widgets has some general widgets
<rickspencer3> but also some widgets for displaying data, basically extending TreeView and making it simpler to use
<rickspencer3> I'll discuss each of these three areas in a bit more depth
<rickspencer3> But first, Questions?
<ClassBot> oskude asked: does quickly-widgets work with or without glade (the editor) ?
<rickspencer3> currently there is no glade integration
<rickspencer3> I don't think it would be too hard to add this, but it hasn't been tackled yet
<rickspencer3> I think to do this would require crafting a library file in XML
<rickspencer3> but then also making sure the properties were properly setable in the glade propery editor
<rickspencer3> Before we look at the modules, a word on the mental model of using quickly-widgets
<rickspencer3> There are 3 "levels" to consuming quickly-widgets
<rickspencer3> Most of the time, you should be fine with the first level, which is the "Use" level
<rickspencer3> At this level, you just make a one-liner that uses the API and does something useful
<rickspencer3> like, get as string from the user:
<rickspencer3> quickly.prompts.string("My Title","Give me a string","default val")
<rickspencer3> or maybe you want do display the data in a dictionary:
<rickspencer3> dg = DictionaryGrid(my_list_of_dicts)
<rickspencer3> dg.show()
<rickspencer3> see, you just go ahead and "use" the classes
<rickspencer3> sometimes you want to tweak something a bit. In these cases you go to the configure level.
<rickspencer3> When you are doing "configure" you might end up a using the underlying PyGtk API a bit
<rickspencer3> For example, a dictionary grid is really just a Treeview
<rickspencer3> So if you want to configure the title for a column, you might go
<rickspencer3> dg.get_columns()[0].set_title("New Title")
<rickspencer3> some of the configuration might be done in the quickly.widgets library though
<rickspencer3> like if you want to display certain keys from your dictionary, you can use a list of keys to display
<rickspencer3> keys = ["key1","key2']
<rickspencer3> dg = DictionaryGrid(my_dict,keys=keys)
<rickspencer3> I'll talk about the specifics here a bit later
<rickspencer3> but the point is, you can go beyond the one liner if you need to
<rickspencer3> so if you start with the one liner, but then need to expand out a bit
<rickspencer3> you don't throw away your code, just add some "configure" code
<rickspencer3> let's say you get back a feature request from a user or customer, and you need to do something that is not suppported by quickly-widgets through using or configuring
<rickspencer3> well, quickly-widgets strives to consume PyGtk in such a way that you can extend classes as needed to accomplish your goals
<rickspencer3> for example, if you want a grid that displays data from a certain SQL database somewhere, you can inherit from DictionaryGrid and add the SQL functionality.
<rickspencer3> This is exactly what CouchGrid does, but for generally desktopcouchy things
<rickspencer3> So, before I discuss using the prompts a bit, any questions?
<ClassBot> \sh asked: which audience did you have in mind when you started Quickly?
<rickspencer3> well, fundamentally I was scratching my own itch
<rickspencer3> I was working on bughugger and thought ...
<rickspencer3> "I cannot believe I am writing this same TreeView code *again*"
<rickspencer3> I vowed at that moment to never craft a TreeView again
<rickspencer3> though I don't mind writing code that writes TreeViews ;)
<rickspencer3> beyond me, I am thinking about application writers on Ubuntu
<rickspencer3> so I don't mind making some distro specific assumptions
<rickspencer3> ultimately, I am thinking about folks who, like me, often can visualize and app, and want to get straight to the fun part
<rickspencer3> without bothering with all the boiler plate of a powerful library like Gtk
<rickspencer3> more questions?
<rickspencer3> ok
<rickspencer3> prompts
<rickspencer3> Prompts are basically dialogs that you can use to interact with the user without writing too much code
<rickspencer3> rather than creating a PyGtk dialog or similar yourself, and then populating it, for certain scenarios a prompt in quickly-widgets can take care of it for you
<rickspencer3> the prompts module is right under quickly, so you can get it like this:
<rickspencer3> from quickly import prompts
<rickspencer3> or just quickly.prompts.string() if you want
<rickspencer3> there are three kinds of prompts
<rickspencer3> the first kind just displays info the the user
<rickspencer3> these take a couple of strings from you and display a message box to the user with the appropriate icon
<rickspencer3> so, you can go
<rickspencer3> prompts.error("Title for the Error Dialog","Error text")
<rickspencer3> this will pop up a little dialog that says "Error text"
<rickspencer3> with a dialog error icon next to it
<rickspencer3> there is also prompts.warning and prompts.info
<rickspencer3> they works the same as error
<rickspencer3> The next kind of prompt collects some info from the user
<rickspencer3> the kind of prompts built in of this kind are:
<rickspencer3> string, date, integer, decimal, and price
<rickspencer3> they all take care of displaying an appropriate widget for the user input for you
<rickspencer3> like a textbox for a string, a calendar for a date, and a spinner appropriately formatted if appropriate
<rickspencer3> they let you set a title, a message, a default value, and in the case of the numeric ones some other defaults if you want
<rickspencer3> the functions all return a gtk.RESPONSE and a value
<rickspencer3> make sure you check the response because if the user cancelled, you want to do the right thing
<rickspencer3> so to get a string, go:
<rickspencer3> response, val = quickly.prompts.string()
<rickspencer3> if response == gtk.RESPONSE_OK:
<rickspencer3>  #do something with val
<rickspencer3> where val is a string
<rickspencer3> you can get a date in the same way
<rickspencer3> when dealing with date values are tuples in the form of integers for (year,month,day)
<rickspencer3> where month is zero indexed (Jaunary is 0, December is 11)
<rickspencer3> and you use tuples for the default value in teh same way
<rickspencer3> so:
<rickspencer3> response, date = quickly.widgets.date("Title String","Enter your birthday",(1968,03,22))
<rickspencer3> so that's *April* because the months are zero indexed
<rickspencer3> if you want to get an integer, you can set min_value, and max_value as well
<rickspencer3> if you look at the doc string, you can see other options as well
<rickspencer3> decimal and price are also rich in options
<rickspencer3> price is just decimal, but with 2 decimal places set
<rickspencer3> however, they all work basically the same way, response, val = function()
<rickspencer3> if you need to configure the prompt a bit more, for each function, there is a symetrical class that you can use
<rickspencer3> so for string(), if you want to own the dialog for some reason, you can use StringPrompt
<rickspencer3> sp = StringPrompt(title, text, default_string)
<rickspencer3> then you can party on sp if you want
<rickspencer3> there is a similar dialog for date, integer, decimal, and price
<rickspencer3> each has a "get_value()" function to extract the value
<rickspencer3> The last set of prompts are FileChooserDialogs
<rickspencer3> they work the same way
<rickspencer3> response, path = quickly.prompts.choose_directory(title)
<rickspencer3> there is choose_directory, save_image_file, and open_image_file
<rickspencer3> there are classes for these as well
<rickspencer3> DirectoryChooserDialog, OpenImageDialog, and SaveImageDialog
<rickspencer3> these lack get_value, because they are just subclasses of FileChooserDialog
<rickspencer3> which already has a get_filename() function
<rickspencer3> before I talk about the gtk.Widgets, any questions?
<ClassBot> tgalati4 asked: I noticed that quidgets is only packaged for Lucid, no Karmic.  Any plans?
<rickspencer3> I'm not planning this myself
<rickspencer3> but I would be happy to work with anyone who wanted to do this
<rickspencer3> btw, I should have mentioned that the package name is quickly-widgets in universe
<rickspencer3> alright
<rickspencer3> moving on to quickly.widgets
<rickspencer3> for widgets, there are a few miscelaneous ones, and then the grid related ones
<rickspencer3> I'll start with the miscelaneous ones
<rickspencer3> the most miscelaneous one is
<rickspencer3> from quickly.widgets.camera_button import CameraButton
<rickspencer3> CameraButton wraps up the PyGame web cam API and serves up pixbufs
<rickspencer3> I don't like how this is implemented at the moment, and am planning to pull it into it's own package for a while, until I can make it work well
<rickspencer3> however, it's kinda fun when it works
<rickspencer3> there's also a subclass of button called PressAndHold button
<rickspencer3> this one is quite useful and functional
<rickspencer3> this guy fires a signal every 250ms, so long as the user is holding the button down
<rickspencer3> so this allows you to do something while the user is holding down a button
<rickspencer3> I use this in photobomb to manage rotation of times for example
<rickspencer3> first, create the button, then connect to the signal
<rickspencer3>         button = PressAndHoldButton()
<rickspencer3>         button.connect("tick",action)
<rickspencer3> then write a function that does something every time the signal fires
<rickspencer3> def action(self, widget=None, data=None):
<rickspencer3>  #do something every 250ms
<rickspencer3> for photobomb "something" is selected_item.rotate() or such
<rickspencer3> the last misc. quickly.widget is
<rickspencer3> from quickly.widgets.asynch_task_progressbox import AsynchTaskProgressBox
<rickspencer3> in general, you should avoid threads in your python app
<rickspencer3> you should use things like gobject.timeout_add() or gobject.idle_add()
<rickspencer3> and the gio library
<rickspencer3> however, for times when you absolutely must use a thread AsynchTaskProgressBox can make it easier for you
<rickspencer3> this derives from gtk.ProgressBox, so it supplies some throbbing UI for you if you need it
<rickspencer3> the basic idea is to write a function that you want to run on a thread
<rickspencer3> I usually call this a task
<rickspencer3> create a dictionary of parameters if you want to pass some params to the function
<rickspencer3> create the AsynchTaskProgressBox
<rickspencer3> if you want to know when the task is done, connect to the complete event
<rickspencer3> here's some photobomb code for example
<rickspencer3> params = {"directory":directory}
<rickspencer3> pb = AsynchTaskProgressBox(self.__load_task, params, False)
<rickspencer3> pb.connect("complete",self.__load_task_complete)
<rickspencer3> for your task, you can simulate a killable thread (in python you can't really kill a thread, just wait for it to end)
<rickspencer3> if every
<rickspencer3> if *ever* even
<rickspencer3> you do this by checking a special key that is added to params called "kill"
<rickspencer3> if it's set to True, you can stop working
<rickspencer3> here's a bit of code from photobomb to demonstrate
<rickspencer3>     def __load_task(self, params):
<rickspencer3>         pictures_dir = params["directory"]
<rickspencer3>         images = []
<rickspencer3>         files = os.listdir(pictures_dir)
<rickspencer3>         for f in files:
<rickspencer3>             try:
<rickspencer3>                 if params["kill"]:
<rickspencer3>                     return None
<rickspencer3>                 #etc....
<rickspencer3> So the last bit about quickly-widgets is about Grids and Filters and stuff
<rickspencer3> before I do that, any questions so far?
<ClassBot> stevec33 asked: Why is it best to avoid threads?
<rickspencer3>  because the implentation in Python leaves a lot to be desired
<rickspencer3>  like there is a global lock and scuh
<rickspencer3>  they are not true threads that get deployed and run seperately on CPUs and such
<rickspencer3>  but mostly, it's really hard to write code that does not have bad bugs in it
<rickspencer3> this is especially true with PyGtk
<rickspencer3> you have to call threads_enter() and threads_leave() and all this when updating the UI
<rickspencer3> or it goes quite haywire
<rickspencer3> ok
<rickspencer3> on to grids
<rickspencer3> lots of the code in quickly-widgets is about presenting data to users in a TreeView
<rickspencer3> in PyGtk, gtk.TreeView handles both displaying grid data and data in trees
<rickspencer3> quickly-widgets focuses on the Grid
<rickspencer3> and totally ignores the tree case
<rickspencer3> trees are UI elements where there are nested nodes with those little disclosure triangles and such
<rickspencer3> so, grids
<rickspencer3> the essentially scenario is that you have some tabular data to display
<rickspencer3> gtk.TreeView can let you display this in any manner you like
<rickspencer3> so long as you:
<rickspencer3> 1. Create a TreeView
<rickspencer3> 2. Cerate a treeview model store of some kind
<rickspencer3> 3. create columns
<rickspencer3> 4. create cellrenders for each column
<rickspencer3> 5. popluate the treeview model
<rickspencer3> each of these steps taking multiple lines of code *per column*
<rickspencer3> and this does not include letting users change the values in the grid
<rickspencer3> filtering
<rickspencer3> adding data after it is created, etc...
<rickspencer3> from quickly.widgets.dictionary_grid import DictionaryGrid tries to handle this for you in essentially, one line of code
<rickspencer3> the basic interaction is that you create a DictionaryGrid by handing it a list of dictionary, and it makes a TreeView for you
<rickspencer3> you just show it and add it to your form
<rickspencer3> Here's a bit from the dictionary grid test program
<rickspencer3> first, a list of dictionaries
<rickspencer3> dicts = [{"key?": True, "price":0.00,"tags" : "aaa bbb ccc","_foo":"bar","bing count":20},
<rickspencer3>                  {"ID": 11, "key?": False, "price":2.00,"tags" : "bbb ccc ddd","_foo":"bar"},
<rickspencer3>                  {"key?": True, "price":33.00,"tags" : "ccc ddd eee","_foo":"bar","bing count":15},
<rickspencer3>                  {"ID": 3, "tags" : "ddd eee fff","_foo":"bar"},
<rickspencer3>                  {"ID": 4, "price":5.00,"_foo":"bar"}]
<rickspencer3> then, create the DictionaryGrid:
<rickspencer3> grid = DictionaryGrid(dicts)
<rickspencer3> seriously, that;s all it takes to show the data in the dictionaries to a user
<rickspencer3> if you want the user to be able to edit the grid, set it to editable:
<rickspencer3> grid.editable = True
<rickspencer3> note that setting some of the properties, including editable will cause the grid to reset itself
<rickspencer3> if it's editable, the user can change the data in the dictionary
<rickspencer3> there are some properties that you can use to extract the data
<rickspencer3> like
<rickspencer3> grid.rows
<rickspencer3> this gives you all the rows
<rickspencer3> where as
<rickspencer3> grid.selected_rows gives you the currently selected row
<rickspencer3> some handy functions you get for free, like
<rickspencer3> grid.remove_selected_rows()
<rickspencer3> remove_selected_rows
<rickspencer3> oops
<rickspencer3> you can add to your grid by appending rows
<rickspencer3> grid.append_row(my_dict)
<rickspencer3> if you want to add an empty row
<rickspencer3> append_row({})
<rickspencer3> then if the grid is editable, the user can fill itin
<rickspencer3> by default, the grid will display a column for every key it encounters UNLESS that key starts with "__" (two underscores), in which case it will be ignored
<rickspencer3> if you want to control the keys displayed, you can do this when you create it:
<rickspencer3> grid = DictionaryGrid(dicts,list_of_keys)
<rickspencer3> or you can set the keys later
<rickspencer3> grid.keys = list_of_keys
<rickspencer3> this causes the grid to reset, btw
<rickspencer3> Columns will sort properly most of the time
<rickspencer3> this is accomplished by having each column be a certain type
<rickspencer3> there is the default StingColumn, but there is also IntegerColumn, CurrencyColumn, TagsColumn, and CheckColumn
<rickspencer3> by "extending" GridColumn you can create your own column types if you need to
<rickspencer3> DictionaryGrid tries to guess the right column type to use based on the name of the key
<rickspencer3> So if you choose your key names correctly, you can get a lot of good functionality for free
<rickspencer3> for example, and key that ends with "?" DictionaryGrid will assume it is a boolean, and use CheckBoxes to show the values
<rickspencer3> and provide the appropriate sortign for you
<rickspencer3> the key "price" is assumed to be currency
<rickspencer3> anything ending in count will be an IntegerColumn, same with a key called "id"
<rickspencer3> a key called "tags" will be a tags column
<rickspencer3> tags columns are mostly important for filtering, which I will discuss in a moment
<rickspencer3> you can control the columntypes manually if you want, by passing in "Type Hints"
<rickspencer3> here's some code from the tests:
<rickspencer3>         keys = ["id","price","bool?","foo"]
<rickspencer3>         hints = {"id":StringColumn, "price":IntegerColumn,
<rickspencer3>                  "bool?":CurrencyColumn,"foo":CheckColumn}
<rickspencer3>         dicts = [{"price":100,"id":"asdfas","bool?":10.01,"foo":True}]
<rickspencer3>         grid = DictionaryGrid(dicts, keys, hints)
<rickspencer3> in this case hints are overriding the defaults
<rickspencer3> so I should talk about filtering next, but first, questions?
<rickspencer3> I hope there are no question be my content is so riveting, and the clarity is so profound
<rickspencer3> :)
<rickspencer3> moving on ...
<rickspencer3> so one cool thing about gtk.TreeView is the filtering capabilities
<rickspencer3> Filtering even pretty long lists works really fast
<rickspencer3> but this is a TON of work in PyGtk
<rickspencer3> from quickly.widgets.grid_filter import GridFilter makes a filter UI for you
<rickspencer3> this will let the user add filters to filter columns
<rickspencer3> if you've seen the bughugger UI, then you have seen GridFilter and DictionaryGrid in action
<rickspencer3> you just need to hand it a Grid to filter
<rickspencer3> it will pick up filter types from the GridColumns in the Grid
<rickspencer3> So for example columns with strings will get a filter with "contains substring" while a column with numbers will get ">,<.=", etc...
<rickspencer3> a tags column gets "contains one of these tags", "contains all of these tags", etc...
<rickspencer3> all this just by creating it:
<rickspencer3> filt = GridFilter(grid)
<rickspencer3> filt.show()
<rickspencer3> if you want to override the default filter types, you can pass in hints
<rickspencer3> this works pretty much like in the grid
<rickspencer3> you pass in a dictionary that matches up keys to filter types
<rickspencer3> well, actually to filter combos, but that's a bit more detail than necessary
<rickspencer3> there are StringFitlerCombo, TagsFilterCombo, CheckFilterCombo etc...
<rickspencer3> there is also blank filter combo that you can use to easily make your own filters
<rickspencer3> for example, in bughugger I created a custom filter to filter status and importance like this:
<rickspencer3>   sw_filter2 = BlankFilterCombo()
<rickspencer3>   sw_filter2.append("=",lambda x,y: convert_to_num(x) == float(y) )
<rickspencer3>   sw_filter2.append("<",lambda x,y: convert_to_num(x) < float(y) )
<rickspencer3>   sw_filter2.append(">",lambda x,y: convert_to_num(x) > float(y) )
<rickspencer3>   sw_filter2.append("<=",lambda x,y: convert_to_num(x) <= float(y) )
<rickspencer3>   sw_filter2.append(">=",lambda x,y: convert_to_num(x) >= float(y) )
<rickspencer3> filter_hints = {"status":sw_filter,"importance":sw_filter2}
<rickspencer3> each call to append adds a string and a function call
<rickspencer3> the function gets called when the users changes the filter in some way
<rickspencer3> the function should return True to show the row
<rickspencer3> or False to hide the row
<rickspencer3> lastly I'll discuss CouchGrid
<rickspencer3> but first, Questions?
 * rickspencer3 tap tap
<rickspencer3> is this thing on?
<ClassBot> tgalati4 asked: Besides bughugger and photobomb, any other apps using quidgets that we can use for reference?
<rickspencer3> I don't know
<rickspencer3> I get a lot of questions about using the widgets
<rickspencer3> but I haven't tracked what folks are doing with it
<rickspencer3> sorry :/
<rickspencer3> ok
<rickspencer3> before we break, I'll touch on CouchGrid
<rickspencer3> the flagship of the quickly-widgets package
<rickspencer3> I feel this has been talked about a lot
<rickspencer3> In Lucid, a CouchGrid is a DictionaryGrid
<rickspencer3> this is different than the CouchGrid that was desktopcouch.records.couch_grid import CouchGrid
<rickspencer3> in Lucid you get all the sorting and filtering of DictionaryGrid, plus persistance in desktopcouch
<rickspencer3> you need to define a database and a record type
<rickspencer3> if you want, you can pass in a dictionary with some starter data as well
<rickspencer3> here is some code from the GridFilter test app
<rickspencer3>     database_name = "couch_widget_test"
<rickspencer3>     record_type = "couch_grid_filter_test"
<rickspencer3>     hints = {}
<rickspencer3>     grid = CouchGrid(database_name, record_type=record_type, dictionaries=dicts)
<rickspencer3>     grid.show()
<rickspencer3>     filt = GridFilter(grid,hints)
<rickspencer3>     filt.show()
<rickspencer3> this sets up a database for you
<rickspencer3> if the databaes is there and there are records already
<rickspencer3> it displays those for you!
<rickspencer3> if there are new records it persists them for you
<rickspencer3> so, that
<rickspencer3> s the last bit of content I had planned
<rickspencer3> Questions?
<rickspencer3> okay
<rickspencer3> so, if you're hacking and have questions, want to contribute
<rickspencer3> etc...
<rickspencer3> join #quickly any time and ask away
<rickspencer3> again, the project is early, so feedback and contributions can have a big impact at this point
<rickspencer3> this is community developed software, so it's there to be molded by the community :)
<ClassBot> tgalati4 asked: What's on the roadmap on quidgets?  What's the burning next todo item?
<rickspencer3> thanks for the question tgalati4
<rickspencer3> next step is to get some feedback on the Grid related stuff
<rickspencer3> and fix bugs
<rickspencer3> I think that saves the most work there
<rickspencer3> also, I'd like to make the web cam button good
<rickspencer3> someone yesterday suggest gstreamer, I should give that a try
<rickspencer3> also, there may be more file chooser dialogs for the prompts
<rickspencer3> I'd like to add any widgets that folks like that they would like to find an upstream home for
<rickspencer3> but one of the most immediate burning things for me is to write documentation
<rickspencer3> please note that there is a fair amount of documentation already in the code itself
<rickspencer3> and you can access this with pydocs
<rickspencer3> thanks everyone!
<rickspencer3> I'm looking forward to working with folks to make quickly-widgets more functional and more easy and more fun
<rickspencer3> :)
* ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - http://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi
<malev> hey, where does the talks logs are stored?
<malev> where are store the chat logos? (better this way)
<ausimage> malev there linked from the wiki paage with the schedule
<malev> ausimage: thanks!
<ausimage> no
<ausimage> np
<ausimage> :/
<ausimage> fingers :S
#ubuntu-classroom 2010-03-05
<kayve> I am having a hard time knowing how to proceed with the installation of this facility called libdap which is a data transfer add on for Matlab
<persia> kayve: Have you tried asking in #ubuntu?
<mhall119|work> nice
<cjohnston> hey mhall119|work
<cjohnston> did you see the identi.ca and twitter accounts?
<mhall119|work> nope
<mhall119|work> what are they?
<mhall119|work> @ubuntuclassroom?
<cjohnston> yes
<cjohnston> mhall119|work: http://chrisjohnston.org/2010/ubuntu-classroom-identi-ca-twitter
* ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - http://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Event: Ubuntu Opportunistic Developer Week - Current Session: Testdrive - Dustin Kirkland - Instructor: kirkland || Questions in #ubuntu-classroom-chat
<kirkland> howdy all
<kirkland> anyone here to hear about Testdrive for the Opportunistic Developer Week?
<kirkland> alrighty
<kirkland> couple people, good enough for me
<kirkland> so my name is Dustin Kirkland, an Ubuntu Core Developer on the Server Team
<kirkland> in particular, I look after Ubuntu's virtualization and cloud computing packages
<kirkland> but I'd also like to think of myself as an opportunistic developer too ;-)
<kirkland> this session is about Testdrive, which I hope is interesting to you for two reasons ...
<kirkland> 1) it was totally developed opportunistically ;-)
<kirkland> 2) it can be used to help you test/develop your own opportunistic apps
<kirkland> so who here has some helper scripts that they wrote or borrowed from someone else, living in their $HOME/bin dir?
<kirkland> well, those are often good targets of opportunity for sharing, IMHO
<kirkland> and that's sort of how Testdrive came about
<kirkland> kvm is a really powerful program
<kirkland> with lots and lots and lots of options
<kirkland> http://manpages.ubuntu.com/manpages/lucid/en/man1/kvm.1.html
<kirkland> but i tended to use the same ones over and over again
<kirkland> for a few reasons ...
<kirkland> they made my VMs run faster, better, etc.
<kirkland> so i wrote a little shell script i called mykvm that added those options automatically for me
<kirkland> as turned out, though, this could be really useful for other people
<kirkland> particularly people who don't terribly want to learn lots and lots about virtualization and kvm
<kirkland> but just want to quickly launch a throwaway VM
<kirkland> perhaps boot a live cd in a vm, test something, then discard it
<kirkland> about the same time, lots and lots of people started complaining about karmic
<kirkland> "omg the colors are ugly... this is broken... that is broken... etc. etc. etc."
<kirkland> but this stuff had been in the pipeline for months
<kirkland> anyone of those very vocal individuals could have tried Ubuntu any time in the last 6 months
<kirkland> reported bugs
<kirkland> and perhaps gotten some of them fixed
<kirkland> so Testdrive was born
<kirkland> as a way to "testdrive" the latest daily Ubuntu ISOs
<kirkland> using rsync/zsync to incrementally download the day's image
<kirkland> run it in a vm
<kirkland> perhaps install, perhaps not
<kirkland> and throw it away when done!
<kirkland> what started out as a way to scratch my own itch ended up helping lots of people
<kirkland> and solving a different problem
<kirkland> and after Lucid releases, you'll be able to continue testdriving MM, OO, PP, etc. while still running Lucid ;-)
<kirkland> so there's a couple of steps along the way ...
<kirkland> of course i created a project and a team in Launchpad
<kirkland> http://launchpad.net/testdrive
<kirkland> http://launchpad.net/~testdrive
<kirkland> loaded the source code up into bzr
<kirkland> pushed to a public branch, GPLv3
<kirkland> packaged it (this is important if you want people to install your program!)
<kirkland> pushed to PPAs (backported to Hardy, Intrepid, Jaunty, Karmic, Lucid)
<kirkland> and eventually got it into Ubuntu universe for Lucid
<kirkland> (PPAs for the rest)
<kirkland> now, shortly after I released the initial version working with KVM, people came along and said
<kirkland> "I like it, but I can't use KVM ..."
<kirkland> and thus it grew arms and legs
<kirkland> to use VirtualBox and Parallels
<kirkland> and there's a VMWare patch under development
<kirkland> this is community driven efforts, now
<kirkland> with people like popey and others contributing bugs, features, patches, fixes, etc.
<kirkland> so that's a bit about the history of the development of testdrive so far
<kirkland> i see a question ....
<kirkland> <tgalati4> QUESTION: What % of Karmic bugs were hardware support vs strictly software?
<kirkland> I have no idea what the percentage is, but I'll address the spirit of your question ....
<kirkland> obviously there are limitations to what can be tested in a VM
<kirkland> but there are tons of things that still can be tested in a VM!
<kirkland> actually, when I demo'd testdrive at UDS Dallas, sconklin of the Ubuntu kernel team said ...
<kirkland> "crap dude, if this testdrive thing takes off, people aren't going to test on their real hardware as much any more"
<kirkland> i reckon that's true to some extent
<kirkland> so at the end of running testdrive, there's now a question that ask you:
<kirkland> Launch USB Startup Disk Creator for further testing of this ISO? [y/N]
<kirkland> :-)  which was sconklin's suggestion
<kirkland> <enli_> QUESTION: "...testdriving MM, OO, PP etc." what those stand for?
<kirkland> MM, OO, PP are whatever the releases after Lucid Lynx might be ;-)
<kirkland> multimorphing minataur
<kirkland> um
<kirkland> meh, whatever mark comes up with :-)
<kirkland> <tgalati4> QUESTION: How successful is a VM for testing strictly hardware bugs?
<kirkland> a VM can be used for some things
<kirkland> like USB devices
<kirkland> you can "passthrough" USB devices to VMs
<kirkland> like a web cam
<kirkland> or a 3G modem
<kirkland> i often pass my Palm Pre cell phone through to a vm
<kirkland> so ... using Testdrive to do your development/testing ...
<kirkland> if you're already on Lucid, it's just "sudo apt-get install testdrive"
<kirkland> if you're on Jaunty/Karmic, grab it from the PPA at http://launchpad.net/testdrive
<kirkland> if you're on Hardy/Intrepid, well, it'll work, but there's a few limitations
<kirkland> basically, the linux virtualization stack has evolved rapidly in the last ~1 year
<kirkland> so ... get testdrive installed
<kirkland> you'll need run either kvm or virtualbox
<kirkland> i tend to recommend kvm if you have hardware that can run kvm
<kirkland> and fall back to VB only if you have to
<kirkland> once testdrive is installed, you can run either from the command line or from the Applications -> System Tools -> Testdrive menu
<kirkland> if you run with no options, you should be prompted with a menu of Ubuntu releases
<kirkland> this is just a concise list of perhaps the most popular ISOs
<kirkland> (arguably)
<kirkland> you can choose one of these
<kirkland> or enter your own url
<kirkland> actually, from the command line, you can use:
<kirkland> testdrive -u any_iso
<kirkland> where any_iso can be a local path
<kirkland> or http, ftp, or rsync
<kirkland> and it doesn't have to be ubuntu
<kirkland> it can be debian, fedora, windows, whatever
<kirkland> well, i don't much about windows
<kirkland> but it should theoretically work :-)
<kirkland> <tgalati4> QUESTION: How much RAM is recommended for VM to use testdrive?
<kirkland> if you have >1G of memory, testdrive will give 512M to the guest
<kirkland> else if you have > 750MB, testdrive will give 384M to the guest
<kirkland> else it will give 256M to the guest
<kirkland> which is basically what's required to run a live cd iso
<kirkland> so i'd say you need >256M of memory :-)
<kirkland> actually, this was one of the first reasons i created that old mykvm script
<kirkland> kvm defaults to 128M of memory
<kirkland> which ain't much :-)
<kirkland> i *always* gave my VM's 512M
<kirkland> so i created a bash alias, which eventually turned into a script to add virtio networking and virtio disk
<kirkland> oh, another thing about the evolution of that code ...
<kirkland> it started out as shell script
<kirkland> which is fine and dandy for prototyping
<kirkland> but if you want to do something more complex
<kirkland> and you want to work with other people on the code
<kirkland> ie, "collaborate"
<kirkland> shell can be difficult ;-)
<kirkland> so I re-wrote it in python
<kirkland> i'm sure you've heard a lot about python this week
<kirkland> i'm no expert, but it's easy to learn, and a very friendly language
<kirkland> <w1nGNUtz> QUESTION: What exactly do you expect users to test?
<kirkland> well, it's both a test and a development tool, actually
<kirkland> from a test perspective ...
<kirkland> some of you probably saw the new ubuntu theme posts this week?
<kirkland> new colors and windows and stuff like that?
<kirkland> great for testdriving
<kirkland> or perhaps packages in ppas
<kirkland> that you're not willing to put on your primary desktop
<kirkland> which might even be running Lucid, as in my case
<kirkland> there's some stuff that even core developers are risk adverse too :-)
<kirkland> but  you can also install to the vm's disk
<kirkland> reboot the vm, etc.
<kirkland> we use that for server testing all the time
<kirkland> i'd say software wise, you should be able to test almost anything
<kirkland> you know, the stuff people are going to complain about after release :-)
<kirkland> its actually *really* easy to test it now, before release, in a vm
<kirkland> <w1nGNUtz> kirkland: I thought testdrive was meant to test hardware, drivers and other stuff
<kirkland> not really ....
<kirkland> are you thinking of checkbox?
<kirkland> <tgalati4> QUESTION: When updating a testdrive snapshot, is the entire distro downloaded or diff files?
<kirkland> testdrive tries its best to download incrementally
<kirkland> if the url is a rsync:// url (all of the ones in the default menu are), it uses rsync against the iso
<kirkland> which can really improve your download by incrementally downloading the parts of the iso that have changed
<kirkland> if you use http or ftp, it tries to use zsync
<kirkland> which requires a zsync file on the server end
<kirkland> ubuntu images are typically published with a zsync file
<kirkland> but if you're pulling images from else, they may or may not be there
<kirkland> <w1nGNUtz> kirkland: as a programmer i thought it would have some automated tests included in testdrive, like in grid computing, use users' computing power to run more tests quickier.. I didn't realize it would be used to test virtually anything.
<kirkland> possibly a flaw in the naming of the package ...
<kirkland> it's really meant as an easy way to "take the next ubuntu release out for a test drive"
<kirkland> in the same way you might roll up to the chevy dealership and ask to take the new Corvette out for a spin ;-)
<kirkland> so from a development perspective, i often use testdrive for a pristine environment
<kirkland> of course there are other ways of doing this
<kirkland> chroots, etc.
<kirkland> but for various reasons, a VM can be advantageous
<kirkland> it more closely mimics the end user's environment
<kirkland> <yellabelly24> QUESTION: How much KVM do we need to know? Can you recommend a quick start guide for KVM?
<kirkland> to use testdrive?  none at all, hopefully
<kirkland> that's the goal of testdrive, to mask the creation and tear down of the VM from you entirely
<kirkland> you just tell testdrive where your target ISO is, and it puts that into a VM for you to play with
<kirkland> if you want to learn about KVM, well that's a different story
<kirkland> :-)
<kirkland> https://help.ubuntu.com/community/KVM
<kirkland> that's as good of a starter as anywhere
<kirkland> http://manpages.ubuntu.com/manpages/lucid/en/man1/kvm.1.html
<kirkland> manpages are good too
<kirkland> but, for instance ...
<kirkland> i'm testdriving an iso right now
<kirkland> ps -ef | grep kvm
<kirkland> kirkland 31434 31433 78 10:38 pts/11   00:00:54 kvm -m 1024 -cdrom /home/kirkland/.cache/testdrive/iso/lucid-desktop-amd64.iso -drive file=/home/kirkland/.cache/testdrive/img/testdrive-disk-Aw769k.img,if=virtio,index=0,boot=on -usb -usbdevice tablet -net nic,model=virtio -net user -soundhw es1370
<kirkland> if you know the kvm magic, you could easily construct that line yourself
<kirkland> -m 1024 -> give the vm a gig of memory
<kirkland> -cdrom is the path to the locally cachced iso image
<kirkland> -drive ...virtio... loads a virtio disk
<kirkland> which is really fast, by the way
<kirkland> this is a sparse qcow2 image
<kirkland> created by kvm-img create -f qcow2
<kirkland> which testdrive also did for you
<kirkland> -usbdevice tablet improves the mouse experience, letting you move in and out of the window a bit better
<kirkland> virtio networking
<kirkland> and a sound card, so that you can hear the vm's sound
<kirkland> there's similar work done for virtualbox too
<kirkland> makes the experience similar
<kirkland> <enli_> QUESTION: When somebody has installed with Testdrive to virtual HDD and there is a new image available. So is that possible to extract the image and place binaries at their respective locations without going through the whole setup thing again? (probably stupid but sounds good to me)
<kirkland> hmm, it would be much better to just boot the existing installed virtual HDD and sudo apt-get dist-upgrade ;-)
<kirkland> <tgalati4> QUESTION: Can testdrive be used for testing/benchmarking server edition and server applications?
<kirkland> absolutely!
<kirkland> well, testing
<kirkland> benchmarking is a little tougher in a vm
<kirkland> though it can be done, with certain caveats
<kirkland> <tgalati4> QUESTION: For instance, if I want to test apps from Hardy to Lucid?
<kirkland> well, a couple of things ...
<kirkland> you could start by testdriving a Hardy server iso
<kirkland> install to the virtual hard disk, add your apps
<kirkland> verify that they install there
<kirkland> then live upgrade from Hardy -> Lucid in the vm
<kirkland> (that'll take a while, depending on your bandwidth)
<kirkland> then see if your apps are still working as they were in Hardy
<kirkland> oh, and you could save your hardy image off to the side
<kirkland> or use qemu snapshot
<kirkland> so that you can roll back and forth
<kirkland> <tgalati4> Almost like cloud computing.
<kirkland> well, similar, i suppose
<kirkland> in that cloud computing builds on virtualization
<kirkland> Ubuntu Enterprise Cloud is really just a collection of KVM vm's
<kirkland> (and a lot of management software that makes that work)
<kirkland> stuff much more complicated than testdrive, I assure you ;-)
<kirkland> and it's good for that
<kirkland> so you can branch the testdrive source code very easily
<kirkland> bzr branch lp:testdrive
<kirkland> it's just a relatively simple python script
<kirkland> you're welcome to hack on it, submit bugs, and branches and patches :-)
<kirkland> scratch your itch
<kirkland> or model your own project on bits and pieces of testdrive if you like
<kirkland> <yellabelly24> QUESTION: Can you save state in a snapshot? (like a suspend/hibernate)
<kirkland> you sure can!
<kirkland> here's how ...
<kirkland> if you're running a kvm
<kirkland> click inside of it
<kirkland> and press
<kirkland> ctrl-alt-2
<kirkland> this will put you into the qemu monitor
<kirkland> it's like a little shell running below the vm
<kirkland> you can talk to the hypervisor here
<kirkland> in there, type:
<kirkland> savevm /tmp/path_to_snapshot.img
<kirkland> this will take a few minutes to complete
<kirkland> well, depending on the size of your memory and delta from the last state
<kirkland> <tgalati4> QUESTION: I want to experiment with XEN VM on one of my machines.  Will testdrive work with XEN?
<kirkland> not currently
<kirkland> no plans to do so (by me)
<kirkland> good patches accepted :-)
<kirkland> <quappa1> QUESTION: (not a question) you should also advertise Testdrive to developers as a way to test their apps on OLDER releases which many end users use :)
<kirkland> thanks
<kirkland> guys, i think that's about all from me
<kirkland> scratch your itch ;-)
* ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - http://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Event: Ubuntu Opportunistic Developer Week - Current Session: Creating a PyKDE app - Rich Johnson - Instructor: nixternal || Questions in #ubuntu-classroom-chat
* ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - http://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi
<sebsebseb> Hi
* ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - http://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Event: Ubuntu Opportunistic Developer Week - Current Session: SHOWCASE: Lernid - Jono Bacon - Instructor: jono || Questions in #ubuntu-classroom-chat
<jono> ahh!
<jono> hey all!
<jono> sorry some nick problems there
<jono> I am a numpty!
<jono> ok folks, if in Lernid and on Lucid - click Event -> Tweet this session :)
<jono> ok lets get started
<jono> how is everyone today?!
<jono> hi all! my name is Jono Bacon and I am the Ubuntu Community Manager
<jono> welcome to my Lernid showcase session
<jono> the aim of this session is to tell the story behind Lernid, to explain how it came about, what technical decisions were made to produce it and to help provide some background that might help you good folks make your own apps
<jono> so, what is Lernid?
<jono> many of you are using Lernid to connect to this and other online learning sessions, but for some of you, you will have no idea what Lernid is
<jono> who is using Lernid to view this now?
<jono> give me a o/ in the chat channel if you
<jono> are
<jono> sweet! :)
<jono> that makes me smile
<jono> ok, in a nutshell, Lernid is an online learning to tool that helps people have an interactive experience when participating in online learning events - the homepage for Lernid is at https://wiki.ubuntu.com/Lernid
<jono> click the Session tab to see the web pages as I post them
<jono> about 3 1/2 years ago when I joined Canonical as the Ubuntu Community Manager, I was trying to think of ways in which we could spread best practise - methods in which we could help more people in the community learn the skills and processes to join us to make Ubuntu better
<jono> to do this I created Ubuntu Open Week: a set of IRC tuition sessions in which people joined #ubuntu-classroom and #ubuntu-classroom-chat - I asked a bunch of my fellow community members to deliver sessions in #ubuntu-classroom and questions could be asked in #ubuntu-classroom-chat
<jono> it went down really well and lots of new folks joined our community
<jono> we then created Ubuntu Developer Week: a similar event but more specifically aimed at technical topics and packaging work in Ubuntu
<jono> <tgalati4> QUESTION: How much beer did it cost you?
<jono> none :)
<jono> <tgalati4> QUESTION: How much beer did it cost you?
<jono> oops
<jono> we have done this every cycle for three years, but a few things niggled me about it - namely:
<jono> (1) IRC is complex for a lot of new users - you need to know how to what an IRC client is, how to connect and which channels to join
<jono> (2) the times are a pain to convert to your loca timezone - we provided the times in UTC - a universal time standard for confusing everyone about what UTC actually is :P
<jono> (3) IRC is very static - it is just text, and delivering other content, particularly visual content is difficult
<jono> for a little while I was thinking it could be cool to have a simple Python app that solved these problems and at the last Ubuntu Developer Summit I shared my idea for this app in a session
<jono> on the flight back from Dallas to California I decided to start writing it, created a first version and blogged it at http://www.jonobacon.org/2009/11/25/introducing-lernid/
<jono> I created Lernid using Quickly, and this first cut literally just solved the problem (1) above - it provided a window divided into three sessions where you could see the web page for the event and two embedded chat channels - one for #ubuntu-classroom (in the interface as Classroom) and one for #ubuntu-classroom-chat (in the interface as Chatroom)
<jono> this early version already made it really easy to connect - when you connect in Lernid you see the connect dialog as in http://farm5.static.flickr.com/4059/4409336396_dfe1636ae3_o.jpg
<jono> what this does it grab a .lernid config file from the server (currently set to jonobacon.org) and this config file has a series of details about a given event - this includes:
<jono>  * the name of the event
<jono>  * a link to an ical file which contains the details about each event
<jono>  * the start and end times for the event
<jono> * the classroom IRC channel
<jono>  * the chat IRC channel
<jono> and.....
<jono> *drum roll*
<jono>  * a webpage that describes the event
<jono> this config file is downloaded using the urllib python module and then the config is parsed using the ConfigParser python module - this then gives us some data about the event and tells us which IRC channels to connect to
<jono> the window was divided into the three areas and embedded three webkit widgets - this is a module you can use to display web pages
<jono> at first I embedded the freenode web IRC interface and pointed it at the relevant IRC channels
<jono> the next step was to provide support to display the scheduled set of events in Lernid - such as in http://farm5.static.flickr.com/4003/4409336490_ba709363d3_o.jpg
<jono> to do this I created a Google Calendar for the events and added a bunch of events and then used the urllib Python module to download the ical file and the vobject Python library to parse it and grab the interesting bits of data - vobject is a great way to grab data out of calendar feeds
<jono> I then used the time and datetime Python modules to convert the events (which had their times specified in UTC) and convert them to the local timezone (in my case GMT-8) - I then created a gtk.TreeView widget to display this list of events, complete with the local timezone times
<jono> this instantly made Lernid a useful app - now you could connect to an event by simply selecting it from a combo box, see the IRC channels instantly and see what events were schedule with your local timezone applied
<jono> I then added notification bubble support so a little notify-osd bubble pops up when an event is starting and 10mins before an event started
<jono> to do this I used the pynotify Python module and set the times for when the bubbles should pop using the idle_time() function in PyGTK - this lets you schedule something to happen
<jono> the next step in my head was to add support for slides
<jono> my thinking was that if we could deliver slides in a session it could really raise the interactivity of a given session
<jono> I was really keen to make it really simple for session leaders to provide slides, so I wanted them to be able to provide a .pdf
<jono> then ideally Lernid could display the slides one at a time
<jono> the way this works is that a slide can be triggered in lernid by the session leader typing in [SLIDE 1]
<jono> this will then display the very first slide
<jono> the session leader then just specifies the slide number and slides appear in real-time in Lernid
<jono> for this to work, a 'Slides' line is added to the ical feed
<jono> this points to a location where the pdf lives
<jono> please folks, don't flood -chat
<jono> I will wait until the spamming stops
<jono> so the slides are on a server, we then use the urllib module to download the slides and the poppler module takes the pdf and breaks them into a collection of .jpg files - I then added a listener to the IRC window that listens for the [SLIDE] line and displays the relavent .jpg in the window
<jono> simple as that
<jono> I forgot to mention that in the meantime I wanted to make the IRC panes a lot more native - embedded freenode webchat pages sucked
<jono> so, I had a chat with the telepathy folks (they make the telepathy framework which powers empathy and is seen as the next gen GNOME messaging backend) and they have IRC support
<jono> so I used this module to have a native widget - telepathy dealt with making the connection and getting the content, and then I just displayed it in the widget
<jono> at this point I kicked out a release and people started using Lernid for actual events
<jono> I then wanted to have real-time webpages load
<jono> we already had an embedded web browser, so I just added a listener for websites that start in http
<jono> this would then grab the URL and feed it to the webkit based webbrowser
<jono> I added an additional combo box and reload and back buttons to allow people to look at previous pages and controls them a little
<jono> with this, I kicked out a release
<jono> I now considered Lernid mostly completed for what I wanted
<jono> the next step was to make it available in everyone's language
<jono> David Planella on my team helped add support for translations to the code, and when this support is in there, translators across the internet can use rosetta to translate the app and the translations are automatically imported into Lernid
<jono> I added this functionality and tweeted a call for translators
<jono> within a few hours it was fully translated into 16 languages
<jono> you can see the list of translations at https://translations.edge.launchpad.net/lernid
<jono> Rosetta is an absolutely stunning tool for this - any app can benefit from this - you add support for translations and then open it up to a bunch of people who have never needed to or want to write code, but love to translate
<jono> David gave a session a few days back on how to hot rod your app for translations, so I recommend you check out the log
<jono> now the project was moving along swiftly
<jono> people were really interested in it and it was used for real events
<jono> we then had a patch to add a terminal view - http://farm5.static.flickr.com/4049/4409336512_cc6c658a6e_o.jpg
<jono> with Lernid being used a lot for computer-related events, it made sense
<jono> the terminal is embedded using the python-vte module
<jono> it is really simple to use - there is a great example in Acire if you want to use it
<jono> more details on Acire and Python Snippets are at https://wiki.ubuntu.com/PythonSnippets
<jono> at this point I was busy with a few other tools and I had got Lernid to the point where I wanted it, so it was time for me to do the right thing and hand over leadership of the project to someone else
<jono> I am a firm believer that good leaders step down when they know they cannot commit the time needed, so I evaluated the Lernid developer community and there was a clear candidate for a replacement
<jono> Michael Budde
<jono> mbudde to us all
<jono> that man is a total, total rock star
<jono> he brought so much quality and value to Lernid, and taken much of my shonky code and written it right :)
<jono> mbudde has brought a new level of detail and polish to the app and done a great job
<jono> if you would like to contribute to Lernid, be sure to ping him, I am sure he would love to talk to you
<jono> the final feature I asked mbudde to add for the current release which I didn't have time to work on due to travel is the tweeting feature found in the event menu - http://farm5.static.flickr.com/4013/4408570373_367df728da_o.jpg
<jono> I had this idea that when a session is running there should be a one click way to tweet, dent, Facebook it etc
<jono> fortunately, Lucid ships with the rocking Gwibber API
<jono> this makes microblogging from your app *really* simple
<jono> again, there is a snippet that explains how to do this in Acire - see https://wiki.ubuntu.com/PythonSnippets for details
<jono> it is literally about three lines of Python
<jono> this is a great way to spread the word about events and much more
<jono> so there we have it, that is the story of Lernid - I hope it provided some useful tips and insight on making an app, scratching an itch and sharing some cool Python modules you may have not heard of
<jono> any questions?
<jono> <quappa1> QUESTION: is lernid used outside of Ubuntu Weeks?
<jono> quappa1, it sure can be, and is :)
<jono> <mhall119> QUESTION: for Lernid, how much did you use Glade,and how much GUI code did you have to write yourself?
<jono> mhall119: it uses Glade extensively - some GUI code that needs to be written (such as the treeviews) is in there
<jono> <w1ngnutz> QUESTION: Does Learnid have special tools to session leaders?
<jono> w1ngnutz, not yet, but it is planned I believe
<jono> <w1ngnutz> QUESTION: PLans to add audio and video?
<jono> w1ngnutz, no idea, I think it is technically possible, but incredibly complex
<jono> in my view, Lernid is awesome because it is low bandwidth
<jono> so people in developing nations as an example, can connect
<jono> <tgalati4> Does acire have a simple text search to look for say "gwibber" in python-snippets?
<jono> not yet, it is planned - but it does list snippets by category
<jono> <raven_99> QUESTION: How long is development time for an app such as this? In other words, how long did it take for you to push it for widespread use following the time you started writing it on the plane?
<jono> raven_99, I wrote the first cut in a few days
<jono> to get it to where it is - I would say a few months of spare time work
<jono> not a lot of time by any stretch
<jono> <KennethP88> QUESTION: How many coding hours (roughly) are spent on Lernid so far?
<jono> difficult to tell, I would say up until the point where slides were added (including slides) - probably about 20 hours
<jono> <tgalati4> QUESTION: How many lines of code in Lernid so far?
<jono> no idea, mbudde can let you know that
<jono> <w1ngnutz> QUESTION: you have more ideas for e-learning/e-teaching stuff like this?
<jono> w1ngnutz, indeed, but most of my key ideas are now in Lernid
<jono> one of the challenges that Lernid will face is that it is a haven for ideas, but we should never comprimise the simplicity of Lernid
<jono> the whole point is that it is really easy to use
<jono> :)
<jono> before I finish
<jono> one final thing
<jono> when I announced Ubuntu Opportunistic Developer Week, I announced a challenge too
<jono> http://www.jonobacon.org/2010/02/25/the-grand-app-writing-challenge/
<jono> the basic goal is to write some apps this week and I am writing up a blog entry to report progress
<jono> I am writing this blog today, so if you have app you wrote this week that you want features, email me ASAP with the details
<jono> jono AT ubuntu DOT com
<jono> I am writing the blog in the next few hours
<jono> <titeuf_87> QUESTION: did you get a lot of entries already?
<jono> yep, some great entries :)
<jono> and finally, don't forget that a great place to join the opportunistic developer community in Ubuntu in #ubuntu-app-devel on freenode
<jono> come and join us, unlock your creativity with writing cool apps and have lots of fun too :)
<jono> ok, folks, thanks for joining me!
<jono> have a wonderful weekend!
* ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - http://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Event: Ubuntu Opportunistic Developer Week - Current Session: Web browsing and rapid UI with WebKit - Ryan Paul - Instructor: segphault || Questions in #ubuntu-classroom-chat
<seg|ars> Hello!
<seg|ars> I'm going to be discussing application development with WebKit
<seg|ars> For those who don't already know, WebKit is an HTML rendering engine that is developed by Apple. It was originally based on KDE's KHTML renderer
<seg|ars> WebKit is lightweight and easy to embed, which makes it useful for integrating HTML rendering capabilities into conventional desktop applications
<seg|ars> There is a Gtk+ variant of WebKit that uses Cairo for drawing and can be used seamlessly in standard Gtk+ and GNOME programs
<seg|ars> It's really easy to use if you want to display a web page in your application
<seg|ars> but it's also increasingly useful for building rich user interfaces
<seg|ars> If you want to present content in more dynamic way in your application, HTML can sometimes be a very compelling shortcut
<seg|ars> Making a custom Gtk+ widget can be hard, but writing HTML is very easy
<seg|ars> Gwibber, my open source microblogging client, uses WebKit and HTML for several aspects of its user interface
<seg|ars> http://s3.amazonaws.com/scrnshots.com/screenshots/225884/gwibber-230png
<seg|ars> The main message stream in Gwibber is rendered with HTML, allowing us to have sophisticated theming
<seg|ars> But that's not the only part that's HTML. The new sidebar and the target bar at the bottom of the window are also rendered with WebKit
<seg|ars> WebKit supports some really sophisticated CSS features that make it conducive to interface design
<seg|ars> For example, it supports CSS gradients, transparency, reflections, and even animated transitions
<seg|ars> You can see several of those features in the previous screenshot
<seg|ars> The Gtk+ port of WebKit is maintained by the WebKitGtk+ developers: http://webkitgtk.org/
<seg|ars> the port is under very heavy active development and is gaining new features with every release
<seg|ars> Some of the key stakeholders in the porting effort recently gathered for a hackfest where they worked on some key improvements
<seg|ars> You can find more details about the hackfest here: http://arstechnica.com/open-source/news/2010/01/webkitgtk-hackfest-improves-html-renderer-for-gnome-apps.ars
<seg|ars> They are adding a lot of great HTML5 features, such as HTML5 video playback via GStreamer.
<seg|ars> You can use WebKitGtk+ in several different programming languages thanks to the availability of bindings
<seg|ars> Python is my programming language of choice, so that's what we will be using for the code examples during this session
<seg|ars> The Python bindings are available through the PyWebKitGtk project: http://code.google.com/p/pywebkitgtk/
<seg|ars> The lead developer behind that project recently halted activate maintenance, so those bindings will not be used much in the future
<seg|ars> PyGi, which provides Python bindings to Gtk+ libraries through GObject-introspection, will be used in the future
<seg|ars> PyGi is already largely usable, but it wasn't quite mature enough yet for us to use in an LTS release
<seg|ars> As such, Gwibber still uses the conventional PyWebKitGtk+ bindings in Lucid but will be using PyGi in the next major release
<seg|ars> Fortunately, it's not that difficult to switch from one to the other. In fact, you can write code that supports both, as I will demonstrate later
<seg|ars> In our first code example, you can see how to instantiate a WebKit widget and embed it into a Gtk+ application: http://gist.github.com/323077
<seg|ars> The line "web = webkit.WebView()" will create the WebKit renderer
<seg|ars> You can use the WebView widget's "open" method to cause it to load a web page
<seg|ars> in the example, the WebView is embedded in a ScrolledWindow so that the user can scroll around the content
<seg|ars> Notice the gtk.gdk.threads_init() call at the beginning of the script. You need to do that *before* you instantiate a WebView, otherwise the program will crash
<seg|ars> That code snippet is all you need if you just want to embed a web page in your application
<seg|ars> But there are also many cases where you want to generate the HTML yourself, like we do in Gwibber
<seg|ars> to make the WebKit renderer display your own HTML, you use the load_html_string method.
<seg|ars> web = webkit.WebView(); web.load_html_string("<p>test</p>", "file:///")
<seg|ars> The first parameter is an HTML string that you want to display in the renderer
<seg|ars> The second parameter is the base path that you want to use for the html content
<seg|ars> specifying a specific base path can be useful if you want to include images or other content in the html using relative paths
<seg|ars> When you use WebKit to make a user interface, there are several tricks that you can use to make the experience more seamless
<seg|ars> This code example demonstrates several of those tricks: http://gist.github.com/323080
<seg|ars> By default, an image that is embedded in a WebView widget can be dragged around the screen and out of the program
<seg|ars> You can actually see this in action if you open up the software center and start dragging the big icons in the main pane
<seg|ars> That's obviously an undesirable behavior in a regular user interface
<seg|ars> Fortunately, WebKit has a custom CSS attribute for controlling that behavior
<seg|ars> if you set "-webkit-user-drag: none;" on your images, they will not be draggable
<seg|ars> we had to do that to avoid issues in the Gwibber navigation bar
<seg|ars> Another similar issue is that all content in a WebView is selectable, just like text content in a browser
<seg|ars> that might not be desirable on something like a button label
<seg|ars> when you want to inhibit text selection of content in a WebView, you can apply "-webkit-user-select: none" in the css
<seg|ars> You can see both of those in the code example that I pasted
<seg|ars> If you run that code, it will display a button with a shiny gradient and an icon
<seg|ars> The user-select and user-drag CSS attributes are used to make it so that the icon can't be dragged or text-selected
<seg|ars> When you use WebKit in a Gtk+ application, you will probably want to make it use colors from the user's Gtk+ theme
<seg|ars> we do that for the navigation elements in Gwibber so that they fit better with the rest of the program
<seg|ars> for example, it's really important to make sure that the background of the web page matches the color of the user's gtk window background
<seg|ars> You can see how to do that in the last code example
<seg|ars> In the HTML, we use string interpolation so we can programmatically set a custom value for the page "background" attribute
<seg|ars> In the Python part of the code, you can see a line where we get the background color and assign it to the "bgcolor" variable
<seg|ars> You can extract style information from any gtk widget by using w.get_style()
<seg|ars> to get the background, we do "w.get_style().bg[gtk.STATE_NORMAL]"
<seg|ars> The state part tells Gtk+ what state you want to get the color from
<seg|ars> if you wanted to get the selection color, for example, you could use gtk.STATE_SELECTED
<seg|ars> In addition to "bg" you can also get the foreground ("fg") and text colors ("text")
<seg|ars> QUESTION: What does WebView refer to exactly? Rendering of any url, or any piece of html code? I'm confused.
<seg|ars> The WebView is a WebKit rendering widget. It's like an HTML renderer that you can plop into a Gtk+ application
<seg|ars> you can use it to load either a remote url or to display any specified html content
<seg|ars> ok, back to the color setting
<seg|ars> In the code example, we use "%s" as a placeholder in the html code to denote the place where we are going to insert the color data
<seg|ars> when we apply the html, we use "html % bgcolor", which will replace that "%s" with the actual value of the bgcolor variable
<seg|ars> if you were going to programmatically set multiple values in various places in the html, you can use a more sophisticated approach like Python's string "Format" method. It will let you do more complex interpolation and value replacement
<seg|ars> In Gwibber, we needed even more control over the html
<seg|ars> we use a template engine called Mako that lets you generate HTML with bits of code interspersed
<seg|ars> You can learn more about Mako here: http://www.makotemplates.org/
<seg|ars> Mako is really great for theming because you can create a set of programmable templates that can be inherited and overridden
<seg|ars> In Gwibber, we supply a base template that defines functions for rendering all of the items in the message stream. Each theme inherits that base template and overrides parts of it to create their own desired look and feel
<seg|ars> This is what the Gwibber base template looks like: http://bazaar.launchpad.net/~gwibber-committers/gwibber/trunk/annotate/head%3A/ui/templates/base.mako
<seg|ars> You can also do some programming in the HTML itself
<seg|ars> in Gwibber, for example, we use the jquery library to make it so that the user can expand grouped messages. It has a nice animated transition
<seg|ars> Using jquery in embedded HTML can be really useful for building a rich UI
<seg|ars> One of the big challenges of using an embedded HTML renderer in a Gtk+ application is facilitating communication between the contents of the HTML and the outside program
<seg|ars> you want your program to be able to respond to click events inside of the html
<seg|ars> In our code example (http://gist.github.com/323080) we use navigation events to do that
<seg|ars> You can see that the button in the html is wrapped in an "a" tag that points to "program:/test" as its URL
<seg|ars> What I tend to do when I want to detect a click event in WebKit is intercept all navigation events and filter the ones that have a pre-determined prefix
<seg|ars> in the code example, the on_click_link function gets bound to the "navigation-requested" event
<seg|ars> web.connect("navigation-requested", on_click_link)
<seg|ars> what this means is that any time something causes a navigation action in the WebView, like if somebody clicks a link, that Python function will be called
<seg|ars> In the Python function, we analyze the URI to see if it starts with "program:/"
<seg|ars> when it does, we look at what the rest of it says and then we perform whatever action
<seg|ars> you could have a set of if/elif checks on the value of the rest of the URI after "program:/" to determine exactly what the program should do
<seg|ars> for example, in Gwibber, clicking the reply icon in a message bubble will load the url "gwibber:/reply?msg=${msgid}"
<seg|ars> The template library is used to replace the ${msgid} part with the actual id of the individual message
<seg|ars> when the user clicks that icon, the python side of the program will detect it and then execute gwibber's reply function with the specified id value as a parameter
<seg|ars> QUESTION: navigation-requested is a webkit event, right?
<seg|ars> yes, navigation-requested is a webkit event
<seg|ars> By default, if you don't set a function to the navigation-requested signal, clicking a link will cause the url to load inside of the WebView
<seg|ars> in most cases where we are using WebKit for a user interface, we want to capture those clicks to perform an event and we want regular links to load in the user's external browser
<seg|ars> You can see that in action in the code example. When the URI doesn't match "program:/" or anything else we are tracking, we just pass the whole thing to python's "webbrowser.open" method so that it will launch in the user's browser
<seg|ars> As you can see, using WebKit makes interaction a little bit more complex, but you get a tremendous amount of control over how content is presented
<seg|ars> and it's great for rapid development because it's often easier to write HTML than to build a real Gtk+ UI
<seg|ars> now for some questions before we finish up
<seg|ars> QUESTION: How do I refresh a webkit display?  Say a website pane that displays the weather.
<seg|ars> The WebView has a reload method that you can use to get it to refresh the current contents
<seg|ars> If you wanted to do it on an interval, you would use something like gtk.timeout_add
<seg|ars> and then you could just call the refresh every time the timeout hits
<seg|ars> If you are setting the HTML yourself, refreshing will cause the contents to disappear
<seg|ars> so if you are using your own html, you just have to set the content with load_html_string every time you want to refresh it
<seg|ars> QUESTION: can you embed JS too? You mentioned JQuery, what about JS?
<seg|ars> Yes, it works just like JavaScript in a regular web page
<seg|ars> if you are generating your own html, you can include a script block that defines JavaScript functions
<seg|ars> you can also externally cause the WebView to run any arbitrary JavaScript code by using the "execute_script" method
<seg|ars> if you pass it javascript code in a string, it will just work
<seg|ars> You can seen an example of how I use JavaScript with Mako in the Gwibber navigation bar: http://bazaar.launchpad.net/~gwibber-committers/gwibber/trunk/annotate/head%3A/ui/templates/navigation.mako
<seg|ars> QUESTION: In Gwibber for example, how do you attach the latest content? Reload everything or you just add the new info to the end? Is the 2nd option possible?
<seg|ars> In Gwibber, we regenerate the entire stream. We do that primarily because we need to update the timestamps in addition to adding new messages
<seg|ars> if you wanted to just add a new bit of content at the top, for example, you could actually do that with javascript
<seg|ars> in the very early days of gwibber, we would take the message data and convert it into a json string which was then passed to a JavaScript function in the HTML
<seg|ars> the JavaScript function would process the json, generate the HTML for the message blocks, and then inject that directly into the page
<seg|ars> That approach proved to be a bit difficult and slow with highly complex data, but I think it would probably work better now
<seg|ars> WebKitGtk+ was quite brittle a few years ago when I first started using it
<seg|ars> it's a lot more robust today and it's javascript handling is more reliable
<seg|ars> QUESTION: Since all these frameworks are undergoing rapid development, how do I keep my new application from breaking in a month?
<seg|ars> that can be very difficult. One of the biggest problems we have had in Gwibber is that WebKitGtk+ is a moving target and different versions render things in slightly different ways
<seg|ars> if you are going to be targeting a wide range of distros including some with very old webkit, you will need to keep the html VERY simple and avoid using scripting
<seg|ars> it has stabilized a lot, so it's not as much of a problem as it used to be
* ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - http://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi
<Edwin_ACH> hi jcastro do you know if there is exist a irc log about past classes?
<ausimage> yes
<ausimage> there are linked from the schedule
<Edwin_ACH> thanx ausimage!! Where can I find them?
<ausimage> https://wiki.ubuntu.com/UbuntuOpportunisticDeveloperWeek
<ausimage> click on the session and it takes you to a log
<Edwin_ACH> thank you ausimage!!! I have found them :)
<ausimage> cool
<Edwin_ACH> thank you for the links ausimage!!!
<ausimage> np
<Edwin_ACH> for people like you, Ubuntu is going on growing!!! :)
<Edwin_ACH> bye...
<ausimage> :D
#ubuntu-classroom 2010-03-06
<latino> good evening
<latino> can any1 help with installing video drivers
<zubin71> jcastro, hello, is there any way that there`d be a class on doing unittesting using python?
<Pendulum> zubin71: that's something you'd be interested in seeing in a class?
<zubin71> Pendulum, yes, im new to python programming.... And i came across this topic pretty recently...
<zubin71> we have a small OS community here...
<zubin71> we`d love to have classes on unit testing...
<zubin71> OSS*
<zubin71> typo
<zubin71> Pendulum, are you an ubuntu developer? python? If holding classes if difficult , it`d be great if there were at least some ubuntu community documentation...
<Pendulum> zubin71: I'm not, but I'm a member of the Ubuntu Classroom team :)
<Pendulum> so I'm bringing your suggestion back so we can look for an instructor :)
<zubin71> awesome! also, it`d be great if I could help by taking sessions on a subject in a couple of months... maybe on unittesting itself, if im comfortable with it in the near future... :)
<zubin71> Pendulum, well, c ya later! have a nice day!
* ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - http://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Event: Ubuntu Opportunistic Developer Week - Current Session: Using GTK+ signals in Python - Sense Hofstede - Instructor: qense || Questions in #ubuntu-classroom-chat
<qense> Hello everyone!
<qense> This session I will be talking about GTK+ signals.
<qense> Signals aren't specific to GTK+, but opportunistic programmers will deal mostly with GTK+ signals.
<qense> What are signals?
<qense> Signals are a nifty way of allowing an application or library to respond to certain events.
<qense> Signals are emitted at all sorts of events, so you can listen to almost anything if you know where to look.
<qense> I assume that most of you are using Python, so I'll be mainly using Python examples.
<qense> However, since the PyGTK library is generated from the C GTK+ library it is not that different.
<qense> Object.connect("signal-name", callback_function) is equal to g_signal_connect(signal_owner, "signal-name", G_CALLBACK (callback_function))
<qense> A really good source of information is http://www.pygtk.org/docs/pygtk/
<qense> This is the online documentation of PyGTK and you can find, amongst other things, all signals documented here.
<qense> It is important to keep in mind that most types in the GTK+ and GObject libraries are derived from other GTK+ and/or GObject types.
<qense> All types are derived from gobject.GObject
<qense> A type has got all signals it's derived from.
<qense> gobject.GObject has got only one signal 'notify'
<qense> However, that means that all GTK+ objects have got that signal as well.
<qense> The 'notify' signal is emitted whenever an property of the object is changed.
<qense> However, this doesn't have to mean the value of those properties has changed, it could have been that someone or something assigned the an identical value to a property
<qense> All GTK+ types are derived from gtk.Object (gtk.Object itself is derived from gobject.GObject)
<qense> gtk.Object has one signal as well: 'destroy'
<qense> This is emitted when the object is destroyed
<qense> You use this e.g. when constructing a window.
<qense> window = gtk.Window();
<qense> window.show();
<qense> window.connect("destroy", gtk.main_quit());
<qense> gtk_main();
<qense> Now, what did I write above?
<qense> First I created a new window, then I showed it and then I connected a callback function.
<qense> Whoops
<qense> I see I connected it wrongly.
<qense> This sure would have generated a bug.
<qense> It should have been
<qense>  window.connect("destroy", gtk.main_quit);
<qense> Without the parentheses.
<qense> What you do when connecting is first specifying the signal name, then you give the reference to the callback function.
<qense> However, if you add the parentheses you invoke the method.
<qense> As you can see I connected a method from a library: gtk.main_quit()
<qense> That method ends the GTK+ loop.
<qense> If you wouldn't connect this to a destroy signal you would have to forcefully quit the application in order for the GTK+ main loop to end.
<qense> You can also specify locally defined methods as callback functions.
<qense> Any questions about the working of GTK+ signals, or about what I've told so far?
<ClassBot> ryzrecreel asked: So the callback function can be the method of another object?
<qense> ryzrecreel: Yes, the callback can be any valid method. When connecting signals from inside a class you could e.g. also specify "self.my_wonderful_callback" method as the callback function.
<qense> However, you can't assign MyClass.my_callback as the callback function, you need to pass the method of an instance.
<qense> OK, lets talk a bit more about the callback function.
<qense> Because when a signal is emitted and your well-crafted callback function is called you want to know something more about what happened.
<qense> For that a series of arguments are sent to the callback function.
<qense> You need to make sure that it can accept those arguments.
<qense> Most of those callback functions look the same.
<qense> This is what the PyGTK documentation says the callback function for the 'notify' signal should look like:
<qense> def callback(gobject, property_spec, user_param1, ...)
<qense> If you're defining the callback as a member of a class make sure you add an extra 'self' argument to the beginning
<qense> the first argument of the callback function is 'gobject', but of course you can change the names in your own code.
<qense> 'gobject' is the GObject that changed and therefore emitted the notify signal
<qense> Most of the times you know what object you're getting since you specifically connected your callback to it, but this can be useful when you're connected to multiple objects.
<qense> But mostly it's very useful to have a reference to the object by hand
<qense> the second argument is 'property_spec'
<qense> It provides information about the property that changed so you can access it if you would want  to.
<qense> The last is user data; when connecting to a signal you can provide extra userdata as extra arguments at the end of the function.
<qense> You'd do this:
<qense> window.connect("destroy", gtk.main_quit, "test-window", 123);
<qense> and the last two arguments would be the last two arguments for the callback function
<ClassBot> lsteeger asked: What happens if the object used for the callback function in 'connect' call is destroyed before the event occurs?
<qense> lsteeger: If you didn't disconnect the callback function first you will get an error.
<qense> When you connect to a signal using the .connect() function the connect() function returns a handler id.
<qense> You can pass that handler id as the sole argument for .disconnect() for disconnecting from the signal.
<qense> Naturally, when you remove the object you connected to the callbacks are disconnected automatically.
<qense> There are a few very interesting signals.
<qense> gtk.Widget has the most, which means all GtkWidgets have got them.
<qense> To give you an idea of what you can do with GTK+: all you see happening on screen is mostly done with publicly accessible signals and methods.
<qense> There is a 'show' signal that is emitted when the show() method is called.
<qense> There is a 'show-help' signal that is emitted when the user presses Ctrl+F1 on his or her keyboard.
<qense> An interesting signal is "enter-notify-event", which is emitted whenever a mousebutton enters the widget.
<qense> It is used by many widgets like buttons.
<ClassBot> lsteeger asked: If I extend a widget, can I define 'new' signals of my own?
<qense> lsteeger: Excellent question!
<qense> Yes you can, it is exactly what all widgets are doing.
<qense> You do that with the "gobject.signal_new()" function since actually signals are provided by GObject.
<qense> Lets paste the function from the documentation:
<qense> def gobject.signal_new(signal_name, type, flags, return_type, param_types)
<qense> The first argument is the name you give to the signal.
<qense> This has to be a unique name.
<qense> The second is the object (type) you're adding the signal to.
<qense> If you want to add a signal to myproject.MyWidget you write myproject.MyWidget there, without quotation marks.
<qense> The third argument is an interesting one: there you provide flags.
<qense> it goes a bit too far to explain them all, but you can make the signals do more than what I showed with the 'destroyed' signal.
<qense> most of the times you provide something like gobject.SIGNAL_RUN_LAST as the flag.
<qense> It has got something to do with when you emit the signal.
<qense> If you want to provide multiple flags you use |  to separate them
<qense> The next argument is the return type of your callback function, which could be something like gobject.TYPE_STRING or gobject.TYPE_NONE if your callback doesn't return anything at all.
<qense> The last argument is a tuple of types of the arguments passed to the callback.
<qense> e.g. (myproject.MyWidget, gobject.TYPE_BOOL)
<qense> You're not finished with just defining a signal, you'll also want to emit it something.
<qense> somehwere
<qense> You do that with gobject.emit() method.
<qense> The first argument is the signal name
<qense> The others are the arguments that are sent to the callback
<qense> If you want to emit a signal inside your MyWidget class you call self.emit()
<ClassBot> lsteeger asked: With multiple subscribers to an object's events, does the emit() infrastructure apply a hierarchy to their invocation?
<qense> lsteeger: Yes it does, the first callback that is connected to a signal is the first to be called.
<qense> you can use the . stop_emission(signal_name) method to stop the emission, if you wanted to.
<qense> lsteeger: yes, First In, First Out indeed
<qense> However, the default signal handler is always at the end of the list.
<qense> You'll have to use the .connect_after() method to be added after that callback.
<qense> Default signal handlere? What is that?
<qense> It is the default signal handler, and it's always called.
<qense> If it's specified, of course.
<qense> You can do that by creating a function in a class with the name "do_signal_name"
<qense> If you want to override default signal handlers, make sure you add __gtype_name__ = "MyWidget" as a class property
<qense> class MyWidget (gtk.Widget):
<qense>     __gtype_name__ = "MyWidget"
<qense> Any questions about what I've told this session?
<qense> Or other questions?
<qense> Remember, if you want to learn what signals there are, go to http://www.pygtk.org/docs/pygtk/ and take a look at the page of the widget you want to know more about.
<ClassBot> ryzrecreel asked: when using quickly with glade the connects are made for you. Is there any way to over ride that?
<qense> ryzrecreel: In the generated code you can see that the signals are connected using .connect_object()
<qense> That means it searches for the callback functions in the object you provide.
<qense> The callback functions are provided in Galde
<qense> Glade
<qense> you can change those there.
* ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - http://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi
<qense> <lsteeger> QUESTION: In a multi-core/processor environment, do multiple event handlers get invoked asynchrounously?
<qense> lsteeger: That doesn't depend on multi-threading, signal handlers don't get handled asynchronously, but one by one.
<qense> OK, thank you for listening, this was all!
<qense> This also was the last session of the Ubuntu Opportunistic Developer Week
<qense> I hope you enjoyed it.
#ubuntu-classroom 2010-03-07
<InHisName> c/ear
#ubuntu-classroom 2011-02-28
<root_>  
<root_> q
<thetechfreak> Hello Guys !'
<thetechfreak> will something happen ?
<thetechfreak> or else i am off !
<AbhijiT> thetechfreak, see the timetable
<rsajdok> thetechfreak: http://people.ubuntu.com/~nhandler/classroom.html
<thetechfreak> AbhijiT:  anything started ?
<AbhijiT> no
<thetechfreak> Hmmm.. I'll return in an hour.Have some work
<thetechfreak> Bye
<thetechfreak> BTW who's going to conduct it ?
<thetechfreak> any head or something like that ??
<bluepicaso> hey people
<bluepicaso> I'm new here
<bluepicaso> Good evening to everyone
<bluepicaso> ??
<abhi> QUESTION
<Nitesh> hi
<hemanth> Nitesh, hi!
<Fvic> can anyone tell me where to find new bugs to triage.i wish to start bug triaging but always find already triaged bugs
<wolfpack> Fvic: All the untiaged bugs can be found through this link . https://launchpad.net/ubuntu/+bugs?field.searchtext=&orderby=-datecreated&field.status%3Alist=New&field.importance%3Alist=Undecided&assignee_option=none&field.assignee=&field.owner=&field.component=1&field.component=2&field.component-empty-marker=1&field.omit_dupes.used=&field.omit_dupes=on&field.has_patch.used=&field.has_no_package.used=&search=Search
<wolfpack> untriaged*
<techbreak> hello everybody.. :)
<leoquant> hi!
<Fvic> wolfpack, sir i was trying to triage one of the bug from your link.can you please help in that.Further i can proceed myself.i dont know how to comment to that bug.
<Fvic> techbreak, hi
<techbreak> Fvic, so how long to start the developers week ?
<Fvic> techbreak, i am abeginner in it
<tumbleweed> techbreak: 2 hours, I guess. Start time is 16:00 UTC
<Fvic> techbreak, 16.00 utc
<techbreak> Fvic, tumbleweed how much time lag or lead UTC with greenwich time. I am in India :/
<Fvic> techbreak, 21.30 india
<techbreak> Fvic, thanks :)
<Fvic> can anyone help in bug triaging,i am new to this domaini.??plz
<jdobrien> Fvic, this may help: https://wiki.ubuntu.com/Bugs/HowToTriage
<imag1> test
<Fvic> what does apport-collect do?
<akshatj> Fvic: https://wiki.ubuntu.com/Apport#Tools
<acarpine> I thought this channel was used only for tuition ubuntu classroom...
<techbreak> rhohit, _
<fisch246> is ubuntu dev week about to start in less than an hour?
<techbreak> fisch246, yeah indeed :)
<fisch246> good i read the schedule right :)
<techbreak> fisch246, :)
<rhohit> techbreak hello
<techbreak> rhohit, :) gotcha
<techbreak> rhohit, welcome :)
<nilesh> I guess I'm late. Everything is over :(
<joaopinto> nilesh, did not start yet
<nilesh> joaopinto: running late?
<joaopinto> no, it's still Seg Fev 28 15:28:49 UTC 2011, isn't it scheduled for 16h ?
<stefwal> yes it is
<joaopinto> so it's on time :)
<nilesh> hmm, I guess I didn't read the time properly on the fb event
<nilesh> anyways
<hemanth> nilesh, date -u, it's at UTC 5pm
<stefwal> but i think that the ubuntu-classroom-chat is for discussion
<stefwal> this one is for the teacher
<maco> yep
 * hemanth this room will be muted as the class starts 
 * nilesh has a bad luck. has to get up early tomorrow, so can't be at 11 pm IST here :(
<hemanth> nilesh, you will always have the logs to read :)
<Will123456> hey guys. am i right in saying the session is going to start in about 20 minutes? or is my understanding of UTC way off?
<gartral> is anyone allowed too watch/participate?
<dholbach> Will123456, yes, 20 minutes
<dholbach> gartral, yes, everyone can watch
<cyril> Will123456: you're right, but you should joing #ubuntu-classroom-chat to talk about it :p
<saket> Will123456, yes , the session will start in 20 min
<Will123456> cyril: just noticed that - sorry. :P teach me to type before thinking. thanks everyone.
<saket> will te session be involving video?
<dholbach> saket: no, text only
<saket> dholbach, hmm, okay
<dholbach> saket: but you can sign up here for a development videocast I do: http://www.ustream.tv/channel/ubuntu-development-with-daniel-holbach
<saket> dholbach, okay
<techbreak> so how more minutes to go ?
<dholbach> techbreak, 5
<awsominator> Hello
<techbreak> dholbach, :)
<MeanEYE> you shouldn't talk here... go to #ubuntu-classroom-chat
<akshatj> awsominator, join #ubuntu-classroom-chat
<Kroosec> I would like to know, do I need something specific to Ubuntu/Linux for this session ? Or can I just follow from Windows ?
<MeanEYE> you can follow
<steinex> if you use irssi, you might want to: /ignore -channels #ubuntu-classroom * JOINS PARTS QUITS NICKS
<altmas5> doesn't work in pidgin steinex
<awsominator> steinex: I was jsut owndering how to do that, the command didn't work though
<steinex> it just works in the irc-client irssi
<awsominator> Ah yeah got it
<steinex> i don't know for other clients, sorry
<awsominator> thanks
<dholbach> HELLO MY FRIENDS!!!
<c2tarun> hello dholbach
<AbhijiT> hi
<MTecknology> howdy
<dholbach> It's Ubuntu Developer Week and it's starting RIGHT NOW!
<saket> hi
<awsominator> Start
<techbreak> dholbach, :) start
<acarpine> hello!
<dholbach> ok, so first things first
<monish001> hello!
<dholbach> can all kinds of chat and questions please please please (with sugar on top) go to #ubuntu-classroom-chat please?
<dholbach> if you haven't joined that channel yet, can you please do that now?
<mkumar> hello !
<dholbach> to review the schedule and get more information about the sessions, check out https://wiki.ubuntu.com/UbuntuDeveloperWeek
<dholbach> that's the only page you need to bookmark for now :)
<dholbach> excellent, let's get started
<dholbach> if you have any kinds of questions, please ask in #ubuntu-classroom-chat
<dholbach> and please make sure you prefix it with QUESTION:
<dholbach> ie: "QUESTION: What is your dog's name?"
<dholbach> etc
<dholbach> it makes it easier to figure out what exactly the question is :)
<dholbach> first of all I'd like to thank all speakers - we have a pretty divserse schedule and it's going to be an awesome week
<ClassBot> Logs for this session will be available at http://irclogs.ubuntu.com/2011/02/28/%23ubuntu-classroom.html following the conclusion of the session.
<dholbach> my name is Daniel Holbach, I live in Berlin and have been part of the Ubuntu Community for ~6 years
<dholbach> my primary interest is and always was the developer community
<dholbach> so it's my honour today to talk about "getting started with Ubuntu Development" and you'll be stuck with me for the next 2 hours :)
<dholbach> in the first hour I'd like to give you a very broad overview of Ubuntu development, Ubuntu's infrastructure, give you an idea of our processes, how we interact with other projects, etc.
<dholbach> I won't answer all the questions you have, but I hope I can give you an idea how all the bits and pieces fit together
<dholbach> in the second hour I'll help you get your development environment set up
<dholbach> so for the rest of the week you should be all set up and ready to go
<dholbach> do we have any first questions already?
<dholbach> (if not, I'd say we get cracking now :-D)
<dholbach> <20QAAV4RZ> QUESTION: I'm a total newbie with lernid - do I need to hear something or is all done via chats?
<dholbach> 20QAAV4RZ, yes, it will be done all via chat - some of the sessions will be more tutorial style, so you might have to do a few things in the terminal
<dholbach> ok, let's get cracking :)
<dholbach> as you all know Ubuntu is made of thousands of packages
<dholbach> libraries, tools, apps, games, etc
<dholbach> they're written in many different languages, and they're all available as source packages
<dholbach> a source package typically consists of the actual source code and some meta-data
<dholbach> every single change that gets made (be it just a small fix or a new version, etc.) requires an upload to the build machines (part of Launchpad), where the source package gets transformed into binary packages (.deb packages)
<dholbach> <susenj> QUESTION: i am using pidgin..not lernid..is it okay??
<dholbach> susenj, yes, totally
<dholbach> <gartral> QUESTION: will multiple shells be covered?
<dholbach> gartral, it shouldn't really matter which shell you're using
<mauriciocinelli> how to see video?
<dholbach> ok, once the .deb files (binary packages) are available, they are pushed to various mirrors
<dholbach> and they're also used to build CDs of all kinds of Ubuntu flavours (Ubuntu server, Kubuntu, Ubuntu Desktop, etc.)
<dholbach> so no matter if you use Kubuntu or Ubuntu or Xubuntu or anything else... all the changes are uploaded to the same build machines and are part of the same archive
<dholbach> <Kroosec> QUESTION: Do I need to be on Ubuntu for this session ?
<dholbach> Kroosec, no, not necessarily - later on for the tutorials probably
<dholbach> <raju> QUESTION: was session started ?
<dholbach> raju, yes - if you missed the start there will be logs on https://wiki.ubuntu.com/UbuntuDeveloperWeek later on
<dholbach> the CDs are mostly built every single day, so that's what we use for installation tests, etc.
<dholbach> <middle> QUESTION: WIll there be a formal QnA later on? I want to ask questions but not interrrupt you
<dholbach> manish raju: you dont put that
<dholbach> middle: please just ask - I'll decide myself when I take a small break to answer a couple of questions :)
<dholbach> ok, so much for the Ubuntu archive, packages and how they're built
<dholbach> let me talk a bit about the Ubuntu release cycle
<dholbach> what Ubuntu developers focus on heavily depends on the release schedule
<dholbach> as you know Ubuntu is released every 6 months, and to able to deliver on the exact date, we need to stick to the dates in the schedule
<dholbach> if you want to see the schedule for the current development release,  check out https://wiki.ubuntu.com/NattyReleaseSchedule
<dholbach> if you don't have problems with seeing colours, you see that there's green at the start and red at the end
<dholbach> "green" does NOT mean: "it's all working, it's all great"
<dholbach> it rather means "everything goes, you can upload whatever changes you want/need" :)
<dholbach> towards the end of the release cycle we introduce more and more freeze dates, where the changes are becoming less and less intrusive
<dholbach> but let's go back to the beginning
<dholbach> first the toolchain (the most basic build-relevant packages) are set up, then we work on merging changes that have happened in Debian (and other software projects) since we got out the last release
<dholbach> then there's Ubuntu Developer Summit (UDS), which I'll talk about a bit later - for now it should be enough to say that it's where the features of the release are defined and agreed on
<dholbach> Debian Import Freeze is the first freeze date that appears in the list - it's where we stop to automatically "sync" source packages from Debian
<dholbach> this is done as a measure to start to stabilise the code in Ubuntu, but can be overriden in warranted cases
<dholbach> next up is Feature Freeze, where we expect big parts of features to be landed
<dholbach> if they still have bugs, that's fine, but if they're not there in rudimentary form, then that's a problem and we might consider to postpone them to the next release
<dholbach> Feature Freeze is also the date where try to slow down introducing new versions of packages (again: in order to stabilise, and yes there might be warranted cases where we want to override)
<dholbach> from Feature Freeze on, we introduce more and more other freezes, UI, Docs, Kernel, etc etc
<dholbach> this is done, so that we focus on show stopper bugs and don't introduce any big changes any more and bring Ubuntu in a releasable form :)
<dholbach> April 28th is the date we're aiming for this release and I'm quite sure that that's where we'll get the release out :)
<dholbach> <udienz> Question: How long someone can be a MOTU? 6 month from first upload or depends on how much uploaded or depends from recommendations?
<dholbach> udienz, to become an Ubuntu developer I'd prefer not to give and concrete number of weeks/months
<dholbach> I personally feel that if you gained the trust of other developers you've worked with (more on the topic later on), you're ready
<dholbach> ok, so much for the release schedule for now :)
<dholbach> but I guess you got a better idea now why it makes more sense to upload a rewrite of a piece of software EARLY in the cycle, and not 5 days before release :)
<dholbach> etc :)
<dholbach> and you can also imagine now that with thousands of packages, millions of lines of code, hundreds of project and hundreds of developers communication/coordination is very important
<dholbach> <monish001> QUESTION: How would developer's code get into the main ubuntu code? Which tools are used for development and commits, how these commits are tested by others for authentication?
<dholbach> monish001, I'll get to that in a bit
<dholbach>  <hugohirsch> QUESTION (later): I find a bug in a gnome package, checked out the sources, discovered that the bugfix merely is a 'remove commented out line in sources' - how do I get this into Ubuntu?
<dholbach>  hugohirsch: I'll get to that in a few minutes as well :)
<dholbach> I touched on UDS (Ubuntu Developer Summit) a bit earlier on already
<dholbach> it's where hundreds of people get together in one location and for one week discuss all kinds of problems they want to solve in the next cycle
<dholbach> the great thing is, if you can't be there physically, you can attend remote (talk on IRC and listen in via audiocast)
<dholbach> the outcomes of the sessions are written up as specifications, so all the ideas, assumptions, rationale and action plan is recorded publicly and others can involved helping to solve those problems
<dholbach> while this works well for "big picture" things, there are loads of day-to-day decisions that are made on mailing lists (ubuntu-devel@lists.u.c for example) or on IRC channels, such as #ubuntu-devel
<dholbach> of course if there's a specific software project that interests you that is outside of Ubuntu, you might want to be on the project's mailing list and IRC channel as well
<dholbach> another important medium for discussion and coordination is bug reports
<dholbach> you can find all of Ubuntu's bugs at https://bugs.launchpad.net/ubuntu
<dholbach> it makes it much easier to stay on top of what needs to be fixed if you're subscribed to a specific package's bugs, talk to its authors, etc
<dholbach> we also make deliberate use of bug statuses, tags and assignee fields to track what's in progress and who's working on it
<dholbach> <hugohirsch> QUESTION: What's the 'process' model of Canonical/Ubuntu? Scrum? XP? How are you guys managed/tracked?
<dholbach> hugohirsch, first you need to distinguish between Canonical and Ubuntu - Canonical's engineers are part of the Ubuntu community as is everyone else
<dholbach> there are a lot of software projects that originate in the Ubuntu world and they make use of whatever release management they like best
<dholbach> there is the Kanban approach in Launchpad for example, there is others that "release when it's ready"
<dholbach> there's others who have regular meetings, etc. - there's a huge variety
<dholbach> I mentioned it before already... we rely on a lot of other software projects
<dholbach> not all the code that is shipped in Ubuntu is written by Ubuntu developers
<dholbach> projects that release code which we integrate into Ubuntu are called "upstream projects" or short "upstreams"
<dholbach> it's critically important to us to have a great relationship to all of these
<dholbach> we need to talk about timeframe of releases, pass on information about bug reports, pass on code changes, etc
<dholbach> one of the most important Upstream projects for us is Debian (luckily, there'll be dedicated session about Debian later in the week)
<dholbach> Debian is a distribution itself and we inherit a lot of changes immediately from Debian
<dholbach> also were most of the technical decisions made in (or in conjuction with) Debian too
<dholbach> so there's package maintainers or package maintenance teams in Debian, with whom it's very interesting to have a conversation if you plan changes or want to coordinate work
<dholbach> (as I said earlier: there'll be a session about that later in the week - YES!)
<dholbach> <wolfpack> QUESTION: on Which Irc channel can I get help on develoment related question/problems?
<dholbach> wolfpack, #ubuntu-motu on irc.freenode.net should be a good start
<dholbach> ok... some of you wanted to know earlier already... how do I get my changes into Ubuntu
<dholbach> so let's talk about that now
<dholbach> it's not daunting at all and it's very rewarding - not only because you learn something new every single time (at least I did), but also because you fix problems for millions of users out there
<dholbach> because new contributors can't immediately upload to the build machines themselves (we use GPG to track who uploaded changes, etc.), they need somebody who reviews their changes first and uploads for them
<dholbach> and that's a great way to learn, as you interact with loads of different people and they all might teach you something new
<dholbach> and also you make loads of great friends
<dholbach> barry will later on talk about Ubuntu Distributed Development, so explaining the exact process of how to branch a source package, how to submit changes, etc.
<dholbach> so I won't steal his thunder by going into technical details :)
<dholbach> basically: you get the source, you make your changes, you test build the code, test it, push it for review, get it reviewed and uploaded - BUG FIXED :)
<dholbach> <hugohirsch> QUESTION: Do I need to choose a reviewer or is a reviewer assigned via Launchpad automatically?
<dholbach> hugohirsch, you don't have to choose
<dholbach> sorry
<dholbach> fell out of the internet for a second :)
<dholbach> hugohirsch, naturally if somebody has their special area of expertise with some package, you might talk to them over and over again :)
<dholbach> <mauriciocinelli> QUESTION: What languages are used for Ubuntu Development?
<dholbach> mauriciocinelli, all kinds: C, C++, Python, Perl, Java, Mono, Vala, etc etc etc.
<dholbach> the good thing is: you don't need to know "all of them" to get started
<dholbach> you can easily lay back, take it easy, fix a few simple and obvious bugs first and take it from there
<dholbach> and as I said a couple of times already: you learn more and more over time
<dholbach> <abcd87> QUESTION: how to customize the bootloader?
<dholbach> abcd87, I'm afraid I don't know - if you elaborate on your question, you might find somebody who's cleverer than me in #ubuntu-devel :)
<dholbach> I really like mauriciocinelli's question, so I'll talk about that a little bit more
<dholbach> if you ask me it's not so much about knowing n+1 programming languages already
<dholbach> it's about having a knack for making things work again
<dholbach> it's about doing some detective work
<dholbach> it's about being a team player
<dholbach> it's about not being afraid of reading documentation
<dholbach> it's about not being afraid of asking a few (seemingly) stupid questions
<dholbach> if you answered "Yes" more often than "no" to the points above, you should fit right in
<dholbach> detective work also involves talking to upstreams and people from other distributions, coordinating with them - sometimes a fix for a specific issue might be available already and you just need to get it into Ubuntu as well
<dholbach> <MeanEYE> QUESTION: Are you considering using Go (Google's language) at one point since it's designed for OS/service development
<dholbach> MeanEYE, I don't know how many packages already make use of it
<dholbach> but I'm sure it will get considered if there's demand for it
<dholbach> Ok... with that I suggest we take a 5 minute break before I help you get started and get your development environment set up
<dholbach> so get yourself a coffee or tea or glass of water and I'll see you in 5 minutes
<dholbach> ok... we're back for part 2 of "getting started with ubuntu development"
<dholbach> for those of you who came late... don't worry - we'll put up logs of all sessions up at https://wiki.ubuntu.com/UbuntuDeveloperWeek later
<dholbach> also, if you want to chat, ask questions and all the rest of it, please head to #ubuntu-classroom-chat
<dholbach> and prefix questions with QUESTION
<dholbach> <jack002> QUESTION: What about for people that don't know any programming language? How can they help with development process? Translations, reporting bugs, testing the code, discussing in the brainstorm. Is there more? Any web page?
<dholbach> jack002, you can do all of what you mentioned, but you can also try to fix small and obvious bugs - don't hesitate :)
<dholbach> <middle> QUESTION: What do yo uthink hte best route froa student currently studying A-levels woulkd be to get intot eh wolrd of open source software development?
<dholbach> middle: yes, I think it's a great choice to get involved in Ubuntu development - you'll learn loads because you basically touch all parts of an operating system - it's a fun experience and will help you figure out what you really enjoy doing
<dholbach> <darkdevil56> QUESTION:  James Gosling resigns from sun/oracle and now oracle wont provide support for J2SE n J2M. will this affect ubuntu packaging in java?
<dholbach>  *J2ME
<dholbach> darkdevil56, I'm not a Java hacker, so I don't know - I personally haven't heard of any big concerns in the open source community yet though
<dholbach> <qayshp> QUESTION: will ubuntu/canonical be taking part in the Google Summer of Code this year?
<dholbach> qayshp, Ubuntu will definitely apply as a mentoring organisation - the decision will be with Google though :)
<dholbach> alrightie
<dholbach> that's all the outstanding questions from part 1 as far as I could see
<dholbach> in part 2 I'll help you get your ubuntu development environment set up
<dholbach> you will need reasonably fast internet for this, so if things take longer for you, don't despair - take it easy and just open a second terminal and continue with other steps in the meantime
<dholbach> also there might be some steps involved that you already did on your own some time ago - feel free to skip those
<dholbach> (ie: you set up a GPG key already - you don't need two :-))
<dholbach> alrightie
<dholbach> let's get cracking :-D
<dholbach> in a terminal, please run this command
<dholbach>   sudo apt-get install gnupg pbuilder ubuntu-dev-tools bzr-builddeb
<dholbach> while it runs and installs a few packages, I'll talk a bit more about what we're doing here
<dholbach> once we're done with this session,
<dholbach>  - you have all the tools to do Ubuntu development installed on your machine
<dholbach>  - your local developer tools know about you, which simplifies work a lot
<dholbach>  - you can do local builds of packages
<dholbach>  - you can interact with other developers and propose your changes on Launchpad to get merged
<dholbach>  - you can upload packages to Launchpad, so they are hosted in your Personal Package Archive (PPA)
<dholbach> another word of advise: if you do Ubuntu development, it's incredibly helpful to run the current development release
<dholbach> we all know that from time to time the current development release is quite broken, so it's obvious that you might not want to run it as your one and only Ubuntu system
<dholbach> https://wiki.ubuntu.com/UsingDevelopmentReleases explains how you can easily and safely use the development release
<dholbach> (you don't need to do that now)
<dholbach> <hugohirsch> QUESTION: If I have a private GPG-key and one for ubuntu development. What do you recommend? Work as a separate user with the ubuntu-GPG-key or is there an easy way to switch between keys when working on ubuntu-stuff on the console ?
<dholbach> hugohirsch, you can easily specify whichever one you want to use
<dholbach> <fisch246> QUESTION: did you mean to say PGP, instead of GPG?
<dholbach> fisch246, I meant to say GPG (GNU Privacy Guard), which implements the OpenPGP standard
<dholbach> <mauriciocinelli> QUESTION: During install it asks general type of mail configuration?
<dholbach> mauriciocinelli, sorry about that - you can also run the install command with "--no-install-recommends" if you want to avoid the mail configuration
<dholbach> <stefwal82> QUESTION: how is the gpgkey introduced in the mended package
<dholbach> stefwal82, I don't understand the question
<dholbach> <darkdevil56> QUESTION: what's postfix config?
<dholbach> darkdevil56, you can also run the install command with "--no-install-recommends" if you want to avoid the mail configuration
<dholbach> ok.. let's see what kind of packages we're installing right now.......
<dholbach> there's:
<dholbach>  - gnupg which you will need to create a GPG key with which you will sign files you want to upload to Launchpad
<dholbach>  - pbuilder which is a great tool to do a reproducible build of a package in a clean and isolated environment
<dholbach>  - ubuntu-dev-tools (and devscripts, a direct dependency) which provide you with a collection of tools that make a lot of packaging tasks a lot easier
<dholbach>  - and there's bzr-builddeb (and bzr, a dependency) which will get you set up for working in the distributed development environment, that makes it easy for many developers to collaborate and work on the same code while keeping it trivial to merge each others work
<dholbach> A few people seem to have problems downloading packages - if you hit any problems, please head to #ubuntu-classroom-chat - there's people who are going to help you out.
<dholbach> ok... let's talk about gpg (GnuPG) first
<dholbach> it is important that you can sign files with your key, so they can be identified as something that you worked on
<dholbach> if you upload a source package to Launchpad, it will only accept the package if it can tell who uploaded the package
<dholbach> If you don't have a GPG key yet, please run this command in a terminal:
<dholbach>   gpg --key-gen
<dholbach> GnuPG will first ask you which kind of key you want to generate. Choosing the default (RSA and DSA) is fine.
<dholbach> Next it will ask you about the keysize. The default (currently 2048) is fine, but 4096 is more secure.
<dholbach> Afterwards it will ask you if you want it to expire the key at some stage. It is safe to say â0â, which means the key will never expire.
<dholbach> The last questions will be about your name and email address. Just pick the ones you are going to use for Ubuntu development here, you can add additional email addresses later on.
<dholbach> <middle> QUESTION: gpg --key-gen
<dholbach> middle: sorry, my mistake
<dholbach> it's:
<dholbach>   gpg --gen-key
<dholbach> once you're done with the questions it asked, there'll be also one about a "comment"
<dholbach> Adding a comment is not necessary.
<dholbach> Then you will have to set a passphrase. Choose a safe one.
<dholbach> Now GnuPG will create a key for you, which can take a little bit of time, as it needs random bytes, so if you give the system some work to do it will be just fine.
<dholbach> just keep it sitting there and do its work - if it takes very long, open another terminal :)
<dholbach> the next step will be to generate a SSH key
<dholbach> SSH is a network protocol that allows you to exchange data in a secure way over the network. In a lot of cases you will use it to access and open a shell on another machine. It is also very useful to transfer files in a secure way.
<dholbach> if you don't have an SSH key yet, just run
<dholbach>   ssh-keygen -t rsa
<dholbach> The default filename makes sense, you can just leave it as it is. Also you can choose to use a passphrase or not.
<dholbach> We will use the SSH key to securely push code changes to Launchpad.
<dholbach> next we'll set up pbuilder
<dholbach> pbuilder allows you to build packages locally on your machine. It serves a couple of purposes:
<dholbach>  - the build will be done in a minimal and clean environment, where you can see if it succeeds in a reproducible way (with no modifications of the local system
<dholbach>  - there is no need to install all necessary build-dependencies locally
<dholbach>  - you can set up multiple instances for various Ubuntu and Debian releases
<dholbach> <gartral|watcher> QUESTION: why should communications be secured with RSA instead of AES?
<dholbach> gartral|watcher, I'm afraid I don't know the answer to that question - it's what we use... you might get a more elaborate answer on #ubuntu-devel though :)
<dholbach> <wolfpack> QUESTION: Does pushing code neccesary nedds ssh connection? As I am working university network proxy and can make connection through http only.
<dholbach> wolfpack, that might be a problem then - the nice people in #launchpad might give you an alternative option
<dholbach> <abhinav51> QUESTION: I already have ssh keys set up (I created them for use with github). Do I need to regenerate ?
<dholbach> abhinav51, no, not necessary
<dholbach> Setting pbuilder up is very easy. Edit ~/.pbuilderrc and add the following line to it:
<dholbach> COMPONENTS="main universe multiverse restricted"
<dholbach> and save the file
<dholbach> This will ensure that build-dependencies are satisfied using all components.
<dholbach> then run:
<dholbach>   pbuilder-dist natty create
<dholbach> This will take a while as it will download all the necessary packages for a âminimal installationâ. These will be cached though.
<dholbach> the great thing about pbuilder-dist is, that you can also set up build environments for other Ubuntu (or Debian) releases
<dholbach> (just replace "natty" with whatever else you need)
<dholbach> <gartral|watcher> QUESTION: more of an extension of the previous question, but, will launchpad accept keys larger than 2048 bits?
<dholbach> gartral|watcher, I could very well imagine that yes they do, but you might want to ask that question in #launchpad too :)
<dholbach> (sorry :))
<dholbach> <cire831> QUESTION: you specify natty on the pbuilder-dist cmd line,   does it matter that I'm running on a lucid box?
<dholbach> cire831, no, it should still work :)
<dholbach> <middle> QUESTION: I htink some of your commands are off, there was nothing in the file that we added the line to ans nuilder-dist wasn#'t found =s
<dholbach> middle: if ~/.pbuilderrc was empty, that's totally fine
<dholbach> <maco> QUESTION:  will pbuilder-dist be upstreamed to Debian? I was surprised to learn that it's in ubuntu-dev-tools rather than devscripts
<dholbach> maco, it'd be great to see it in Debian too - if you want to propose it for devscripts, please go ahead and do it :)
<dholbach> maco, you of all people should know how to get that done :-D
<dholbach> <hugohirsch> QUESTION: Is there a way to make pbuilder use more than one core on a multicore machine?
<dholbach> hugohirsch, I would think so - can somebody confirm in #ubuntu-devel? :)
<dholbach> <mainerror> QUESTION: There is no ..pbuilderrc in my home directory
<dholbach> mainerror, that's fine - just create it
<dholbach> <gmargo3> QUESTION: Must pbuilder-dist be run as root?  Or does it use a fakeroot behind the scenes?
<dholbach> gmargo3, the reason why pbuilder-dist (via pbuilder) uses root is that it uses chroot internally
<dholbach> <cire831> QUESTION: where is it putting the natty files?
<dholbach> cire831, ~/pbuilder
<dholbach> <monish001> QUESTION: In  ~/.pbuilderrc  , which directory does ~ means?
<dholbach> monish001, your home folder
<dholbach> alright, let's crack on :)
<dholbach> next we'll teach Bazaar about yourself
<dholbach> Bazaar is the tool we use to store code changes in a logical way, to exchange proposed changes and merge them, even if development is done concurrently.
<dholbach> Simply run:
<dholbach>   bzr whoami "Frank Chu <fchu@example.com>"
<dholbach>   bzr launchpad-login fchu
<dholbach> (please, if your name is not "Frank Chu", replace with your own name, thanks)
<dholbach> if you don't have a launchpad account yet, you can get it if you sign up at https://launchpad.net/+login
<dholbach> (and do that step later on)
<dholbach> if you have launchpad account, your launchpad id is whatever is after "~" in the URL that https://launchpad.net/people/+me redirects you to
<dholbach> <middle> QUESTION: What do we do with our SSh key, can we jsut close the terminal as it is saved somewhere or do we need to write it down?
<dholbach> middle: yes, just close it - that's fine
<dholbach> ok, next we'll teach the development tools about ourselves
<dholbach> Edit ~/.bashrc (if you use a different shell use whatever configuration file it comes with)
<dholbach> and add something like this to the bottom:
<dholbach>   export DEBFULNAME="Frank Chu"
<dholbach>   export DEBEMAIL="fchu@example.com"
<dholbach> (again, please replace with whatever YOUR name and YOUR email is :))
<dholbach> afterwards save the file and run
<dholbach>   source ~/.bashrc
<dholbach> sorry, please make this DEBFULLNAME
<dholbach> (thanks sapphirepaw)
<dholbach> if you have a look back at the terminal where your gpg key was created, you might see a message like this:
<dholbach> pub   4096R/43CDE61D 2010-12-06
<dholbach>       Key fingerprint = 5C28 0144 FB08 91C0 2CF3  37AC 6F0B F90F 43CD E61D
<dholbach> uid                  Daniel Holbach <dh@mailempfang.de>
<dholbach> sub   4096R/51FBE68C 2010-12-06
<dholbach> in this case "43CDE61D" is my GPG ID
<dholbach> if you had a GPG key before, run this:
<dholbach>   gpg --fingerprint <email@address.com>
<dholbach> it should give you a similar output
<dholbach> once you know your gpg key id, you can run:
<dholbach>   gpg --send-keys <KEY ID>
<dholbach> which will upload your key to the keyservers, which allows others to confirm that something you signed is actually from you
<dholbach> (if you uploaded it already, you can obviously skip that step)
<dholbach> it would take too much time to go through all the individual steps (it's not that bad actually) to register you gpg and ssh key with LP, so for now I'll just give you the links you need:
<dholbach>  - https://launchpad.net/people/+me/+editpgpkeys (GPG key registration)
<dholbach>  - https://help.launchpad.net/YourAccount/ImportingYourPGPKey (docs for gpg key registration)
<dholbach>  - https://launchpad.net/people/+me/+editsshkeys (ssh key registration)
<dholbach>  - https://help.launchpad.net/YourAccount/CreatingAnSSHKeyPair (docs for ssh key registration)
<dholbach> and that's really it :-)
<dholbach> <fisch246> QUESTION: "bzr: ERROR: The user paul-mcspadden has not registered any SSH keys with Launchpad." and how do i go about doing this?
<dholbach> fisch246, you can fix this at https://launchpad.net/people/+me/+editsshkeys
<dholbach> <HoellP> QUESTION: How can i delete an outdated key from the keyserver?
<dholbach> HoellP, as far as I know you can revoke a gpg key locally and then upload the revoked key to keyservers
<dholbach> <stefwal82> QUESTION: how do you sign something?
<dholbach> stefwal82, the development tools will do that "automatically" for you, but you can set up your mail client to sign mails, or sign files manually
<dholbach> <hugohirsch> QUESTION: Sending the gpg-key fails with 'keyserver not configured' error. Can I upload my GPG-key to launchpad or does it need to be available via an open key server?
<dholbach> hugohirsch, you can specify --keyserver keyserver.ubuntu.com (for example)
<dholbach> <darkdevil56> QUESTION: which key am i supposed to send? pblic or secret?
<dholbach> darkdevil56, never share the secret key (--send-keys will figure that out for you)
<dholbach> <monish001> QUESTION: Output of 'bzr whoami "Name <mailId>" '? I am getting blank..
<dholbach> monish001, that's fine - the command succeeded
<dholbach> any more questions?
<dholbach> if you missed anything, or things are still being worked on, just follow the log of the session later on again - it's fine if you needed a little bit more time :)
<dholbach> <hugohirsch> QUESTION: Thx - uploaded my GPG-key. Will it automatically be connected/synced with my Launchpad account?
<dholbach> hugohirsch, no, you need to head to https://launchpad.net/people/+me/+editpgpkeys to tell Launchpad about it
<dholbach> <darkdevil56> QUESTION: the ssh command that i had typed earlier is retrieving and validating all the packagges till now.. is this normal?
<dholbach> darkdevil56, that must be the pbuilder-dist command - yes that's to be expected - just let it do its work :)
<dholbach> <mauriciocinelli> QUESTION: Is there anything else we need?
<dholbach> mauriciocinelli, that should be it for now - it should set you up for a good start - whatever else is required for others sessions will be dealt with there
<dholbach> are there maybe some more general questions about Ubuntu development?
<dholbach> we still have ~10 minutes before I have to hand the mic to barry :)
 * barry clears his throat
<dholbach> <steinex> QUESTION: not completely related, more about the process itself: are the packages synced from debian just the plain packages and ubuntu does the ubuntuspecific patches from-scratch for every new release? or are ubuntu-patches automatically applied on sync and if they don't merge, they must be merged by hand?
<dholbach> steinex, good question and it will be dealt with in the Debian session
<dholbach> for now: if the source is unmodified from Debian and we're before Debian Import Freeze, they will be synced automatically and built in Launchpad
<dholbach> if there are ubuntu changes we need to "merge" and we have a tool that helps us with that (http://merges.ubuntu.com)
<dholbach> <acarpine> QUESTION: I read something about https://wiki.ubuntu.com/MOTU/Mentoring Could you explain more in detail how it works and who should use it?
<dholbach> acarpine, unfortunately the Mentoring programme is out of order at this moment
<dholbach> I suggest you check out https://wiki.ubuntu.com/MOTU/GettingStarted and please feel very welcome to ask all the questions you have in #ubuntu-packaging or #ubuntu-motu
<dholbach> even if it's not a dedicated mentor for you, there's loads of people who are very happy to help you get started and solve your problems
<dholbach> <hugohirsch> QUESTION: I uploaded my key, but LP doesn't find the key with the given fingerprint. Do I need to wait for synchronisation between LP and Ubuntu-Keyserver?
<dholbach> hugohirsch, yes, you might have to wait a little bit (I don't know the exact timeframe, sorry)
<dholbach> <wolfpack> QUESTION: Does ssh key are need to be updated with every new distro release or new computer?
<dholbach> wolfpack, no, just leave them as they are
<dholbach> <jledbetter> QUESTION: So, now that we have our environment set up, we look at https://bugs.launchpad.net/ubuntu and -- that's where I'm not sure.
<dholbach> jledbetter, the upcoming sessions and https://wiki.ubuntu.com/MOTU/GettingStarted should give you some ideas where to look for bugs to fix and how to go about it :)
<dholbach> more questions? we still have 5 minutes :)
<dholbach> <cire831> QUESTION: when I uploaded the key it said it was uploading it to keys.gnupg.net.  On launchpad under editpgpkeys it says something about Ubuntu keyservers.   Will the Ubuntu keyserver get the new key directly from the gnupg keyserver?
<dholbach> cire831, yes, it will take a few minutes
<dholbach> <saimanoj> QUESTION:Are ubuntu packages sent back to Debian?
<dholbach> saimanoj, nice one!
<dholbach> sending patches back to Debian (or other upstreams) is a manual process and very important
<dholbach> it is indeed being done
<dholbach> and there will be more info about that in the Debian session which I believe will be tomorrow
<dholbach> <acarpine> QUESTION: Fixing bugs, when choose bzr and when use a traditional process (create a patch with a debdiff)?
<dholbach> acarpine, bzr is a REALLY nice way to go about fixing stuff and barry will take the next hour to walk you through it
<dholbach> if it should not work out for you, I'm sure that barry will love to hear more about it and yes, in that case the "traditional process" of posting a patch will work too
<dholbach> <stefwal82> QUESTION: in former courses you gave examples, why don't you now?
<dholbach> stefwal82, I type too slowly - not enough time :)
<dholbach> and I really enjoy answering loads of questions here - I hope it's useful
<dholbach> there'll be more examples in other sessions this week
<dholbach> <simar> QUESTION: When I run gpg-key fingerprint <email>, I get three uid, what does it mean?
<dholbach> simar, do you have more than one gpg key?
<dholbach> ah no... is that maybe different user IDs on the same key? in any case it shouldn't be a problem
<dholbach> <cire831> QUESTION: is the debian session being talked about the same as "Getting fixes into Debian"?
<dholbach> "Getting fixes into Debian" will definitely be part of it
<dholbach> <middle> QUESTION:What has this allowed me to actually do?!
* ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - https://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Questions in #ubuntu-classroom-chat || Event: Ubuntu Developer Week - Current Session: Introduction to Ubuntu Distributed Development (UDD) - Instructors: barry
<dholbach>   - you have all the tools to do Ubuntu development installed on your machine
<dholbach>   - your local developer tools know about you, which simplifies work a lot
<dholbach>   - you can do local builds of packages
<dholbach>   - you can interact with other developers and propose your changes on Launchpad to get merged
<dholbach>   - you can upload packages to Launchpad, so they are hosted in your Personal Package Archive (PPA)
<dholbach> and I'm out of time
<barry> hi, my name is barry warsaw, and i live near washington dc.  i work for canonical, do ubuntu development, am a core python developer and project leader for gnu mailman.  i'm here to introduce you to a new way of developing ubuntu, called 'ubuntu distributed development', or 'udd'
<dholbach> next up is the ROCKing Barry Warsaw
<barry> thanks dholbach!
<dholbach> ... not only an Ubuntu, Launchpad and Python hacker, but also a fun guy, friend and exceptional bass player
<barry> aw shucks, thanks :)
<dholbach> enjoy the session, you'll love Ubuntu Distributed Development afterwards
<barry> in a nutshell, udd uses the bazaar revision control system to fix bugs and develop features in ubuntu packages.  in this session, we'll learn how to fix a bug by:
<barry>  * creating a local branch of the project
<barry>  
<barry>  * developing a fix, then committing it to your local branch
<barry>  * link the branch to the bug report in launchpad
<barry>  * request a 'merge proposal' for the package maintainer to review
<barry> we'll probably just be scratching the surface of how this works, but hopefully you will come out of this session feeling more confident about using bzr to work on you ubuntu packages.  i won't cover much about packaging in particular, or bzr, but i will try to answer any questions you have!
<barry> just a note: we'll be using a bug in computer-janitor as an example.  c-j is a little different than most packages in ubuntu because it's developed natively in launchpad. for the purposes of this class, this difference won't matter too much.  if it comes up, i'll point it out.
<barry> why use bzr when the old tools work just fine?  bzr gives you the benefit of a full distributed version control system to manage package changes.
<barry>   * incremental changes can be committed locally as you go
<barry>   * logging, diffing, intelligent merging
<barry>   * interact better w/other ubuntu devs by sharing works-in-progress
<barry>   * work disconnected
<barry>   * manage all artifacts in launchpad
<barry>   * request reviews online
<barry>   * automatic requests for sponsorship review
<barry>   * soon: build-from-branch-to-archive
<barry> for now, the documentation is a little bit scattered, but the best place to start is on the wiki.  we are acdtively working on cleaning this up and moving it to the official ubuntu developers documentation.
<barry> https://wiki.ubuntu.com/DistributedDevelopment/Documentation
<barry> so, i'm going to give folks a few minutes to catch up on all the prepared overview above, then i'll start digging in...
<barry> anybody need a few more minutes to catch up?
<barry> or are there any questions about the introductory material, or what i hope to cover today?
<barry> so, we need to start by making sure you have the basic tools.  you'll need bazaar and a special plugin that adds a lot of useful stuff
<barry> start by doing this:
<barry> sudo aptitude install bzr bzr-builddeb
<barry> you're also going to need to know your launchpad id.  dholbach covered this in the previous session.  it's the bit after the ~ in your launchpad url
<barry> if you don't have a launchpad login yet, either go get one now or there will be a few steps later that don't work for you.  no worries, you can still follow along
<barry> dholbach: points out that you can visit this url:
<barry> https://launchpad.net/people/+me
<barry> and after it redirects, you can look for the ~ in the url.  the bit after that is your launchpad id
<ClassBot> monish001 asked: bzr launchpad-login monish001 bzr: ERROR: The user name monish001 is not registered on Launchpad.
<barry> monish001: be sure you've registered on launchpad first.  'bzr launchpad-login' will not create a login for you
<barry> also, some folks may not have aptitude, you can install the bzr tools with this instead:
<barry> sudo apt-get install bzr bzr-builddeb
<barry> okay, now, i'd like you to run this command:
<barry> bzr --version
<barry> and note the version of bzr that you are using
<barry> we are going to use two different urls later to refer to package source in launchpad.  if you are using bzr version 2.3 or higher, you will be able to do things like this:
<barry> bzr branch ubuntu:mypackage
<barry> to get the version of 'mypackage' in natty
<barry> if you have bzr 2.2 or older, this will be spelled like this:
<barry> bzr branch lp:ubuntu/mypackage
<barry> if you sat in on dholbach's session, you've already done this:
<barry> bzr whoami "Your Name <me@example.com>"
<barry> bzr launchpad-login mylpid
<barry> and now we're ready to use bzr to fix a bug in ubuntu!
<ClassBot> hugohirsch asked: Is it a problem that I still run 10.10? My bzr is 2.2.1
<barry> hugohirsch: it is not a problem.  this will work just fine.  just remember to use the lp:ubuntu/foo urls instead of ubuntu:foo
<ClassBot> cire831 asked: how does it know to get the natty version?  what if I'm running lucid and want that version?
<barry> cire831: the ubuntu:foo urls always pick the current in-development version of ubuntu, i.e. as we speak, that's natty
<barry> you can always use ubuntu:natty/foo or ubuntu:maverick/foo etc. to get a specific version of a package in a specific version of ubuntu
<barry> those could also be spelled as lp:ubuntu/natty/foo or lp:ubuntu/maverick/foo or lp:ubuntu/lucid/foo etc
<ClassBot> palhmbs asked: Why does bzr-builddeb setup mail, do I really need it?
<barry> it sets up your email which will be used when you commit changes later on (i.e. it'll show up in your debian/changelog file)
<ClassBot> chilicuil asked: can I use bzr and lp to pull debian versions?
<barry> yes.  you can use urls like this:
<barry> debian-lp:squeeze/foo
<barry> or
<barry> lp:debian/squeeze/foo
<barry> okay, let's fix a bug!
<barry> go ahead and open this url in your browser: http://launchpad.net/bugs/726616
<barry> someone noticed a typo in a file in the package.  we'll fix that the udd way :)
<barry> go ahead and cd to a location where you want to do the work.  we'll be creating a bunch of directories in there
<barry> cd someplace
<barry> now, just a little bazaar boilerplate to make things efficient:
<barry> bzr init-repo janitor
<barry> cd janitor
<barry> and now we're going to grab the source branch for the current version of computer-janitor in natty:
<barry> bzr branch ubuntu:computer-janitor natty
 * barry will give you a moment to catch up
<ClassBot> mhall119 asked: why is init-repo necessary? why not just bzr branch?
<barry> it's not strictly necessary, but as you'll see in the next step, using a bazaar 'shared repository' like this will make future steps go much faster by reducing the amount of network traffic you'll consume
<barry> (i.e. bzr can cache things locally if you use a shared repo)
<ClassBot> cire831 asked: didn't work.  bzr branch ubuntu:computer-janitor natty says not a branch.
<barry> does 'bzr branch lp:ubuntu/computer-janitor' work for you?
<barry> ah.  this ubuntu: url might not work for computer-janitor.  remember i said it was a little weird because c-j is developed in launchpad natively?  if it does not work for you, use this url instead:
<barry> bzr branch lp:computer-janitor
<barry> in general you will use the ubuntu: urls, but in this case it's a little different.  don't let that confuse you too much ;)
<barry> everybody good?
<barry> bzr branch lp:computer-janitor natty
<barry> ^^
<barry> (that just gives you the branch in a directory called 'natty')
<barry> okay, so we're going to work on bug 726616.  let's branch the current c-j trunk to a working directory which will only contain our fix
<barry> bzr branch natty bug-726616
<ClassBot> cire831 asked: what exactly does the natty on the end do?  rather than say bzr lp:ubuntu/natty/computer-janitor
<barry> all it does is leave you with a local directory called 'natty' instead of the default 'computer-janitor'.  there's no other difference
<barry> it's totally up to you
<barry> now...
<barry> cd bug-726616
<barry> and we're sitting in a directory where we'll make our fix!
<barry> look around.  you'll see the upstream source code, and a debian directory with all the packaging information.  it looks like a pretty typical ubuntu source package, right?
<ClassBot> cire831 asked: so I should be able to do bzr branch lp:ubuntu/lucid/computer-janitor lucid to get the lucid version?
<barry> yes
<barry> these urls are very handy when you want to backport fixes for sru's and such
<barry> okay, sorry, just triaging some questions
<barry> so, now, if you open the NEWS file in your favorite editor, and search for the word 'publically' you see the typo
<barry> just use your favorite editor to spell check this to 'publicly' and congratulations!  you've just fixed an ubuntu bug
<barry> but of course, now you'd like to share your fix with the world and get it into ubuntu, right?  let's do that now
<barry> exit your editor and then at the command line do this:
<barry> bzr diff
<barry> you should see that the NEWS file has the fix.  what you'll see is a unified diff between your local change and the original source code
<barry> next thing you want to do is commit this change, but before you do that, you also want to add a debian/changelog entry which records what you've done
<barry> type this: dch -i
<barry> this will open an editor providing you with a template to fill in your change
<barry> you'll add a little bit of descriptive text, such as what i did here:
<barry> computer-janitor (2.1.0-0ubuntu4~udd0) UNRELEASED; urgency=low
<barry>  
<barry>   * NEWS: fixed a typo.  (LP: #726616)
<barry>  
<barry>  -- Barry Warsaw <barry@ubuntu.com>  Mon, 28 Feb 2011 11:18:20 -0500
<barry>  
<barry> note a couple of things:
<barry> the version number will be filled in, but when you see it, it won't have the ~ppa0 suffix.  that's a trick we use to specify a version "in the middle" of the previous release and what will be the next release
<barry> using a ~ suffix makes it easier for testing later, but it's not strictly necessary
<barry> also notice the UNRELEASED tag.  we'll eventually change that to 'natty' but again, this is a middle step so we can do some testing
<barry> finally, the most important part
<barry> notice this text at the end of the description line:
<barry> (LP: #726616)
<barry> that is really critical to include.  it will be used to link your branch with the fix to the bug report
<barry> it must be exactly like that (the parentheses are optional)
<barry> but it must be of the form:
<barry> LP: #123456
<barry> with a space between the colon and hash, and the hash must be there
<barry> anyway, save the changelog and exit your editor.  i'll take some questions now
<ClassBot> fisch246 asked: "bzr branch natty bug-726616" what command do i use if i'm on maverick?
<barry> note that 'natty' in the above example is the local directory of the source branch that you checked out previously.  you'd still use that, since you're working on the natty version of the package, even though you're on maverick
<ClassBot> darkdevil56 asked: bash: cd: bug-726616: No such file or directory?
<barry> did you do the 'bzr branch natty bug-726616' command from earlier?
<ClassBot> figure002 asked: where does dch get your email address from?
<barry> in the previous session, dholbach described how to set the DEBEMAIL and DEBFULLNAME environment variables.  dch gets those values from there by default, but do a 'man dch' for details
<barry> okay.  now, we've fixed the bug, and we've added a changelog entry.  we just need to commit our changes to the local branch
<barry> run this: debcommit
<barry> this will call 'bzr commit' with some useful defaults, so it's mostly a convenience.  you could use 'bzr commit' but for now, 'debcommit' is better
<barry> you can ask bzr to show you the history of the change you just made:
<barry> bzr log -c -1
<barry> up to now though, your fix is just sitting in a branch on your local machine.  we want to push the change to launchpad so we can share it with others.  to do this, run this command:
<barry> bzr push lp:~myid/computer-janitor/bug-726616
<barry> where of course you use your launchpad id instead of 'myid'
<barry> that'll take just a few seconds to run, and then when the command comes back, type this:
<barry> bzr lp-open
<barry> this should open your web browser to the launchpad page that represents your just pushed branch
<ClassBot> palhmbs asked: if you fix a bug that hasn't been reported, what then, create a bug on launchpad?
<barry> it's generally good practice for there to always be a bug report first.  it's not strictly required for any of the udd tasks, but it makes everyone's life easier to track the issue if there is a bug report
<barry> so i do suggest creating the bug report first.  do that directly in launchpad not through bzr though
<ClassBot> jderose asked: when i fix a bug, i like to do a PPA test build (also so others can easily test fix) - in this case, is it okay to commit, say, "natty" in the changelog rather than "UNRELEASED"?  Wont the PPA builders choke on UNRELEASED?
<barry> i'm running out of time, but i do plan on covering this later.  or if time runs out i will answer this in -chat
<ClassBot> cire831 asked: where can I find out how all these tools are integrated.  ie.  how the bzr stuff knows about LP: #<bug> etc.
<barry> more info can be found in #ubuntu-devel or #udd or #bzr
<barry> okay, so we've pushed our fix branch to launchpad, now what?
<barry> if you look at the page that 'bzr lp-open' opened in your browser, scroll down to the 'related bugs' section
<barry> you should see a link to bug 726616
<ClassBot> There are 10 minutes remaining in the current session.
<barry> this was done automatically by debcommit, and launchpad when you pushed your branch.  it was made possible by the 'LP: #726616' text you added in debian/changelog
<barry> if you click on the related bug link, you'll hop over the bug.  notice that the bug page also has a link for 'related branches'. that should let you get back to the branch page
<barry> though, there may be multiple such branches from all the other folks in this class :)
<barry> be sure to pick yours!  or use the back button
<barry> now, make sure you're on your branch page.  scroll down and look for a link that says 'propose for merging'
<barry> click on that
<barry> what that does is inform the owner of the master branch, and all the ubuntu sponsors, that you have a fix for an ubuntu bug
<barry> so you don't have to request a sponsor, or a review, explicitly.  (again, here's where computer-janitor is a little odd, but the above is true for 99% of branches)
<barry> er, packages
<barry> maco points out that sponsors aren't specifically notified, but your branch does show up in the sponsorship queue automatically.  you can still ping a sonsor directly as normal
<ClassBot> There are 5 minutes remaining in the current session.
<ClassBot> cire831 asked: mine didn't link automatically.  I can do it by hand though.
<barry> it can take several minutes for launchpad to process your branch and create the link.  you can of course do it manually if you get impatient :)
<ClassBot> cire831 asked: should we actually go ahead and do it?
<barry> go for it!  don't worry, i'll be processing that bug when the class is over :)
<ClassBot> darkdevil56 asked: aborting commit write group: PointlessCommit(No changes to commit) bzr: ERROR: No changes to commit. Use --unchanged to commit anyhow.?
<barry> bzr will spit this out if you've already committed all your changes.  just use --unchanged, or make another change.
<barry> it can happen if you used 'bzr commit' before you did debcommit
<barry> please note that i skipped a lot of stuff about doing test builds, creating source packages, uploading to a ppa etc.   we've basically run out of time, but i'll head over to #ubuntu-classroom-chat to continue for a while
<barry> remember that all the gory details are on the wiki:
<barry> https://wiki.ubuntu.com/DistributedDevelopment/Documentation
<barry> i'll take a few more questions before the next session starts, and thank you all for listening!
<ClassBot> stefwal82 asked: is the worked on problem now uploaded?
<barry> no.  a sponsor would have to merge your branch, build the source package, and upload that
<barry> in the future though, there will be some very cool stuff to do even that automatically in launchpad
<barry> if you have upload rights of course :)
<ClassBot> hugohirsch asked: If i fix a bug do I need to create a PPA or is a branch sufficient enough?
* ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - https://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Questions in #ubuntu-classroom-chat || Event: Ubuntu Developer Week - Current Session: Taking bite out of Unity - Instructors: DBO, jcastro
<ClassBot> Logs for this session will be available at http://irclogs.ubuntu.com/2011/02/28/%23ubuntu-classroom.html following the conclusion of the session.
<barry> a branch is sufficient for a sponsor to review and apply your change.  a ppa is not necessary at all!  but it's useful for testing your package, or sharing your changes with others before it gets uploaded
<jcastro> woo, thanks barry, great job!
<DBO> oh wait, there you are
<DBO> sweet
<jcastro> This next session is How to Contribute to Unity
<jcastro> with me and DBO
<jcastro> o/
<DBO> woot!
<jcastro> ok so I'm going to go through the intro
<jcastro> and show you guys how we roll in Unity land
<jcastro> and then DBO's gonna take your questions
<jcastro> so first things first
<jcastro> why are we doing this?
<jcastro> as it ends up, things in Open Source end up more awesome when more people contribute (duh)
<jcastro> so what we're concentrating on here for Natty is making it easy for people to fix unity
<jcastro> or to contribute features
<jcastro> whatever scratches your itch, so that you can put your "brick in the wall"
<jcastro> yes, like the pink floyd song
<jcastro> so, for this session you hopefully already know what unity is
<jcastro> and you're itching to get your hands on the code
<jcastro> http://unity.ubuntu.com/getinvolved/
<jcastro> we're going to start here
<jcastro> if you're going to do unity I recommend you bookmark this page
<jcastro> it's the cheat sheet for how to get the code, and do branch proposals
<jcastro> so, are people comfortable with bzr? This session doesn't cover bzr basics but I can do a quick tutorial (just comment in -chat)
<jcastro> oh, someone's asked a good question
<ClassBot> akshatj asked: Does contributing to unity require knowledge of compiz?
<jcastro> DBO: ^
<DBO> akshatj, in short, no
<DBO> the longer answer is, not unless you want to work on those specific parts that interface between compiz and unity
<DBO> about 90% of the code really doesn't touch compiz at all
<jcastro> ok so the first step is to grab the code
<jcastro> this is straight forward
<jcastro> bzr branch lp:unity
<jcastro> which is "hey bzr, make a branch of the unity project on launchpad, I want to do stuff"
<jcastro> you will then decide, what is it you want to fix
<jcastro> now some people know right away "I am going to go make this"
<jcastro> other people prefer "hey just tell me what needs to get fixed and I'm on it."
<jcastro> so the unity team takes bugs that they feel are "bitesize"
<jcastro> things to familiarize yourself with the code
<jcastro> and not flood you with a ton of stuff
<jcastro> so you can pick and choose some bufgs to familiarize yourself
<jcastro> don't worry, we don't put all the crap bugs in bitesize
<jcastro> we try to pick a mix of "sexy" bugs too
<jcastro> for example trevino fixed the little fade in the title bar, etc.
<jcastro> this list is here:
<jcastro> https://bugs.launchpad.net/unity/+bugs?field.searchtext=&orderby=-importance&field.status:list=NEW&field.status:list=INCOMPLETE_WITH_RESPONSE&field.status:list=INCOMPLETE_WITHOUT_RESPONSE&field.status:list=CONFIRMED&field.status:list=TRIAGED&assignee_option=any&field.assignee=&field.bug_reporter=&field.bug_supervisor=&field.bug_commenter=&field.subscriber=&field.tag=bitesize&field.tags_combinator=
<jcastro> ALL&field.has_cve.used=&field.omit_dupes.used=&field.omit_dupes=on&field.affects_me.used=&field.has_patch.used=&field.has_branches.used=&field.has_branches=on&field.has_no_branches.used=&field.has_no_branches=on&search=Search
<jcastro> ok so launchpad hates me
<jcastro> https://wiki.ubuntu.com/Unity/Bitesize
<jcastro> the list of bugs is on that page there
<jcastro> (we're on steps 2 and 3)
<DBO> its worth noting that most bitesize bugs have been picked because they can be handled with little knowledge beyond C++ and glib
<jcastro> so, you basically find a bug from that list, something you want to fix
<jcastro> of course, you can feel free to ignore the bitesizers and dig into compiz and fix the universe, but for this tutorial we're going to keep it simple
<jcastro> ok so now you find a bug you want to fix
<jcastro> and you have the code
<jcastro> the next step is to fix the code itself
<jcastro> this is basically up to you, you need to fix the bug, DBO can you tell people how they can get coding help for fixing bugs?
<DBO> the absolute best resource for getting coding help is us, the primary developers
<jcastro> where can I find you?
<DBO> we all idle in #ayatana and are happy to field your questions about the code
<jcastro> you can also post on ayatana-dev@lists.launchpad.net
<DBO> if you ping me there I will either answer your question or direct you to the proper person to ping :)
<DBO> and yes as jorge mentioned, we watch the mailing list too
<jcastro> ok so for this example we're going to assume that you know how to code (heh) and have fixed the bug.
<jcastro> you would do normal hacker things here, test it, etc.
<jcastro> the next thing you need to do is commit the fix to your local repo
<jcastro> this is easy, "bzr commit"
<jcastro> now, you've fixed it and committed, now we need to put it somewhere where DBO can check it out
<jcastro> we're going to push a branch to launchpad
<jcastro> to do this I'll shove it under my username in launchpad
<jcastro> so, I'll say:
<jcastro> bzr push lp:jorge/unity/fix-for-123456
<jcastro> or
<jcastro> bzr push lp:jorge/unity/awesome-new-feature-that-does-foo-bar
<jcastro> I can name it what I want at the end there
<DBO> bzr push lp:~jorge/unity/fix-for-123456
<jcastro> people generally just pick something descriptive
<DBO> you missed the ~
<jcastro> oops, sorry
<jcastro> thanks
 * DBO got your back
<jcastro> (I see the doc has a typo, I'll fix that after the class)
<jcastro> ok, let's field some questions at this point
<ClassBot> mhall119 asked: Are there any bugs yet that Python devs can fix?
<DBO> mhall119, totally! we need people using libunity to add support for the launcher in other applications
<DBO> since python has gir support, and libunity is a standard gobject library, you are able to use it directly
<jcastro> libunity and python should be sorted real soon, there's a few bugs but the right people are on the problem
<jcastro> "it's close"
<DBO> doh, speaking ahead of myself :)
<ClassBot> rsajdok asked: Can I develop on maverick or only natty?
<DBO> natty only, sorry
<DBO> I stayed on maverick as long as I could
<DBO> and eventually too many deps needed to be backported for me to keep up
<DBO> you would need to backport, glib, gio, gtk, and vala at least
<jcastro> the nice thing is now that the APIs and stuff are getting hashed out we won't need to break things going forward
<jcastro> what I recommend is waiting until thursday to grab alpha 3, this will have all the goodies (including fixed nvidia and ati drivers)
<jcastro> and then installing it on a USB key, boot off of it, and code
<jcastro> as natty stabilizes and it's not so "scary" to run a devel distro we expect more people to mess with the code
<jcastro> which is what we want!
<ClassBot> rsajdok asked: Can You describe how to compile? cmake . etc.?
<jcastro> DBO: ^^ this one is all yours
<DBO> rsajdok, yeah one second
<jcastro> heh, cmake!
<DBO> rsajdok, grabbing the command :)
<DBO> so what you do
<DBO> bzr branch lp:unity
<DBO> cd unity; mkdir build; cd build;
<DBO> then you run this big command
<DBO> cmake .. -DCMAKE_INSTALL_PREFIX=/home/USERNAME/staging/ -DCMAKE_BUILD_TYPE=Debug -DCOMPIZ_PLUGIN_INSTALL_TYPE=compiz -DGSETTINGS_LOCALINSTALL=ON
<DBO> that will install the unity plugin into your /home/USERNAME/staging directory
<DBO> erm
<DBO> after you run make and make install that is
<jcastro> where's the wiki page at?
<jcastro> You wrote this down right? :)
<DBO> on the installing unity wiki page...
<DBO> https://wiki.ubuntu.com/Unity/InstallationGuide
<jcastro> https://wiki.ubuntu.com/Unity/InstallationGuideFromSource
<jcastro> those 2 pages should help you out
<DBO> ah right
<jcastro> ok
<jcastro> so, now you have built it
<jcastro> and fixed your bug
<jcastro> and tested it
<jcastro> Pro tip: You will need to test your fix
<jcastro> as your code will undergo review
<jcastro> ok, so we submitted the code to launchpad with our last bzr push
<jcastro> https://code.launchpad.net/unity
<jcastro> your branch will automagically show up on that page ^
<jcastro> what you see here is all the branches for unity
<jcastro> as people work on the code they do it in branches
<jcastro> and then submit them
<jcastro> this is important, as we're very distributed
<jcastro> so you won't see things going into trunk until people submit a branch
<jcastro> Pro tip: this page is also a good way to see what's coming down the pipe
<jcastro> so, every day, when DBO wakes up
<jcastro> (at like noon)
<jcastro> he goes through these branches
<jcastro> DBO: can you tell us what you go through to review these branches?
<DBO> so the review process is 2 primary stages
<DBO> well 3
<DBO> in the 0th stage I decide what can be reviewed (certain features are outside of the scope of what we can support for natty)
<DBO> if your feature/bugfix is able to land for natty, we move on to step 1, otherwise we inform you that your review will be looked at again for Natty +1
<DBO> the first step of code review involves looking over the code itself
<DBO> it must conform to the correct coding guidelines (which for now are somewhat loose) and not present any obvious issues
<DBO> here I will be looking for memory leaks, crash conditions, general architecture, and overall clarity of the code
<DBO> if you pass mustard, we move to step 2, otherwise the problems are noted and the merge will be marked "Needs Fixing"
<DBO> you may resubmit at any time if you think the issues have been resolved
<DBO> at step 3, I am going to actually install the code on my machine, test that it actually does what its supposed to do, ensure its not doing anything too stupid (leaking tons of memory comes to mind here)
<jcastro> (coding guidelines here: https://wiki.ubuntu.com/Unity/CodingStyle)
<DBO> if that all passes mustard again, I will approve the merge
<DBO> if not, I will mark the branch as "Needs Fixing" and send it back to the original developer with the reasoning why
<DBO> once approved, assuming the contributor has signed the CA, I will pull the branch into trunk
<DBO> and your code ships in the next release
<jcastro> If you haven't accepted the canonical contributor agreement yet, we'll also send you a mail asking you to either accept/not accept
<jcastro> https://code.launchpad.net/unity/+merges
<jcastro> here's the list of all the merges we've had so far
<jcastro> as you can see, it starts to pile up, which is good
<jcastro> the more branches we have incoming, the better
<jcastro> ok so really, those are all the steps, any questions?
<ClassBot> rsajdok asked: Can I develop unity-2d on maverick or only natty?
<DBO> Unity-2D has similar requirements to Unity-3d
<DBO> I can't say for sure (as I have not checked) but I imagine it would also require natty
<DBO> I will ask a Unity-2D dev right now
<ClassBot> mhall119 asked: what info do you want attached to bug reports against Unity?
<DBO> General system info is always helpful for starters
<DBO> things like CPU, 64 vs 32 bit, GPU, and amount of memory
<DBO> we also like to know what package version of compiz and unity you have
<DBO> and if you can include steps to reproduce teh issue, that is awesome
<jcastro> (if you're reporting a bug on the unity in natty "ubuntu-bug unity" will snag a bunch of data for us)
<DBO> if the issue is intermittent (and many issues with X/compiz are), if you can manage to get a backtrace using GDB, you instantly become a hero, and we sing your praises on high
<ClassBot> wolfpack asked: Does building and installing UNITY does not removes originally installed unity?
<DBO> it depends on where you install it to
<DBO> if you install it into /usr, it will overwrite the existing unity plugin
<DBO> if you install it anywhere else, it does not
<DBO> if you accidentally overwrite the existing plugin, you can do sudo aptitude reinstall unity
<DBO> to install the old version again
<jcastro> more questions?
<jcastro> DBO: he goes on to ask "So both wiil be working together if installed in directory othe than /usr?	"
<DBO> wolfpack, you would have to use an env variable to tell compiz which one to use
<jcastro> ok while we wait for questions
<jcastro> DBO: why don't you go into some of the architecture
<jcastro> like, what does what
<DBO> wolfpack, I'll get you more details on that in a bit, i actually dont have them off hand because I run my dev setup a bit differently
<DBO> jcastro, sure no problem
<DBO> jcastro, Unity is broken down into 3 major components. The plugin interface, the UI elements, and the backend elements.
<DBO> The plugin interface exists entirely in a file named unityshell.cpp. This is where you go to look for any bug dealing with interactions between unity and compiz
<DBO> event handling, grabbing of and passing off events, and other plugin interactions are performed here. This is also the main entry point for Unity
<DBO> Unity is also painted from this file (there is a pretty clear paint function if you open it up)
<DBO> (jcastro, feel free to interrupt me with questions)
<DBO> UI elements are things like the launcher, quicklist, panel, or palces
<DBO> these elements are rendered using a library called Nux
<DBO> Nux widgets are not that dissimilar from GTK or Qt widgets save for the fact that they can be embedded into existing openGL contexts
<DBO> UI elements are laid out in a semi-hierarchal fashion, just like qt and gtk
<DBO> really if you have worked in any toolkit before, you should not feel that far out of your comfort zone
<ClassBot> rsajdok asked: Is it possible to develop Unity on virtual machine?
<DBO> not last I checked
<DBO> most virtual machine drivers still dont do FBO's yet
<DBO> which means we cant draw properly
<jcastro> for a time Virtualbox 4 ran it
<DBO> I hear rumors that vmware has fixed this, but I have not tested that
<jcastro> then we ran into the Xorg transition in natty
<ClassBot> wolfpack asked: Am I allowed to upload patches for bugs? As I can make connection through http only . No ssh is allowed her.
<DBO> wolfpack, we take patches :)
<DBO> wolfpack, if you can communicate your patch to us through bongos and a string and we understand it, we'll take it
<ClassBot> Amoz asked: sorry for being a bit late, but when you talked about the system info part, and getting a backtrace with GDB, is there a specific command to collect all this information?
<DBO> ubuntu-bug unity collects most of the info
<ClassBot> There are 10 minutes remaining in the current session.
<DBO> backtraces can be trickier, usually what I do is ssh in from another machine (or switch to a VT), then run "sudo gdb"
<DBO> inside gdb, I run "attach <pid of compiz>
<DBO> you will have to check the pid of compiz before you start gdb
<DBO> after it finishes attaching, you can simply run "backtrace" adn get the data
<DBO> wolfpack, if you need help at the time of collection, you can always stop by #ayatana, and we can walk you through it no problem
<DBO> erm
<DBO> I am not sure that was wolfpack asking that
<DBO> i meant Amoz :)
<jcastro> 10 minutes left, more questions?
<ClassBot> mhall119 asked: SInce we can't test in a virtualmachine, can we at least run Unity from a LiveCD now?
<DBO> live CD is an acceptable way to run unity, we suggest running from a USB key so you can save
<jcastro> there's been some real churn due to the Xorg transition with people getting working desktops to test on Unity
<jcastro> Alpha 3 (this thursday) will finally have all that sorted
<ClassBot> There are 5 minutes remaining in the current session.
<ClassBot> jderose asked: I'd like to help document the Python API... what's the best way to do with for gobject introspection? can i make help(Unity.foo) show something useful?
<jcastro> ohh, please join us in #ayatana after this session
<jcastro> and we can sort that
<ClassBot> akshatj asked: Are there any plans to provide a Unity Live CD like Gnome Shell does?
<DBO> jderose, yes, #ayatana, we'll get you in touch with the right peoples
<DBO> akshatj, its called the 11.04 release of Ubuntu :)
<jcastro> yep, on thursday!
<jcastro> ok well that's about it
<jcastro> thanks for participating
<jcastro> we hope you snag the unity code
<jcastro> and mess with it, make it better, so that you can contribute!
<jcastro> DBO: nice job!
<jcastro> alright, next class, smoke if you got em!
 * DBO bows and dances off stage, ashley simpson style
 * tumbleweed waves
<tumbleweed> thanks jcastro and DBO
* ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - https://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Questions in #ubuntu-classroom-chat || Event: Ubuntu Developer Week - Current Session: Getting your fixes into Ubuntu , how to make sponsors happy - Instructors: tumbleweed
<ClassBot> Logs for this session will be available at http://irclogs.ubuntu.com/2011/02/28/%23ubuntu-classroom.html following the conclusion of the session.
<tumbleweed> Hi, and welcome everyone.
<tumbleweed> I know it's been a long evening (in my timezone),
<tumbleweed> let's bring it to a close with something that helps you get things done in Ubuntu.
<tumbleweed> Please ask questions in #ubuntu-classroom-chat, I'll answer them regularly, they'll make this discussion much more interesting.
<tumbleweed> darkdevil56: yeah, 10pm here
<tumbleweed> I'm Stefano Rivera. I live in sunny Cape Town, South Africa, and am an Ubuntu MOTU and Debian Developer.
<tumbleweed> My main interests are Python-related packages, and helping people with Ubuntu Development.
<tumbleweed> Tonight I'm talking abut the Ubuntu Sponsorship Queue.
<tumbleweed> This talk will be less practical examples like dholbach and barry's excellent talks earlier, and more discussion.
<tumbleweed> There's simply no way I can cover examples on how to do everything :)
<tumbleweed> The sponsorship queue is how you get things uploaded when you don't have upload rights yourself.
<tumbleweed> https://wiki.ubuntu.com/SponsorshipProcess
<tumbleweed> All new Ubuntu developers use it, it's how we learned and showed our skills, that led to us becoming Ubuntu developers.
<tumbleweed> so, what, why?
<tumbleweed> Let's say there's a bug in an Ubuntu package you want to fix. You have a patch for it.
<tumbleweed> You could file a bug in Launchpad, with the patch, but as I'm sure you've seen, the bug may go without any feedback for a long time...
<tumbleweed> Ubuntu has ~100 000 open bugs, and ~2 000 bugs with patches. That's a lot, far too many for us to ever get around to fixing them all.
<tumbleweed> So, instead of waiting for someone else to test & integrate your patch, you could do the next step, and prepare the upload for the Ubuntu archive.
<tumbleweed> You do this, request sponsorship, and an Ubuntu Developer who has the necessary rights will then come along, review your work, and if it's ready, sign it and upload it to the archive for you.
<tumbleweed> This is more work for you, than filing a bug with a patch, but you'll learn more, and eventually can earn yourself Ubuntu upload rights.
<tumbleweed> Someone has to prepare every upload, so if you want something desperately, it might as well be you who does the work.
<tumbleweed> For example, I'm a MOTU, but before I was, I used the sponsorship queue to do work on universe packages.
<tumbleweed> To fix bugs, upload new versions, and do SRUs (updates to stable releases).
<tumbleweed> As a MOTU, I can upload to universe, but not to Ubuntu "main" or "restricted" packages.
<tumbleweed> For those, I have to go through the sponsorship queue.
<tumbleweed> Of course, because I *can* upload to universe, I review universe things on sponsorship queue, and sponsor the uploads.
<tumbleweed> I'm not the only one. We have "Patch Pilot"s every day, who sit down for a few hours, reviewing things in the queue
<tumbleweed> Now, I can't tell you how to go from every patch out there, to an upload ready for sponsorship, there are just too many possibilities.
<tumbleweed> However, if you followed barry's talk earlier, you will have already got as far as posting something into the sponsorship queue.
<tumbleweed> http://irclogs.ubuntu.com/2011/02/28/%23ubuntu-classroom.html#t18:22
<tumbleweed> Beyond that, you need to read up more generally about Debian packaging:
<tumbleweed> https://wiki.ubuntu.com/PackagingGuide http://www.debian.org/doc/maint-guide/
<tumbleweed> And our sponsors are awesome. When they review your work, you'll get good feedback, that should improve your knowledge and abilities.
<tumbleweed> When you propose a bzr merge against an Ubuntu branch, it'll be picked up by the sponsorship queue.
<tumbleweed> http://reports.qa.ubuntu.com/reports/sponsoring/index.html (this page is generated every half hour or so)
<tumbleweed> You can see a few I proposed earlier today (near the bottom), two samba SRUs: ntlm-auth-623342.
<tumbleweed> There's another way to get things into the queue, if you attach a "debdiff" patch to a bug, and subscribe "ubuntu-sponsors" to the bug.
<tumbleweed> You create a debdiff by running the "debdiff" command from devscripts on two source packages (.dsc files). debdiff will give you the diff between them.
<tumbleweed> It's up to you which approach you find more comfortable.
<tumbleweed> I find UDD (bzr) more flexible, e.g. it handles new upstream versions quite well, but not all developers prefer it.
<tumbleweed> When you are doing merging, for example, it can be quite confusing to read the diffs, in UDD.
<tumbleweed> ok, that's a broad overview of the sponsors, what we do, and how
<tumbleweed> (any questions?)
<tumbleweed> right, let's go on to the meat of this, how to make sponsors happy:
<tumbleweed> I'm just going to list some stuff here, I hope to get some decent questions on them:
<tumbleweed> * Read the debdiff / bzr diff that you propose
<tumbleweed>   - The sponsor is going to be reading it, so you should as well. You might find mistakes you made.
<tumbleweed>   - Does the changelog entry accurately describe the changes?
<tumbleweed>      + There's a mailing list, natty-changes, where the changelog entries of all natty uploads get mailed (same for other releases)
<tumbleweed> people read these, wanting to understand how things are changing
<tumbleweed> the changelog is the how you communicate what you've done
<tumbleweed> it also helps future mergers to understand what's necessary, and what isn't
<tumbleweed>     + "Fixed FTBFS" is a poor description, rather say "explicitly linked to libfoo to fix FTBFS with ld --as-needed"
<tumbleweed> * Was your fix the right fix?
<tumbleweed>   - Does it work, and fix the issue?
<tumbleweed>   - Does it belong in Ubuntu, or in Debian, or upstream?
<tumbleweed>     (of course, the debian session is tommorrow night)
<tumbleweed>   - Is it minimal? We try to change as little as possible in Ubuntu, the closer it is to Debian, the less work we have to do.
<tumbleweed> that's something that's worth going into:
<tumbleweed> Whenever we make a change in Ubuntu, we have to carry it until we can pass it upstream
<tumbleweed> The majority of our packages, we import directly from Debian, with no changes
<tumbleweed> these happen automatically
<tumbleweed> however, when we have changes, whenever we want a new version from Debian, we have to manually re-add the changes to the new version
<tumbleweed> this is Merging https://wiki.ubuntu.com/UbuntuDevelopment/Merging
<tumbleweed> so, if a package is currently unmodified in Ubuntu, it may be a bad idea to change it, just to correct a spelling mistake like barry did earlier
<tumbleweed> we should rather report the spelling mistake to the upstream, and we'll get the benefit of the fix, without extra effort, when the upstram releases a new version
<barry> tumbleweed: there are ways to do it.  i did not have time to talk about how to integrate udd with patch systems, but that's laid out in the wiki pages
<barry> tumbleweed: yes, that's always ideal
<tumbleweed> barry: thanks :)
<barry> :)
<tumbleweed> chadadavis: Yes, it probably will be accepted upstream easily
<tumbleweed> chadadavis: but if it's not a major issue, why waste development time on it in Ubuntu, and Debian, and upstream
<tumbleweed> why not just get it straight upstream
<tumbleweed> (err, that qustion was)
<tumbleweed> 22:20 < chadadavis> But if the change is so trivial, wouldn't it also be more likely to be accepted upstream? How  is the review process in that direction. Can any of that be 'seen' from Launchpad?
<tumbleweed> So, yes Debian developers can chose to see the changes Ubuntu makes
<tumbleweed> some do, some don't
<tumbleweed> in general, if you want to get their attention, you should file a bug in Debian, with a patch
<tumbleweed> upstreams can also chose to follow their bugs in Ubuntu, by subscribing to their package
<tumbleweed> but some packages have thousands of bugs filed against them in Ubuntu, and nobody can sift through them easily
<tumbleweed> 22:23 < chadadavis> But bugs against ubuntu stay in Launchpad until they are fixed upstream then? Assuming one  would prefer to fix a certain bug upstream than make the change in Ubuntu?
<tumbleweed> correct. And maybe nobody will notice and close the bug. That happens a lot. Ubuntu has too many bugs for them to be kept well up to date
<ClassBot> 36DAA71NS asked: The problem sometimes is that a bug discovered in ubuntu leads to an orphaned upstream package. Therefore the fix in Ubuntu seems to be easier although it's more expensive on the long run. Right?
<tumbleweed> I don't know if bugs in Ubuntu *lead* to packages being orphaned upstream, but yes, we certainly have packages in Ubuntu that no upstream cares about any more
<tumbleweed> and yes, in that case, fixing it in Ubuntu is the only option
<tumbleweed> when I said "Does it belong in Ubuntu, or in Debian, or upstream?", that requires some context to judge it
<tumbleweed> if you feel unsure, ask in #ubuntu-motu, there are almost alwysa people around who'll help
<tumbleweed> < 36DAA71NS> The problem seems that there's no easy way to get the bugs fixed upstream
<tumbleweed> that's unfortunatly true in many places
<tumbleweed> however there are also upstreams who merge patches I send them within the hour
<tumbleweed> Ubuntu is big, we have a bit of everything :)
<tumbleweed> continuing with my recommendations, if there are no more questions:
<tumbleweed> * Test your fix:
<tumbleweed>   - Test-build it in pbuilder / sbuild / a PPA
<tumbleweed>   - read what lintian has to say. Many packages arrive from Debian, with loud lintian warnings. Don't worry about that, worry about new ones that you are responsible for.
<tumbleweed>   - Does it install / upgrade correctly (if you touched maintainer scripts)
<tumbleweed> these are pretty common sense, but we all slip up :)
<tumbleweed> * Should the bug / patch be forwarded to Debian?
<tumbleweed>   - If you do this, link the Debian bug back to the launchpad bug (also affects project), that way the sponsor knows you did your homework.
<tumbleweed> it's not just to say you did your homework, it'll help future mergers (quite possibly you) to remember
<tumbleweed> ok, I've run out of pre-typed recommendations, and am hoping for some more questions
<tumbleweed> other things I can suggest for people wanting to get into ubuntu devolpment:
<tumbleweed> - take a look at how other people are solving problems. Read natty-changes or install apt-listchanges
<tumbleweed> < 36DAA71NS> So basically a good way is to find the corresponging bugtracker to see whether the upstream project is alive or not
<tumbleweed> most upstreams are alive
<tumbleweed> and many bugs that we fix day to day are about taking patches from upstream bugtrackers and pulling them into Ubuntu
<tumbleweed> or fixing bugs in our packaging
<tumbleweed> these things obviously don't involve any fowarding upstream (although possibly to Debian, for packaging issues)
<tumbleweed> < 36DAA71NS> after that contact MOTUs via IRC and proceed afterwards?
<tumbleweed> Yeah #ubuntu-motu is very friendly to beginner ubuntu contributors. I waste way too many evenings there :)
<tumbleweed> < chadadavis> Does Launchpad's tracker for a package generally link to the corresponding upstream tracker? I.e. does Launchpad have a facility like that built in?
<tumbleweed> yes it does. Most small packages aren't linked to an upstream tracker (this requires registering a launchpad project in th ename of the upstraem package)
<tumbleweed> but most big ones are
<tumbleweed> of course Rhonda will be covering a fair portion of this in her talk tomorrow night, on getting things into Debian
<tumbleweed> anything else? or are we all falling asleep :)
<tumbleweed> < chadadavis> General newbie question: would you recommend browsing bugs across all packages (i.e. the most critical/newest) to get a feel for all of ubuntu, or do newbies contribute more by becoming more familiar with the innards of just a few packages?
<tumbleweed> I'll be honest, I don't browse new bugs on launchpad very much
<tumbleweed> there are pretty awesome people out there who do that, and triage them
<tumbleweed> I'm subscribed to the bugs of packages I care about, and I try to deal with all of them
<tumbleweed> (this does mean my bug inbox gets pretty full when I've been busy with other things)
<tumbleweed> but there's a new site out there to help you find things to fix in Ubuntu (I'm suprised I didn't see dholbach mention it yet)
<tumbleweed> http://harvest.ubuntu.com/
<tumbleweed> that tries to pick out th einteresting things from launchpad, that are ready to deal with
<tumbleweed> < Endanwender> What is with bug-fixes submitted in Debian? How long it need to find the way in Ubuntu?
<tumbleweed> So, Ubuntu releases once every 6 months
<tumbleweed> from about a week after the release, until Debian Import Freeze, we automatically pull new versions of packages from Debian into Ubuntu
<tumbleweed> Debian Import Freeze was around new year, in natty http://wiki.ubuntu.com/NattyReleaseSchedule
<tumbleweed> during that time, any uploads to debian get pulled over pretty quickly (assuming we haven't deviated from Debian)
<tumbleweed> how long between submitting a bug fix to debian and, and the debian maintainer of th epackage uploading th efix, well that varies
<tumbleweed> debian is like any other upsteram in that respect
<tumbleweed> some debian packages are small, actively maintained and have 0 bugs, others are fighting under the deluge of hundreds of bugs. And there's a lot inbetween.
<tumbleweed> anything else?
<ClassBot> Endanwender asked: Have I understood the correctly? Between the release cycles of Ubuntu and Debian no further exchange between bug-fixes and so on takes place?
<tumbleweed> Endanwender: so, there are Debian Developers who take active care of their packages in Ubuntu
<ClassBot> There are 10 minutes remaining in the current session.
<tumbleweed> you could say I'm one of them
<tumbleweed> if I see a serious bug reported in Debian, I'll make sure the fix gets into Ubuntu soon
<tumbleweed> and if I see a bug reported in Ubuntu, I'll fix it in Debian, and sync it across to Ubuntu
<tumbleweed> but there are no formal bug exchanges
<tumbleweed> if you want to forward a bug from Ubuntu to Debian or vice-versa, you need to do it manually
<tumbleweed> (we have tools to automate this in ubuntu-dev-tools)
<tumbleweed> and Rhonda in sure to go into deal on it tomorrow night
<tumbleweed> detail
<tumbleweed> the reason for this is that not all Ubuntu bug reports are of interest, or even relevant to Upstream / Debian
<tumbleweed> the upstreams need to decide for themselves, if they want to spend the time reading and understanding them.
<ClassBot> There are 5 minutes remaining in the current session.
<ClassBot> Endanwender asked: Ah ok. Thx for the info. I'm a little bit surprised about this. I thought both distrubution have a direct exchange concerning this.
<tumbleweed> Endanwender: we keep things that can't be automated perfectly manual
<tumbleweed> but you'll find most Ubuntu developers should know thier way around th Debian and Redhat bugtrackers, quite well
 * tumbleweed guesses that's that
<tumbleweed> thanks for listening everyone, hope you enjoyed th efirst day of Ubuntu Developer Week, and will be back for more, tomorrow
<tumbleweed> good night :)
<ClassBot> Logs for this session will be available at http://irclogs.ubuntu.com/2011/02/28/%23ubuntu-classroom.html
* ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - https://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Questions in #ubuntu-classroom-chat ||
<shizzle> is this the right channel for the Ubuntu Developer week?
<YoBoY> shizzle: yes
<shizzle> Thanks
<octopurba__> does anyone have a book to be a linux developer??
#ubuntu-classroom 2011-03-01
<awanti> Hello friends I am from india. I want to attend the Ubuntu Developer Week. So plz. tell the time?
<pleia2> awanti: the second day starts in 15.5 hours
<rww> awanti: The schedule's at https://wiki.ubuntu.com/UbuntuDeveloperWeek . Click the times on it to get conversions to your timezone.
<awanti> ok thanks I got the timings. In India it will start at 9.30 pm.
<sssssss> Hello
<laxmi> ubuntu wired network problem
<laxmi> wireless works, wired does not work
<leoquant> hi laxmi for support please join #ubuntu
<leoquant> via /join #ubuntu
<laxmi> ok
<c2tarun> !log
<ClassBot> Logs for all classroom sessions that take place in #ubuntu-classroom can be found on http://irclogs.ubuntu.com/
<ubot2> Official channel logs can be found at http://irclogs.ubuntu.com/ . LoCo channels are now logged there too; for older LoCo channel logs, see http://logs.ubuntu-eu.org/freenode/
<deepraj> hello !!
<ana_s> hi all
<coz_> hey guy
<ana_s> the schedule link seems to be down
<maxpish> hi, i'm new in this classroom, i'd like to know how i can join ubuntu developers community...
<maxpish> could someone help me??
<c2tarun> !log
<ClassBot> Logs for all classroom sessions that take place in #ubuntu-classroom can be found on http://irclogs.ubuntu.com/
<ubot2> Official channel logs can be found at http://irclogs.ubuntu.com/ . LoCo channels are now logged there too; for older LoCo channel logs, see http://logs.ubuntu-eu.org/freenode/
<view666> hello,boys and grils
<anirudh24seven> can i know when the sessions start ? in how many hours ? 3 ?
<Mkaysi> anirudh24seven: http://is.gd/8rtIi
<Mkaysi> (Link from topic)
<duanedesign> 16:00utc
<anirudh24seven> thanks
<anirudh24seven> sorry for not having looked through earlier
<anirudh24seven> was checking it out before looking at your link... thanks anyway
<Vishal_> wen the class is gonna start??
<serfus> Vishal_, http://people.ubuntu.com/~nhandler/classroom.html
<lmontrieux> Vishal_: in about 1 hour
<Vishal_> thnx
<hellyeah_> what would be the topic of discussion in class?
<Nijabo> hellyeah_, 16.00 - How to write a compiz plugin
 * fisch246 puts on atom heart mother album to bring him into the mood of Learning Ubuntu :D
<misterxyz> msg NickServ identify atzenmusik
<Mkaysi> misterxyz: If that is your password, you should change it immidiatly.
<roelandt> Or maybe it's too late.
<kaydsoft> hi
<smspillaz> dholbach: are we good to start ?
<dholbach> we are
<smspillaz> awesome
<dholbach> let me do a quick introduction :)
<smspillaz> sure thing!
<dholbach> HELLO MY FRIENDS! ARE YOU READY FOR DAY 2?
<techbreak_> smspillaz, :) so we are begining right ?
<smspillaz> (woohoo!)
<techbreak_> dholbach, smspillaz yeah :)
<dholbach> please join #ubuntu-classroom-chat if you haven't done that yet
<dholbach> it's the place where all the questions and chat goes
<dholbach> and if you do have questions, please ask
<dholbach> but please prefix them with QUESTION:
<dholbach> ie: QUESTION: smspillaz: Do you have pets?
<smspillaz> I have one cat ;-)
<dholbach> all the information you need should be available at https://wiki.ubuntu.com/UbuntuDeveloperWeek
<smspillaz> he is very awesome :)
<dholbach> have a great day 2
<dholbach> it's great to have you!
<dholbach> now let's kick off the day
<chandan_kumar> smspillaz, yaa we aready.
<smspillaz> dholbach: let me know when I'm good to start :)
<dholbach> smspillaz, also known as Sam Spilsbury graciously agreed to give a session, and he'll talk to you about bringing more bling to compiz by writing spiffy plugins
<dholbach> smspillaz, the stage is yours!
<smspillaz> horray!
<smspillaz> ok, awesome, so yes, here I am, I am the maintainer of the Compiz 0.9 series, i.e the version of compiz that will be used in Ubuntu 11.04 and Unity as well as most upcoming distros
<smspillaz> first things' first, because I overprepare for everything, I made some documents that you all might find useful (and me too!) when following me
<smspillaz> so the first one is the internal architecture of compiz
<smspillaz> which can be found here:
<smspillaz> http://smspillaz.ucc.asn.au/unity/compiz_arch/compiz_arch.pdf
* ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - https://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Questions in #ubuntu-classroom-chat || Event: Ubuntu Developer Week - Current Session: How to write a compiz plugin  - Instructors: smspillaz
<smspillaz> and the second is a 7 page guide on writing compiz plugins, which is half-finished, since I've been quite busy this week
<ClassBot> Logs for this session will be available at http://irclogs.ubuntu.com/2011/03/01/%23ubuntu-classroom.html following the conclusion of the session.
<smspillaz> http://smspillaz.ucc.asn.au/unity/compiz_arch/writing.odt
<smspillaz> so feel free to grab those :)
<smspillaz> alrighty, so starting from the beginning
<smspillaz> first of all, a quick introduction to how compiz works, and what exactly its function is
<smspillaz> and then how to get and compile a development version of compiz, or just develop for it on ubuntu
<smspillaz> and then I'll do a quick walkthrough of the basic structure of a plugin and some commonly done things in plugins
<smspillaz> ok, so as for how compiz works, and what exactly it does
<smspillaz> to take a page from the compiz wiki, compiz is basically what we call a "Compositing Window Manager" in X land, which means that as well as managing windows on screen, it also is in charge of drawing those windows. This technology came about in around 2005ish when XComposite came about
<smspillaz> so this means that in terms of your scope of compiz plugins, you can affect how windows are actually managed, affect how they are drawn, and affect how the entire scene is drawn
<smspillaz> along with its plugin interface, this makes it pretty much possible to do any bling that you want
<smspillaz> so, now moving on to exactly how to set up a development environment
<smspillaz> luckly, ubuntu makes this pretty easy
<smspillaz> just sudo apt-get install compiz-dev and compiz-plugins-main-dev and you're done
<smspillaz> (On maverick, it is compiz-fusion-plugins-main)
<smspillaz> but, if you want to do development in a little more, I usually suggest having a local build of compiz handy.
<smspillaz> Luckily, most of that is relatively straightforward these days, since there are scripts to do that
<smspillaz> http://git.compiz.org/~soreau/scripts/ <- like these fantastic ones
<smspillaz> just clone the git repo there and with the script you'll have a full working installation from source.
<smspillaz> This helps if, for example, some plugin does something similar to what you want to do, and you can start hacking on that plugin first.
<smspillaz> so, a quick question I've recieved
<smspillaz> QUESTION: What about Ubuntu 11.04
<smspillaz> so, this tutorial here, as I probably should have explained will be for Ubuntu 11.04
<smspillaz> since compiz was re-written in between the 0.8 and 0.9 series (maverick and natty)
<smspillaz> however, those git scripts about should also work on maverick
<smspillaz> Now on to the nitty gritty of writing your first plugin
<smspillaz> Compiz plugins are written in C++. We don't really use very many advanced features of the languages or external libraries that heavily, so if you have a basic knowledge of that, then you should be good
<smspillaz> we only use boost to a small extent, glib more recently and sigc
<smspillaz> CMake is also used for building rather than automake
<smspillaz> to answer another quick question
<smspillaz> QUESTION:Is it possible to do some type of local build using  the ubuntu packaging and pbuilder or something like that so  that you can remove it easily?
<smspillaz> So, the answer to this is is that you can indeed clone lp:compiz , however, this is the packaging branch of compiz core, and doesn't get all the modules
<smspillaz> in addition, I'm not sure about how to make it build and install locally
<smspillaz> (plus, adding extra stuff to it is a pain since you need to rebuild the whole thing all the time using bzr bd)
<smspillaz> so I'd suggest you stick to the scripts or to the master source
<smspillaz> (A link to the build tutorial is in the documents I linked to earlier)
<smspillaz> so now back to writing plugins
<smspillaz> so the basic knowledge, you will need once again, is C++, boost or CMake
<smspillaz> note that OpenGL isn't really a strict requirement, since a lot of the graphics functions that are commonly used are abstracted through the API of compiz
<smspillaz> it's just that if you want to go down the road of bling-bling, then OpenGL is nice
<smspillaz> ok, so now for creating your plugin project
<smspillaz> so to start off with, say you want to create a plugin called "moveleft" which, every time a window is opened, if moves every other window to the left
<smspillaz> so, your directory structure would be
<smspillaz> moveleft
<smspillaz> -
<smspillaz> -> src
<smspillaz> ---> moveleft.cpp
<smspillaz> ---> moveleft.h
<smspillaz> -> moveleft.xml.in
<smspillaz> -> CMakeLists.txt
<smspillaz> now to explain each component of that
<smspillaz> basically, the .cpp and .h files are the implementation of your plugin, eg the loadable object code
<smspillaz> the .xml.in describes information about your plugin for CCSM and also its options
<smspillaz> and the CMakeLists.txt is the buildsystem
<smspillaz> now, lucky for plugin authors, the buildsystem for compiz plugins is insanely easy
<smspillaz> all you need is three lines
<smspillaz> find_package (Compiz REQUIRED)
<smspillaz> include (CompizPlugin)
<smspillaz> compiz_plugin (moveleft PLUGINDEPS foo bar PKGDEPS baz)
<smspillaz> so now on to what each line dos
<smspillaz> *does
<smspillaz> the first basically finds compiz with pkgconfig
<smspillaz> the second imports all the plugin buildsystem
<smspillaz> the third sets up a new "compiz plugin" project in CMake with the name "moveleft" depending on other plugins "foo" and "bar" and depending on external packages "baz"
<smspillaz> so to disect that further
<smspillaz> now that you've called your plugin "moveleft" you must stick with that shortname everywhere
<smspillaz> so for example, the .xml.in must be named "moveleft"
<smspillaz>  However in the src/ tree, you don't need to worry about that
<smspillaz> another interesting thing is that you can depend on other plugins
<smspillaz> compiz 0.9 was designed in mind with inter-plugin dependency with each plugin providing objects to other plugins
<smspillaz> so, a common example of this is the fact htat the opengl and composite bits of compiz are in fact plugins themselves
<smspillaz> so most plugins that need to access this functionality will set those as their PLUGINDEPS
<smspillaz> now on to the metadata file
<smspillaz> I've explained this in more detail in the documents I linked to earlier
<smspillaz> but basically, here you need to define your plugin name too
<smspillaz> so <compiz>
<smspillaz>  <plugin name="myplugin" useBcop="true">
<smspillaz> the useBcop is crucial if you want your life to be easier with autogenerated options code
<smspillaz> you can also define some options there
<smspillaz> but we will get back to that later
<smspillaz> so close all the tags and save it
<smspillaz> next, you need to define the classes of your plugin
<smspillaz> so the way things work in compiz is that each plugin is responsible for one or both of two things
<smspillaz> 1) attaching their own information and hooks to existing objects
<smspillaz> 2) creating their own objects
<smspillaz> the vast majority of plugins only do 1)
<smspillaz> and they usually hook two very important existing object
<smspillaz> CompWindow and CompScreen
<smspillaz> so, starting with the second
<smspillaz> compiz runs per X-screen
<smspillaz> so, this means that CompScreen is kind of like the "master class" where everything relating to everything going on on screen happens
<smspillaz> CompWindow is a representation of some managed X11 window
<smspillaz> (and believe me, there are a lot of them, see xwininfo -root -tree for how much there is to manage)
<smspillaz> now each plugin works by attaching their own structures to those core objects
<smspillaz> so if you defined a MoveLeftScreen as attaching to CompScreen
<smspillaz> there would be one MoveLeftScreen per CompScreen
<smspillaz> same thing with MoveLeftWindow
<smspillaz> this allows you to store data and functions on those core structures
<smspillaz> so, for moveleft, you might want to track if you've moved a window already, and if it has moved since you've moved it
<smspillaz> so you would store that information in MoveLeftWindow
<smspillaz> the actual attaching
<smspillaz> ok
<smspillaz> so the actual attaching is done by a special class called PluginClassHandler
<smspillaz> it's basically a template class that sets up some special indexes in the base object and attaches your class to it
<smspillaz> so that, whenever you want to get your own data for the base object, you just call MoveLeftWindow::get (CompWindow *)
<smspillaz> so in constructing your MoveLeftWindow, you'll get something like:
<smspillaz> class MoveLeftWindow :
<smspillaz>     public PluginClassHandler <MoveLeftWindow, CompWindow>,
<smspillaz>     public WindowInterface
<smspillaz> {
<smspillaz> }
<smspillaz> etc
<smspillaz> (See the handout)
<smspillaz> the WindowInterface is for interfacable functions and will be explained in a bi
<smspillaz> so now that you've got your MoveLeftScreen and MoveLeftWindow defined as classes attaching to the relevant core structures
<smspillaz> there are a few final things to do
<smspillaz> the first is to define a VTable for your plugin
<smspillaz> this tells core how to load and what "attaching classes" to initialize when objects are created
<smspillaz> we have templates for the most common usecases
<smspillaz> so, you'd have
<smspillaz> class MoveLeftPluginVTable :
<smspillaz>     public CompPlugin::VTableForScreenAndWindow <MoveLeftScreen, MoveLeftWindow>
<smspillaz> {
<smspillaz>     public
<smspillaz>         bool init ();
<smspillaz> }
<smspillaz> the only thing yout need to put in your init function for now is a core ABI version check
<smspillaz> eg
<smspillaz> if (CompPlugin::checkPluginABI ("core", CORE_ABIVERSION)) return true; else return false;
<smspillaz> and finally, a extern C object definition for core to look up the VTable on plugin load
<smspillaz> and like all good things, we have a macro for that
<smspillaz> COMPIZ_PLUGIN_20090315 (MoveLeftPluginVTable, moveleft);
<smspillaz> note the use of "moveleft" again
<smspillaz> that is *crucial*
<smspillaz> since the library is going to be named "moveleft" and core will be loading a plugin called "moveleft"
<smspillaz> so its going to be looking for the right symbol
<smspillaz> As a quick aside, I've been asked to explain what CCSM is
<smspillaz> in fact, I should probably explain some of the other compiz modules
<smspillaz> so "compizconfig" == our library to handle configuration and desktop integration amongst different settings backends (eg ini, dconf, gconf, kconfig4)
<smspillaz> "ccsm" == "compizconfig-settings-manager" which is a tool to adjust all the settings in compiz (seriously, there are tons)
<smspillaz> "core" == the core executable of compiz, where the base window management logic and API comes from
<smspillaz> ok, so back to plugins
<smspillaz> once you have checked off implementing your MoveLeftScreen, MoveLeftWindow, MoveLeftPluginVTable, COMPIZ_PLUGIN_20090315 etc
<smspillaz> and #included <core/core.h>
<smspillaz> you now have an installing plugin!
<smspillaz> however, it doesn't really do all that much
<smspillaz> so lets get on to something more interesting
<smspillaz> what about being able to "plug-in" to things that core or other plugins do
<smspillaz> ah, QUESTION: how can we make sure there isn't another plugin called "moveleft"
<smspillaz> well, the simple answer to that is, you don't
<smspillaz> there aren't too many compiz plugins around, but if a plugin with the same name is already loaded then yours fails to load
<smspillaz> ok, back to being able to plugin-in to things
<smspillaz> so, as I was saying a bit before, we have another special thing in compiz called "wrapable interfaces"
<smspillaz> these are basically just call chains of function objects in doubly linked lists
<smspillaz> when you thing you are calling some core function that was implemented in an "interfacable way" you are actually just calling a function which increments the linked list counter by 1 and calls the next function in the list
<smspillaz> the convention is that at the end of each of the plugin's function calls, they will call the same core function again, which increases the function counter, calls the next function and so forth
<smspillaz> this allows us to, on each core function call, call lots of other functions at the same time
<smspillaz> So the first thing you would have seen in the MoveLeftWindow definition was that we inherited a class called "WindowInterface"
<smspillaz> this is the "Interface class" to all of these Intefacable functions
<smspillaz> so if you have a look in core/include/window.h, you will see all the functions that plugins can hook
<smspillaz> by inheriting this class you are said to be "implementing" this interface
<smspillaz> by default, the functions in WindowInterface all do nothing, but that is because they are all virtual!
<smspillaz> so to change that, you overload one of the functions
<smspillaz> for example, void moveNotify (int, int, bool); is a function that tells us when a window has moved and by how much
<smspillaz> so if we implement a function like that in our MoveLeftWindow class which inherits WindowInterface, we will have implemented that
<smspillaz> next, in the MoveLeftwindow constructor, we have a call to WindowInterface::setHandler (window);
<smspillaz> what this does, is set the handler of the interface class that we inherited to the base class that owns the function
<smspillaz> so that now whenever we call the base class function
<smspillaz> our function will be called first
<smspillaz> then functions from the previously loaded plugin
<smspillaz> etc etc
<smspillaz> until you get to the main function in the class
<smspillaz> ok, another question!
<smspillaz> QUESTION: so, can i write a separate MoveLeft function,  embed in Window.h, and then call n override it whenever n  wherever i want?
<smspillaz> So, I'm not too sure what is meant by this, but if you mean adding a new wrapable function to core, I am afraid that is out of the scope of this tutorial
<smspillaz> plugins should generally only overload the functions in the interface classes
<smspillaz> anyways, interfaces are explained a bit more in the document I posted
<smspillaz> next up: options
<smspillaz> so say you've interfaced CompWindow::windowNotify from WindowInterface
<smspillaz> so now whenever someone else calls window->windowNotify (), MoveLeftWindow::windowNotify is also called
<smspillaz> and you've handled the CompWindowNotifyMap there to loop over all windows in screen->windows () (eg, loop over an std::list) and call w->move (x, y, immediate) to move them to the left
<smspillaz> but now, you want to play with an option whereby it actually moves windows to the right instead of the left!
<smspillaz> so you need to go back into your moveleft.xml.in and add some information about this option
<smspillaz> so <option name="right" type="bool">
<smspillaz>   <_short>Move right</_short>
<smspillaz>   <_long>Do the wrong thing </_long>
<ClassBot> There are 10 minutes remaining in the current session.
<smspillaz>  <default>false</default>
<smspillaz> </option>
<smspillaz> that defines the option, with the default value of false
<smspillaz> now, in your MoveLeftScreen make sure you inherit MoveleftOptions (note the small case l) to get access to autogenerated code from this option
<smspillaz> ok, so now here is where it gets funky
<smspillaz> that options code is owned by MoveLeftScreen
<smspillaz> so you need to MoveLeftScreen *mls = MoveLeftScreen::get (screen) in your ::windowNotify
<smspillaz> then, you want to read the option to see what it says
<smspillaz> so for "right" that would be
<smspillaz> mls->optionGetRight ()
<smspillaz> and it returns true or false depending on the option value
<smspillaz> now, here is how the generation code works
<smspillaz> first you have optionGet, which is prepended to call getters
<smspillaz> then you have "Right" right came from "right" in the xml file
<smspillaz> so the parser replaces underscores with CamelCase
<smspillaz> so if you had right_foo
<smspillaz> it would be come
<smspillaz> optionGetRightFoo ()
<smspillaz> Ok, cool so now you've read the option
<smspillaz> so with some simple math
<smspillaz> and that skeleton
<smspillaz> you should be able to make everything go to the left when a new window is mapped
<smspillaz> or at your choosing
<smspillaz> go to the right
<smspillaz> I'll open the floor to questions
<smspillaz> ok
<smspillaz> QUESTION: since you mentioned compiz 0.9 written for  Ubuntu, do you use any distro specific API  implementations which may break if I write a plugin for,  say, Arch?
<smspillaz> Good question
<ClassBot> There are 5 minutes remaining in the current session.
<smspillaz> so, compiz 0.9 was written independently, and has only been started to be used for unity until early this year
<smspillaz> so it is still an upstream project
<smspillaz> and as such I keep the API consistent between all version
<smspillaz> there used to be an API inconsistency with the glib mainloop stuff, but that has been upstreamed
<smspillaz> any other questions?
<smspillaz> (I might just paste again those documents I'm referring to in case you missed them)
<smspillaz> http://smspillaz.ucc.asn.au/unity/compiz_arch/compiz_arch.pdf
<smspillaz> and
<smspillaz> http://smspillaz.ucc.asn.au/unity/compiz_arch/writing.odt
<smspillaz> QUESTION: What happened to the compiz mindcontrol?
<smspillaz> I love it
<smspillaz> that project would be cool, except that the developer with that idea didn't cobble together the funds to buy a headset for that
<smspillaz> plus it requires shaving your head
<smspillaz> which I would never do since I have awesome hair
<smspillaz> any more questions before I wrap it up?
<smspillaz> ok, well it is 16:59, I should probably wrap it up
<smspillaz> thanks for attending!
<smspillaz> now go write some awesome plugins!
<jibel> Hi folks,
* ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - https://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Questions in #ubuntu-classroom-chat || Event: Ubuntu Developer Week - Current Session: How Stable Release Updates work - Instructors: jibel
<ClassBot> Logs for this session will be available at http://irclogs.ubuntu.com/2011/03/01/%23ubuntu-classroom.html following the conclusion of the session.
<jibel> Thanks to smspillaz for this awesome introduction to compiz.
<jibel> my name is Jean-Baptiste Lallement, I live in France and I'm working on the QA Team.
<jibel> I've started my QA activity with lot of bug triaging, then I moved to ISO Testing, Automated Desktop Testing and Stable Release Updates.
<jibel> In this session we will talk about Stable Release Updates, and how the QA process contributes to rock solid stable releases.
<jibel> Once an Ubuntu release is out, updates for it follow a very specific procedure called a "Stable Release Update" aka "SRU"
<jibel> Updates are only released under certain circumstances.
<jibel> Why this SRU process ?
<jibel> Unlike development releases (at the moment Natty), official releases of Ubuntu are widely deployed and used by a wide variety of users.
<jibel> During the development, the population are developers, early adopters or advanced users, they are aware that pre-release software may break and they accept the risk.
<jibel> When you are using an official release, you use your system for your day to day work and are expecting a high degree of stability.
<jibel> Any problem can be really disruptive and the system should not requires the intervention of the user.
<jibel> Stable release updates are automatically recommended to a very large number of users. So it is critically important to be paranoÃ¯d and to treat them with extreme cuation.
<jibel> Therefore, when updates are proposed, they must be accompanied by a strong rationale and present a low risk of regressions.
<jibel> Some will argue "It's just a one line change, go ahead"
<jibel> Right, let me give you one example, with bug 559822 and its friend bug 610975
<jibel> The cause of the bug wasa C++ library (wxwidgets2.8) was uploaded with no code changes. Due to an underlying toolchain change/bug, this caused an ABI change, causing a lot of unrelated packages to break.
<jibel> It was not a one line change, it was a no change at all bug.
<jibel> So people, when dealing with SRU, expect the unexpected.
<jibel> When should you request a Stable Release Update ?
<jibel> Not all bugs are good candidates to Stable release updates,
<jibel> and in general only those that fix high impact bugs are
<jibel> examples of such bugs include:
<jibel> * security vulnerabilities. These are done by the security team and follow a slightly different but somewhat similar process
<jibel> * severe regressions from a previous release.
<jibel> This includes packages which are unusable, like being uninstallable or crashing on startup.
<jibel> * bugs which may cause data loss
<jibel> bugs which doesn't fit under the above categories but have an obviously safe patch
<jibel> and affect an application rather than critical infrastructure packages (like X or the Kernel)
<jibel> * for Long Term Support (LTS) we regularly want to enable new hardware.
<jibel> such changes are appropriate provided that we can ensure to not affect upgrades on existing hardware
<jibel> And the last type of SRU
<jibel> * New version of commercial software in the canonical partner archive
<ClassBot> wolfpack asked: Is stable release update has only bug fixes or can it have features upgrade ?
<jibel> SRU doesn't introduce new feature, or with rare exceptions.
<jibel> For new features, or new upstream versions of packages, but don't fix critical bugs you should request a backport instead.
<jibel> New features are usually not good candidates.
<jibel> So How to proceed ?
<jibel> You've found a good candidate ? There are a few steps that you must follow in order to see your fix land in a Stable Release.
<jibel> First of all, the bug must be fixed in the current development release
<jibel> and the task in the bug report set to "Fix Released"
<jibel> This ensures that the fix won't be missed on newer version of the package and that the bug won't be reintroduced
<jibel> If it is not fixed, in the development version, the request for SRU will be rejected.
<ClassBot> darkdevil58 asked: if suppose i fix a bug on my 10.04 system, still the fix release be rejected as i m not using 10.10?
<jibel> If you want a fix in 10.04 LTS, it must be fixed in the latest development release - Natty - before being ported to 10.04
<jibel> We can accept an SRU for 10.04 but which is not necessarily a good candidate for 10.10
<jibel> When filing an SRU add all necessary the information to the bug description to help with the review of the report. Ideally, make sure it contains:
<jibel> * The rationale for the SRU. the impact of the bug on users, and a justification for backporting the fix to the stable release
<jibel> * Explain how the bug has been addressed in the dev branch, and attach a minimal patch against the current stable version of the package.
<jibel> At this point, if you think that preparing the patch will be time consuming,
<jibel> you should get approval from the SRU Team first.
<jibel> On the other hand its useless to spend time on a patch that is not critical enough to match SRU criteria.
<jibel> So, in doubt, don't hesitate to ping the SRU team
<jibel> An important part, document the test case with detailed instructions how to reproduce the bug.
<jibel> Document the test case with detailed instruction how to reproduce the bug
<jibel> for example https://bugs.launchpad.net/ubuntu/+source/software-center/+bug/639701
<jibel> includes 3 easy steps to reproduce the issue, and verify the fix.
<jibel> The steps should allow anyone, not familiar with the package to reproduce the bug and verify that the issue is fixed with the updated package.
<jibel> * Add information about potential regressions and inadvertent side effects.
<jibel> For example in https://bugs.launchpad.net/ubuntu/+source/txaws/+bug/634022 , the dev explains why there's very little risk of regression
<jibel> Once you've provided all the required documentation
<jibel> * Target to the appropriate serie and subscribe ubuntu-sru
<jibel> * Upload the fixed package. If you can not do it yourself, attach a debdiff and subscribe ubuntu-sponsor.
<jibel> * If everything goes right, the archive admins will approve and publish you fixed package to the -proposed repository.
<jibel> And please, keep this rule in mind: One bug = One report
<jibel> Then we enter in the second phase of the Stable Release Update: SRU Verification
<jibel> The current set of pending SRUs is tracked at http://people.ubuntu.com/~ubuntu-archive/pending-sru.html
<jibel> On this page, you'll find a list of packages currently in -proposed
<jibel> and available for testing.
<jibel> For each package, there's an indication of which version is in which pocket (-security, -updates, -proposed) and a list of bugs fixed by the upload
<jibel> The process we follow to verify a package is roughly:
<jibel> - setup a testing environment
<jibel> - Try to reproduce the issue in the most recent published version of the software
<jibel> - Enable the -proposed repository and install the proposed update for that software
<jibel> - Try to reproduce the issue with the updated software
<jibel> The first step is to create a clean testing environment of the release the fix is targeted for.
<jibel> We want to eliminate any outside effects and control the changes brought by the update of the package.
<jibel> To create this environment any virtualization solution is good: KVM, VirtualBox, VMWare, ... are very useful to create an isolated testing environment
<jibel> You can use snamshot to quickly setup a fresh env or rollback to a previous state.
<jibel> Doing testing in a chroot is also good enough.
<jibel> If you are trying to reproduce hardware related issues, then, of course, VM technologies are not the right choice.
<jibel> Hardware specific bugs offer their own special problems; if we don't have the hardware, it's much harder to reproduce
<jibel> There's not much we can do except prompt on the bug report for people affected by the bug to do the testing and install the package ourselves to look for regressions.
<jibel> These are often kernel, X, libc (where the compiler is bounded to CPU capabilities) problems
<jibel> Then we want to make sure that all updates are applied to the testing environment and we can start the testing and try to reproduce the bug
<jibel> We want to do this so that we know what we're testing for when we install the proposed package.
<jibel> Often, just doing this will offer us more insights into the actual problem being solved and sometimes discover a regression or another bug.
<jibel> If we can't reproduce the initial problem, we have much less confidence that the update actually is going to fix the issue.
<jibel> In this situation, whether the Test Case is wrong or incomplete, or the condition to reproduce the bug are not well defined, so we can have a doubt that the fix will really fix the bug in every conditions.
<jibel> l'll illustrate the verification phase with bug https://bugs.launchpad.net/ubuntu/+source/metacity/+bug/494096
<jibel> This is a critical usability defect. Clicking on a window send the events to the underneath window.
<jibel> wrt to this bug a patch has been attached in comment #23 and the bug has been nominated for SRU between comments 25 and 26.
<jibel> The description is fairly complete, the issue is easy to understand and it includes a test case.
<jibel> That's not always the case, so sometimes you get to figure out how to test for the condition, or if that's really unclear what the bug is and how to reproduce, you can simply set the status back to 'in progress' asking for more info from the reporter or the dev.
<jibel> The first task is to reproduce the issue.
<jibel> Just follow the steps described in the bug report. Once this is done you can enable -proposed
<jibel> You can do this through the menus, via System -> Admin -> Software Sources menu
<jibel> The details to enable -proposed are at https://wiki.ubuntu.com/Testing/EnableProposed
<jibel> As part of reproducing, make sure to double-check exactly which version you are testing
<jibel> From the command line, apt-cache policy is your friend, and in this case
<jibel> $ apt-cache policy metacity
<jibel> metacity:
<jibel>   Installed: 1:2.30.1-0ubuntu1
<jibel>   Candidate: 1:2.30.1-0ubuntu1.1
<jibel>   Version table:
<jibel>      1:2.30.1-0ubuntu1.1 0
<ClassBot> There are 10 minutes remaining in the current session.
<jibel>         500 http://archive.ubuntu.com/ubuntu/ lucid-proposed/main Packages
<jibel>  *** 1:2.30.1-0ubuntu1 0
<jibel>         500 http://fr.archive.ubuntu.com/ubuntu/ lucid/main Packages
<jibel>         100 /var/lib/dpkg/status
<jibel> We see that 1:2.30.1-0ubuntu1 is installed and the candidate 1:2.30.1-0ubuntu1.1 from -proposed is available for update.
<jibel> You can install it either with update-manager or from the command line:
<jibel> $ apt-get install metacity
<jibel> Only update this package and its dependencies, but not all the packages from -proposed as they may introduce some other issues.
<jibel> Once it is installed logout/login and try to reproduce the bug again.
<jibel> If the result is what you expect from the test case, we can start looking for regressions as well.
<jibel> Some things to look for in term of regressions:
<jibel> * install requirements; does it depend on other packages in proposed, particularly ones not from the same source package?
<jibel> if it does, and both packages aren't moved into updates at the same time, the package will be uninstallable.
<jibel> * possible differences in behavior for fresh install versus update from buggy version
<jibel> sometimes the fixes only show up for new installations, particularly for packaging problems
<jibel> just generally play with the app; helps here if you're familiar with it.
<jibel> For metacity, that's pretty straightforward, we'll go ahead use our desktop, and see if things still work properly
<jibel> If everything passes then tag the report with verification-done
<jibel> Quicky another example where things didn't went so well, which affects ssh
<jibel> https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/713002
<jibel> ssh is a key component of  the system and it is critical to not break it.
<jibel> The bug is that you cannot disable access from IPv4 hosts to IPv6 only hosts. This makes life of sysadmins harder to keep sane access control where IPv6 is the primary protocol.
<ClassBot> There are 5 minutes remaining in the current session.
<jibel> You can see that the bug description has been rewritten by the developer to improce the documentation. He was kind enough to keep the history of the original report for reference.
<jibel> He also added a test case, every commenters and tester on the report agreed to say that the bug was fixed.
<jibel> But...
<jibel> A security guy comes in and said "STOP! this fix doesn't includes the fixes from previous version"
<jibel> This is what is called a regression. The report has been tagged as verification-failed and the package will be removed from proposed.
<ClassBot> akshatj asked: What if a bugfix fixes a security issue but introduces another type of bug that is not security related like a usablity bug(not sure if this is possible)
<jibel> If a fix introduces a regression it is rejected.
<jibel> I don't have bug in mind to illustrate your question though.
<jibel> Finally both failures and successes are important to report!
<jibel> also report anything out of the ordinary or unexpected you had to do in testing
<jibel> it's also helpful to update the description of the bug if elements are missing (eg. you created a TESTCASE)
<jibel> We could use help in doing verifications and looking for regressions
<jibel> There's an SRU verification team on launchpad at https://launchpad.net/~sru-verification which tracks the SRUs,
<jibel> And if, when doing all this, you run into problems, you can always solicit for help on #ubuntu-bugs and #ubuntu-testing, as well as asking directly on the bug report.
<jibel> Anyone can contribute by doing SRU verification.
<jibel> any question ?
<jibel> aquarius, the floor is yours
<aquarius> jibel, thanks, and thanks for a great talk! I now know loads more about SRUs :-)
* ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - https://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Questions in #ubuntu-classroom-chat || Event: Ubuntu Developer Week - Current Session: The Ubuntu One App Developer Programme - Instructors: aquarius
<aquarius> Hi, all!
<ClassBot> Logs for this session will be available at http://irclogs.ubuntu.com/2011/03/01/%23ubuntu-classroom.html following the conclusion of the session.
<aquarius> I'm Stuart Langridge, from the Ubuntu One team, and I'm here to talk about our upcoming app developer programme.
<aquarius> Do please ask questions throughout the talk: in the #ubuntu-classroom-chat channel, write QUESTION: here is my question
<aquarius> Up until now, your ability as developers to do cool things with Ubuntu One has been limited.
<aquarius> But I'm going to change all that.
<aquarius> We want to make it possible, and easy, for you to add the cloud to your apps and to make new apps for the cloud
<aquarius> So we do all the heavy lifting, and your users (and you!) get the benefits.
<aquarius> Imagine, for example, you've made a recipe manager application.
<aquarius> So you can type in all the recipes you like to cook, and you've got a permanent record of them.
<aquarius> (For me, that would be: get a pizza base; put pepperoni on it. You'll be better at that than me.)
<aquarius> Don't really want to take your laptop into the kitchen, though, of course.
<aquarius> So, build a mobile app which you sign into with Ubuntu One, and have that show all your recipes too.
<aquarius> And a web app which you sign into with Ubuntu One, so that you can look up recipes while you're at a friend's house.
<aquarius> This is the sort of thing that we want to make easy; giving your users and you quick access to the Ubuntu One technology.
<aquarius> Mobile access to your data; web app access to your data; saving files direct into Ubuntu One; publishing files and photos from all your apps; adding playlists to the Ubuntu One music streaming app; streaming the user's own music into a game you've written.
<aquarius> This stuff is all being heavily worked on right now as we speak.
<aquarius> So this talk won't be too detailed with specifics, because they might change.
<aquarius> I want to give you a flavour of what will soon be possible, and answer questions, and give some pointers, and get your thoughts.
<aquarius> Also, this is Developer Week, so I can talk about what the components we're working on are and then admire all the cool ways you all come up with for snapping them together, rather than waiting for marketing to come up with a "product" for you to use :)
<aquarius> So, some components that can be snapped together.
<aquarius> You'll be able to sign in to a web application with Ubuntu One.
<aquarius> This means that you don't have to manage your own identity system, think about password renewal, all that.
<aquarius> This is just like "sign in with Facebook" or "sign in with Twitter"; it's OpenID-based, and lets your users sign in to a web app and you'll know their Ubuntu identity.
<aquarius> And that identity is shared everywhere; you can build web apps and mobile apps and Windows apps and Ubuntu apps which all share the same identity and know who they're talking to.
<aquarius> Once you've signed in to an app with Ubuntu One, that app can ask for permission to work with your data.
<aquarius> This lets you, developers, build applications that work on the desktop, on the web, on mobile phones.
<aquarius> The recipe manager example I mentioned above is one sort of thing you could do, there
<aquarius> Your users use the nice recipe manager app on Ubuntu, which you've build with Quickly or whatever you prefer
<aquarius> And then they can go to yourrecipemanager.com and sign in with Ubuntu One
<aquarius> yourrecipemanager.com then asks them for permission to access their "recipes" database
<aquarius> and can then show them all their recipes on the web!
<aquarius> Your app (yourrecipemanager.com) does this via OAuth; it goes through the standard OAuth dance to get an OAuth token which can be used to access the user's recipes CouchDB database
<aquarius> And your users can be happy that it's secure, because yourrecipemanager.com will only have access to their recipes database; it can't read their contacts, or their files, or their credit card info.
<ClassBot> fisch246 asked: about when can this kind of stuff be implemented? 11.04? 11.10? 12.04?
<aquarius> fisch246, everything I'm talking about today should be available for the 11.04 release.
<ClassBot> th3pr0ph3t asked: Isn't it too early to start building apps for ubuntu one? -- I mean that thing can hardly sync files
<aquarius> th3pr0ph3t, the 11.04 release will bring some massive improvements to all the Ubuntu One services -- data, music, files
<aquarius> the stuff I've talked about so far is around data, and I'll get on to files in a bit :)
<aquarius> But you can imagine sharing other sorts of data between applications.
<aquarius> Imagine, for example, an achievements system.
<aquarius> You write a few games; some on the web, some on mobile phones, some on the Ubuntu desktop, some on Windows.
<aquarius> And every time the user achieves something in a game, you save that achievement to that user's "achievements" database.
<aquarius> On Ubuntu, you'd save it into desktopcouch, and Ubuntu One will take care of synchronising that into the cloud.
<aquarius> On Android, your game would include the DroidCouch library which gives you simple access to save data directly into the user's personal cloud databases.
<aquarius> On the web, your game's backend could use the u1couch Python library to do the same thing, save directly into the cloud, or you could just use the underlying REST API (which is just standard CouchDB with OAuth signing; u1couch is just a wrapper)
<aquarius> Or you could write your own wrapper library for PHP or Rails or Flash or whatever you prefer (and then tell me about it so I can point to the documentation for it!)
<aquarius> At that point, all your games save achievements to the same place, so all your games can show you the achievements you've won in any game
<aquarius> And, as before, you can set up yourachievements.com where a user can log in and see all their achievements.
<ClassBot> dael99 asked: everything will be web-based? Will some kid of API be available to use trough Python, Java or C directly?
<aquarius> dael99, certainly not everything is web-based. Ubuntu One is about you working with your stuff on your own terms
<aquarius> So part of that is that your data is everywhere, if you want it to be.
<aquarius> You can work with the copy that's in the cloud, or with the local copy of it, whether that's data, files, music, whatever.
<aquarius> For working with data in the cloud, there'll be web-based APIs, and then wrappers for those APIs for various languages.
<aquarius> So you'll be able to, for example, just import a Python library and write code Pythonically with that API, and hardly even have to care that that API goes off to the cloud to do its work. As far as you're concerned, it's just Python.
<ClassBot> chadadavis asked: How does local caching of settings and data work? Can there be a bidirectional pipe between gconf (or dconf, or whatever) and ubuntuone?
<aquarius> chadadavis, yes, there could be; it would be possible to write a desktopcouch backend for {g,d}conf.
<aquarius> There are a couple of interesting problems to solve, there; most applications don't distinguish between "stuff I care about which is specific to this machine" and "stuff I care about generally".
<aquarius> Imagine, for example, that an app stores its window position in dconf
<aquarius> syncing that to your netbook might be a problem.
<aquarius> So there are some fun issues around that, but it would certainly be possible to do if you wanted to.
<ClassBot> darkdevil_ asked: will there be any feature with which I will be able to sync my Ubuntu One cloud with any existing non Ubuntu One clouds?
<aquarius> darkdevil_, that depends on precisely what you mean.
<aquarius> Your data is stored in CouchDB. So you can replicate data from Ubuntu One to any other CouchDB anywhere, and the reverse.
<aquarius> Your files are also accessible via the API, so you can pull files out of Ubuntu One directly and push them into another cloud provider if you want to, and the reverse.
<aquarius> These are the components that you'll be able to snap together.
<ClassBot> davidboy asked: There's going to be PHP bindings right?  So I can write web apps that take advantage of U1, etc.
<aquarius> Certainly it will be entirely possible to write PHP bindings; the APIs that your web apps will talk to are just HTTP, so anything that can do HTTP requests (which PHP happily can) will be able to use them.
<aquarius> So you will be able to use PHP to talk to Ubuntu One out of the box.
<aquarius> It might be cool for someone to write a wrapper library to make that sort of thing even easier for PHP developers
<aquarius> I don't think we'd do that on the Ubuntu One team ourselves, because (a) we're not PHP developers, and (b) it's best for us to concentrate on making the APIs great. But one of the things I'd love to do is point at those wrapper libraries from the main API documentation
<aquarius> There's loads of stuff you can do with shared data.
<aquarius> But Ubuntu One's not just about data.
<aquarius> Take the music streaming service, for example.
<aquarius> You can currently stream music to Android and iPhone, and you'll be able to add that music to the cloud from Ubuntu and Windows.
<aquarius> Maybe you want to be able to stream music back to your Ubuntu machine without syncing it, or your Mac, or your Palm Pre, or your LG mobile phone, or your toaster.
<aquarius> So, just use the music streaming API, which is a simple REST HTTP API, based on the Subsonic API, or help people to get at their music by showing them our HTML5 web player for streaming music.
<aquarius> But there's more interesting ideas around music streaming than just "listen to the music".
<aquarius> Playlists, for example. The Ubuntu One Streaming apps on Android and iPhone know how to create playlists.
<aquarius> But how they do that is not a secret. Your playlists are just stored in your cloud databases.
<aquarius> (well, they will be once this stuff exists. See above point about how all this is being written. :))
<aquarius> So, why not sync your playlists from Banshee or Rhythmbox or Amarok or Exaile or Quod Libet or iTunes or Windows Media Player?
<aquarius> Copy the playlists from your media player into desktopcouch on Ubuntu or into the cloud directly with u1couch on Windows or the Mac or anywhere else, in the correct format, and those playlists will instantly show up on your phone!
<aquarius> A simple example of this is https://code.launchpad.net/~sil/%2Bjunk/m3u2u1ms/ which is a quick script I wrote to take an m3u playlist and store it in desktopcouch on Ubuntu.
<aquarius> So you can make your Banshee playlists available to the Ubuntu One app on your Android phone by exporting them as m3u and then importing them with the script.
<aquarius> Tighter integration is great, here; what we want to do is to make it easy for you all to build the stuff that you want on top of Ubuntu One.
<aquarius> So if you want to have your Amarok playlists available for streaming, it should be possible to do.
<aquarius> I rather like the idea of playing a Flash game on the web and having the background music be the most appropriate music chosen from *my* music collection. That'd be cool.
<ClassBot> jderose asked: Will U1 ever offer continuous CouchDB replication? Like say *someone* was developing a distributed video editor with real-time collaboration :)
<aquarius> jderose, cor, just imagine if someone was doing that, eh? (you should all watch jderose's lightning talk at the end of the week ;))
<aquarius> Continuous replication: not planned right now. (There are some big issues with turning it on for lots and lots and lots and lots and lots of databases, which is what we have.)
<aquarius> It's something I want to continue to investigate, though.
<aquarius> Ubuntu One also, as you know, does file sync.
<aquarius> But just syncing files is already taken care of by Ubuntu One itself, on Ubuntu and Windows.
<aquarius> What's more interesting is working with those files.
<aquarius> So, for example, imagine being able to instantly, one-click-ly, publish a file from your application to a public URL and then tweet that URL.
<aquarius> Instant get-this-out-there-ness from your apps.
<aquarius> The screenshot tool Shutter, for example, can do this already; PrtSc to take a screenshot, then "Export > Ubuntu One".
<aquarius> They did a bunch of hard work to do that, and I massively applaud them; nice one Shutter team!
<aquarius> Based on what they did, that's the sort of thing that should be easier to do.
<aquarius> So there will be easy-to-use APIs so your apps can do the same. Imagine quickly sharing your newly created image or document or recipe with the world.
<aquarius> Your app could have a button to "store all my files in the cloud", or "publish all my files when I save them", or "automatically share files that are part of Project X with my boss".
<aquarius> More to the point, you'll be able to work with files directly *in* the cloud.
<aquarius> So a backup program, for example, could back up your files straight into Ubuntu One and not sync them to your local machines.
<aquarius> And of course being able to save things in and out of the cloud means that you can get an Ubuntu One sync solution on other platforms.
<aquarius> So you could work with your files from your non-Android mobile phone (we've already got the great mkarnicki working on that for Android!)
<aquarius> Build a fuse or gvfs backend for Ubuntu or Fedora or SuSE or Arch Linux. Build a WebDAV server which works with Ubuntu One and mount your Ubuntu One storage as a remote folder on your Mac.
<aquarius> And web apps can work with your cloud too, for files as well as data.
<aquarius> Imagine, say, a torrent client, running on the web, which can download something like a movie or music from legittorrents.info and save it directly into your cloud storage.
<aquarius> So you see an album you want on that torrent site (say, Ghosts I by Nine Inch Nails) and go tell this web torrent client about it (and you've signed in to that web torrent client with Ubuntu One)
<aquarius> And the website then downloads that NIN album directly into your personal cloud -- which of course makes it available for streaming direct to your phone.
<aquarius> You could do that with videos as well: choose a torrentable video (say, Beyond the Game, the documentary about World of Warcraft) and download that directly into your cloud, if someone built the web torrent client.
<aquarius> (Of course, that would be cooler if Ubuntu One offered a video streaming service as well as music streaming, wouldn't it. Hm... ;-)
<aquarius> But it's not just about your content for yourself; think about sharing.
<aquarius> Ubuntu One lets you share a folder with people. This would be great for distribution.
<aquarius> Imagine that you publish an online magazine.
<aquarius> So, you create a folder on your desktop, and put issues of the magazine in it.
<aquarius> Then, you put a button on your website saying "Sign in with Ubuntu One to get our magazine".
<aquarius> When someone signs in, your website connects to the Ubuntu One files API, with your private OAuth token, and adds that signed-in user to the list of people that your magazine folder is shared with.
<aquarius> Then, whenever your magazine has a new issue, you just drop it into that folder on your desktop.
<aquarius> (Or even upload it to Ubuntu One directly through the website.)
<aquarius> All the subscribed people will get the new issue instantly, on all the machines they want it on, and in the cloud.
<aquarius> You could distribute anything like this. Imagine a podcast, or chapters of a novel.
<aquarius> It would also work for paid-for content; when someone pays, have your code share a folder with them, and put their paid-for stuff in that folder. That's all doable through the files API.
<aquarius> We're building the files API itself (an HTTP-based REST API) and also some wrappers for it to make it easier to use in your apps from Python and the like.
<ClassBot> There are 10 minutes remaining in the current session.
<aquarius> OK, I've talked about a blizzard of ideas that'll be made possible, and shown you almost no code.
<aquarius> Which is because, as mentioned at the beginning, a lot of this code is currently being written and tested as part of the 11.04 release :)
<aquarius> However, code is nothing without documentation, and that's really important.
<aquarius> My main task for this cycle is to build documentation for all of this stuff; how to use Ubuntu One and all the APIs we provide in the cloud, on Android, on Windows, on iOS, on Ubuntu.
<aquarius> So there'll be documentation for all this stuff so all of you clever people can build things that I haven't even dreamed of.
<aquarius> We did some user research (thanks ivanka and the user research team!) on which sites have great API documentation and which don't, so we have an idea of good directions to go in.
<aquarius> And I'm working away feverishly on getting an alpha version out!
<aquarius> So, to summarise, since I'm running out of time: what the app developer programme is all about is giving all of you the chance to use Ubuntu One as a piece of infrastructure...like Gtk, or Python's urllib module, or PHP's curl bindings.
<aquarius> When you want your users, or you, to be able to get at their data on their terms, from anywhere, then you should be able to use Ubuntu One to do that
<aquarius> So, what I'd like to know is: what are your cool ideas? What help do you need from me in making them happen? What do you want to use Ubuntu One for in your apps and your scripts and your work?
<ClassBot> davidboy asked: So when will the documentation be up? :D
<ClassBot> There are 5 minutes remaining in the current session.
<aquarius> davidboy, at 11.04 release! That's the deadline :)
<aquarius> So you'll be able to start working with this stuff once natty comes out -- but we're documenting and building APIs for all sorts of platforms, as I said; for Ubuntu 11.04, for the web, for Windows and Android.
<aquarius> So your apps can be anywhere and all work together :)
<ClassBot> chadadavis asked: URL to current code / docs / wiki, so that we can follow development?
<aquarius> at the moment there isn't one, because half of the APIs aren't yet written. There are blueprints you can look at which show some of this work
<aquarius> and I'd like to get an alpha version of the documentation up as early as possible
<aquarius> OK, I've got 2 minutes left: any final questions?
<aquarius> Then I shall hand you over to the seif and manish show to hear about the greatness that is Zeitgeist :)
<seiflotfy> thanks :)
<aquarius> seiflotfy, manish, it's all yours. Thanks, everyone!
<manish> Thanks aquarius
<seiflotfy> thank you aquarius
* ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - https://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Questions in #ubuntu-classroom-chat || Event: Ubuntu Developer Week - Current Session: Rocking with Zeitgeist - Instructors: manish, seiflotfy
<seiflotfy> manish, ready
<seiflotfy> ?
<manish> yes
<ClassBot> Logs for this session will be available at http://irclogs.ubuntu.com/2011/03/01/%23ubuntu-classroom.html following the conclusion of the session.
<manish> Hello everyone
<manish> This session will introduce you to zeitgeist
<manish> and its related to components
<manish> the agenda is here https://wiki.ubuntu.com/UbuntuDeveloperWeek/Sessions
<manish> scroll down
<manish> I will post it here
<manish> What is Zeitgeist and what it is not - 10 mins
<manish> Security Implications - 5 mins
<manish> Technologies used - 5 mins
<manish> Components of Zeitgeist - 10 mins
<manish> Integration of Zeitgeist in applications - 10 mins
<manish> Latest release numbers and installing zeitgeist - 5 mins
<manish> and finally FAQ for 15 mins
<manish> I have allocated FAQ for 15 mins because I see there are a lot of confusion reguarding what zeitgeist is
<manish> Let us start with first
<manish> What is zeitgeist?
<manish> Zeitgeist is an event logger which keeps a track of your activities while you are using your computer (any supported computing device).
<manish> Events such as opening files, closing files, recieveing calls, sending a message on Instant Messenger (GTalk, Yahoo etc) are logged by Zeitgeist.
<manish> The logging can be configured, so you have the complete control on what is logged and what is not.
<manish> This data can then be used for variety of useful activities.
<manish> Some of the possibilities are having a complete skype, empathy, pidgin call log.
<manish> Finding out with you converse the most.
<manish> You can check which applications you launch the most and how many times you have opened a specific file.
<manish> People ask me - what are the possibilities of the things we can do with this
<manish> I reply - The possibilities are endless, the sky is the limit
<manish> I am hoping on you people to come up with innovative ideas after this session
<manish> after coming to know what zeitgeist is exactly an what it is not
<manish> so now what zeitgeist is not?
<manish> First and formost - Zeitgeist is not a search engine!!!
<manish> remember this
<manish> it is an event logged
<manish> *logger
<manish> If you have some file on your system, then don't expect zeitgeist to search for it.
<manish> It is not the work of zeitgeist to scan you disks and find files.
<manish> It's work is to track your activities and log it.
<manish> As opposed to general misconception, zeitgeist doesn't track files
<manish> Zeitgeist deals with events and not files.
<manish> There are events where no file is involved like recieveing a call.
<ClassBot> UndiFineD asked: are there apps for mobiles, to be keeping track of my android
<manish> actually work is going on to port it to phones too
<manish> we had a prototype for Maemo
<seiflotfy> and android
<manish> but sadly Maemo's future is not clear after it got merged with Meego which again is a bit confusing
<manish> we are working on android
<seiflotfy> http://zeitgeist-android.com/
<manish> since Android doesn't use the standard linux stack, some work is needed for making it run on android
<manish> esp testing the port is very important
<ClassBot> darkdevil71 asked: is it a key logger ?
<seiflotfy> darkdevil71, no its not
<manish> darkdevil71: I will come to it. It is the next topic. The security implication
<manish> darkdevil71: it doesnt track each and every key you press
<manish> it just logs your activity
<manish> most opening and closing of files
<manish> and some other events
<manish> which events you want to send is configurable
<manish> though the api is still a bit crippled
<manish> Next is - Security Implications
<manish> You might heard that Zeitgeist is a malware/spyware which tracks your activities.
<manish> This is not an exact definition of malware/spyware.
<manish> Malwares record your activity, steal your data without your approval and sneak into the system without system. They have a destructive intention.
<manish> Contrast this with zeitgeist, it records events so that it can be used for constructive purposes.
<manish> It's like nuclear technology.
<manish> Use it constructively, it will benefit mankind, use it destructively and you will be harmed.
<manish> One concern people raise is that if some malware is installed, then it can steal the zeitgeist data.
<manish> In this scenario, if a malware is installed, then you are at a bigger risk than just getting your zeitgeist data stolen.
<manish> Your pidgin passwords are stored in plain text in your home directory.
<manish> (last when I used pidgin)
<manish> Your browser's history is very easily accessible.
<manish>  If you have not set the master password in Firefox, then even your passwords are available to the malware.
<manish> any questions related to security implications?
<manish> Next up we have - Technologies used in Zeitgeist
<manish> Zeitgeist is written using Python and uses sqlite to store the events.
<manish> It exposes an API using DBus using which other applications can communicate with it.
<manish> Below the hood, it is basically dependent on glib which makes zeitgeist portable.
<manish> Get a proper port of dbus and glib on windows and zeitgeist should run there without much issues.
<manish> or in this case any other OS
<manish> Next up -  Components of zeitgeist
<manish> Zeitgeist is not a single project
<manish> but a collection is components
<manish> helper libraries etc
<seiflotfy> a framework more or less
<manish> yeah
<manish> the core part is the engine
<manish> or the daemon
<manish> At the core of zeitgeist is an engine which stores all the events and acts as the store.
<manish>  It recieves and provides relevant information(events) to other process.
<manish> The information is exposed via a DBus Session bus.
<manish> If the zeitgeist server is not running, the first time an application invokes a method over DBus, the daemon is started.
<manish> I don't remember the exact name what this is called - autostarting a session bus when first call is made. Hope someone can tell me on #ubuntu-classroom-chat
<manish> The second component is called the datahub
<manish> I know sounds dangerous a bit
<manish> it is a passive logger
<manish> there needs to be some component which keeps on pushing data to the daemon
<manish> or the daemon is nothing more than a white elephant
<manish> Thanks to aquarius that is called DBus activation --  autostarting a session bus when first call is made.
<manish> coming back
<manish> so datahub is a logger
<manish> which also runs as a daemon
<manish> and looks at the recently used files
<manish> and pushes them in the daemon
<manish> so basically when you open a file by double clicking using nautilus datahub comes in picture
<manish> I wont go much in the geekery of implementation
<manish> for adventurous people - "bzr branch lp:zeitgeist-datahub" is your friend
<manish> one more thing I forgot was telling you people about our website, sorry
<manish> http://zeitgeist-project.com/
<manish> Download section: http://zeitgeist-project.com/download/
<manish> development - http://zeitgeist-project.com/development/
<manish> and we are always available at #zeitgeist on freenode
<manish> next up - Activity Journal
<manish> it was formely called gnome-activity-journal
<manish> it is a GUI viewer for your events
<manish> like a dashboard
<manish> With proper zeitgeist extensions you can even have more detailed logs including when you joined an IRC channel or when you received or dropped a call over your IM client.
<manish> you can install it, it is in the repos
<manish> as gnome-activity-journal
<manish> If you right click on any event and select "More Information", you can come to know what other files were opened or which other activity you were engaged in during this event. You can delete the event if you do not like it.
<manish> next up is - Dataproviders
<manish> Dataproviders are small extension/addins/addons/plugins into applications which can push events to zeitgeist.
<manish> we also call it datasources
<manish> same thing
<manish>  Datahub cannot push everything to the daemon.
<manish> It mostly tracks opening of files by double-clicking from file browser.
<manish> Using data-providers more *relevant* events can be added like "Creating a new playlist", "Buying a track from foo music store"
<manish> next up is - Extensions
<manish> When we say extensions, it refers to zeitgeist daemon extensions.
<manish> means the extensions for the daemon
<manish> and not the client
<manish> Zeitgeist extensions are those components using which you can control he behavior of how the daemon behaves. You can expose additional information via DBus.
<manish> In a nutshell, you this is your tool of trade if you are not satisfied with how zeitgeist behaves. One size doesn't fit all. :)
<manish> If you want to have an inner scoop of extensions behavior, check
<manish> http://milky.manishsinha.net/2010/11/27/zeitgeist-daemon-extensions-explained/
<ClassBot> chadadavis asked: facilities for plugins, e.g. Facebook to include external activity streams?
<manish> chadadavis: yes
<manish> that is what I was telling about dataproviders
<manish> I or you can write dataprovieders
<manish> which can probably run as a daemon pulling data from all your web apps
<manish> and logging them in zeitgeist
<manish> which is again browsable
<manish> chadadavis: nice idea. Added to my TODO
<ClassBot> MickStep asked: is it likly that a syncing service will every be created for zeitgeist, like tomboy created snowy
<manish> MickStep: yes. We were working on it
<manish> but due to some shortage of time
<manish> personal lie
<manish> and other important priorities related to zeitgeist pushed this feature a bit below our priority queue
<manish> thanks for bringing it up
<manish> will look into it
<manish> People, ask your questions :)
<ClassBot> jderose asked: Speaking of syncing, are alternate storage backends a possibility for Zeitgeist, like say desktopcouch?
<manish> jderose: right now none. It can be looked into
<manish> but the thing is that is not worth the effort as of now. Since right now we are spending our time in deploying zeitgeist
<manish> integration with applications
<manish> for you call,  you can add our zeitgeist ppa or latest packages. Sadly most of the packages are for Maverick
<manish> https://launchpad.net/~zeitgeist/+archive/ppa
<manish> this PPA
<manish> there are many zeitgeist-datasources-* packages
<manish> like one for tomboy
<manish> if you install that package
<manish> zeitgeist-datasource-tomboy
<manish> then your opened, closed notes will appear in GAJ :)
<manish> if you install the -xchat datasource
<manish> it will show you which all channels you joined
<manish> when you talked
<manish> when you quit, parted
<manish> cando_ is the current maintainer of gnome-activity-journal
<manish> there are many datasources/dataproviders have a look at them in the PPA
<manish> next is Language bindings
<manish> by language bindings I mean, language specific wrappers over zeitgeist api
<manish> you can use zeitgeist using it's python client
<manish> which is shipped along with the daemon
<manish> for C/Vala we have libzeitgeist
<manish> http://launchpad.net/libzeitgeist
<manish> for mono (C#) we have zeitgeist-sharp http://launchpad.net/zeitgeist-sharp
<manish> Qt - libqzeitgeist
<manish> http://gitorious.org/kde-zeitgeist/libqzeitgeist
<manish> and we also have for javascript
<manish> but still it is not not yet mature
<manish> needs work
<manish> next is Zeitgeist integration
<manish> 1) Unity
<manish> okay I will come to it
<manish> now lets goto questions
<ClassBot> techbreak_ asked: its in gsoc ?
<manish> if you asked if zeitgeist is in gsoc, then we are trying, not sure if we need to apply independently
<manish> it doesnt make sense
<manish> we need zeitgeist integration in applications like kde, gnome apps
<seiflotfy> zeitgeist will be offering some work over several organizations
<seiflotfy> such as KDE, GNOME and hopefully Ubunut
<ClassBot> UndiFineD asked: can we read out data from zeitgeist, if so could we get some statistics, maybe people would like to compare productivity
<manish> UndiFineD: yes. you can
<manish> use the API
<manish> if you like, you can use the language of your choice
<manish> Python, C, Vala, C#, Javascript
<manish> as I can see in the -chat channel, there is some confusion
<manish> zeitgeist doesnt look for any data
<manish> it just sits and waits for events to be pushed
<manish> when asked it hands out events
<manish> the pushing it done by datasources
<ClassBot> jeyd asked: what about the xchat datasource in LUCID?
<manish> jeyd: we need to put that too. I can see that -datasources package is there for lucid
<manish> and the lucid package doesnt have xchat
 * manish puts this in TODO
<manish> for more info https://launchpad.net/~zeitgeist/+archive/ppa/+packages
<ClassBot> godbyk asked: Does Zeitgeist only pay attention to the channel part/join events and ignore what was actually said in the channel?
<manish> godbyk: it wont log each and every line you said
<manish> use your irc client's logging functionality
<ClassBot> techbreak_ asked: which language it is written inn ?
<manish> as I said zeitgeist is written in Python
<ClassBot> MickStep asked: What is the simplest example you can provide for how to write a dataprovider
<manish> there is one
<manish> I will use Python's example
<manish> you can check it in git.
<manish> git.gnome.or
<manish> this one
<manish> http://git.gnome.org/browse/rhythmbox/tree/plugins/rbzeitgeist/rbzeitgeist/__init__.py
<manish> the RB plugin
<manish> We have implemenation for Unity
<manish> Unity makes use of Zeitgeist in its dash where it provides the user with easy access to its most and recently used data (files/folders/applications) as well as searching over the Zeitgeist FTS (Full Text Search) extension.
<manish> There is more development going on to bring the same features to a contacts dash where the user can browse his contacts by most/recently used.
<manish> a snapshot by seiflotfy
<manish> http://zeitgeist-project.com/wp-content/uploads/2010/12/unity-most-used-apps.png
<manish> then we have it integrated in Synapse
<manish> the uber-cool launcher written by mhr3 and his team
<manish> Other than heavily depending on the Zeitgeist FTS (Full Text Search) extension for searching, you can also browse recent items which were logged by Zeitgeist, in case you close a document by mistake or just want to hear again the music track that played a few minutes ago.
<manish> ï»¿ï»¿It also has a relevancy service, which makes sure that applications you use often end up among the first results of a search â this is done using Zeitgeist, so you can also track the popularity also in other Zeitgeist clients.
<manish> obligatory snapshot - http://zeitgeist-project.com/wp-content/uploads/2010/12/synapse-search-sort-apps-ranking.png
<manish> I already told about Activity Journal
<manish> http://zeitgeist-project.com/wp-content/uploads/2010/12/gaj-diary.png
<manish> http://zeitgeist-project.com/wp-content/uploads/2010/12/gaj-timeline.png
<seiflotfy> manish, i think it would be cool to show them the tomboy plugin that provides "used with"
<manish> yeah
<ClassBot> There are 10 minutes remaining in the current session.
<manish> The used with is here http://thoughts.manishsinha.net/photo/1280/2890463378/1/tumblr_lfh52cBm7g1qcwfsm
<manish> here you can even see bzr plugin in action
<manish> and xchat plugin in action
<manish> seiflotfy: you have a snapshot with tomboy plugin
<manish> can you take one and upload before this session gets over?
<seiflotfy> yeah
<manish> last in integration section is Docky
<manish> The integration with Zeitgeist is in the form of generating jump-lists for applications and folders
<manish> An application that is provided a jump-list is populated with the most and recently used data that was used with it. This also applies for folder where the most and recently used files are displayed in its jump-list.
<manish> snapshot: http://zeitgeist-project.com/wp-content/uploads/2010/12/docky-folder-jump1-300x289.png
<manish> http://zeitgeist-project.com/wp-content/uploads/2010/12/docky-app-jump-300x300.png
<seiflotfy> http://seilo.geekyogre.com/2010/08/zeitgeist-hearts-tomboy/
<seiflotfy> this is a video of zeitgeist being used by tomboy
<manish> Next is Installation:
<manish> Stable PPA: http://launchpad.net/~zeitgeist/+archive/ppa
<manish> I have an experimental PPA where i love to upload packages
<manish> bleeding edge
<manish> enough to break your system
<manish> http://launchpad.net/~manishsinha/+archive/experimental
<manish> use it with care, if you are adventurous, this is you best best
<manish> The best way to install zeitgeist is from PPA of official repos
<manish> *or
<manish> or if you want to check the latest versions
<manish> Zeitgeist Engine - 0.7 "All I have is this woodchuck"
<manish> http://launchpad.net/zeitgeist/0.7/0.7
<manish> Zeitgeist Datahub - 0.7.0
<manish> http://launchpad.net/zeitgeist-datahub/0.7/0.7.0
<manish> Activity Journal - 0.6.0 "Pink Unicorns don't exist"
<manish> http://launchpad.net/gnome-activity-journal/0.6/0.6.0
<manish> libzeitgeist - 0.3.2 Rattleweed
<manish> http://launchpad.net/libzeitgeist/0.3/0.3.2
<manish> zeitgeist-sharp - 0.1.1 Lily
<manish> Lily is the character from HIMYM (I love that series) :)
<manish> http://launchpad.net/zeitgeist-sharp/0.1/0.1.1
<manish> libQZeitgeist - 0.1 "Hit ân Run"
<manish> http://www.gitorious.org/kde-zeitgeist/libqzeitgeist/archive-tarball/master
<manish> and for dataproviders we have only snapshot releases
<manish> which we package
<ClassBot> There are 5 minutes remaining in the current session.
<ClassBot> godbyk asked: What are some of your favorite future plans for Zeitgeist? How and where would you like to see it be used in the future?
<manish> godbyk: nice question
<seiflotfy> godbyk, alot
<manish> fav plans are
<manish> having a good blacklist plugin
<manish> that is wat everyone wants
<manish> and Banshee integration
<manish> which is my fav thing
<seiflotfy> and the geolocation deployment
<manish> yes
<manish> and syncing service
<manish> which is half implemented
<manish> it uses django
<manish> seiflotfy: shall we move to next quesiton?
<ClassBot> JackyAlcine asked: Zeitgeist is a semantic framework, like NEPOMUK, no? Is it possible to use this to do automation tasks like perhaps, backups of the last few used documents?
<seiflotfy> JackyAlcine, no its not like NEPOMUK
<manish> seiflotfy: your turn to answer this
<seiflotfy> NEPOMUK is a ontology
<seiflotfy> NEPOMUK KDE is a repository
<seiflotfy> NEPOMUK KDE knows about what your files are about
<seiflotfy> Zeitgeist is a log
<seiflotfy> it knows how you use your files and how they are contextually related
<seiflotfy> !q
<ClassBot> techbreak_ asked: any video log it keeps ?
<seiflotfy> what do you mean
<seiflotfy> if u have any questions please join #zeitgeist
<seiflotfy> we will be happy to help you out there
<seiflotfy> our time is up
<seiflotfy> so thanks you
<manish> we have most of our discussion on irc
<manish> and we hardly use mailing lists
<manish> thanks you everyone
* ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - https://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Questions in #ubuntu-classroom-chat || Event: Ubuntu Developer Week - Current Session: Getting your fixes into Debian, how to make community happy - Instructors: Rhonda, nigelb
<ClassBot> Logs for this session will be available at http://irclogs.ubuntu.com/2011/03/01/%23ubuntu-classroom.html following the conclusion of the session.
<Rhonda> So, let's continue with the schedule without further interruption, to keep you satisfied.
<Rhonda> Please reminded to ask your questions in #ubuntu-classroom-chat and prefix them with QUESTION: so that ClassBot can pick them up.
<Rhonda> I'm Rhonda and I'm your host for the last session today which is about "Getting your fixes into Debian, how to make community happy"
<Rhonda> I will be your host alone, unfortunately nigelb had to rest.
<Rhonda> Anyway, I'm a longtime Debian Developer and have stumbled maintained a fair amount of packages for Debian for a long time, so I managed to get a good overview on how to work with the Debian Bug Tracking System (BTS).
<Rhonda> First let me tell you why you want to send bugreports to Debian and get fixes done there instead of in Ubuntu.
<Rhonda> You might have attended the great session of tumbleweed yesterday where he mentioned the why.
<Rhonda> Let me quote him, "we should rather report the mistake to the upstream, and we'll get the benefit of the fix, without extra effort, when the upstream releases a new version"
<Rhonda> And: "during [regular development time], any uploads to debian get pulled over pretty quickly (assuming we haven't deviated from Debian)"
<Rhonda> Having a difference within Ubuntu requires a lot of overhead because a merge can't happen automatically. It requires someone to take a look at it, requires testing, wether it still applies, and stuff.
<Rhonda> And then there is also our Code of Conduct which asks us to be collaborative, to give back.
<Rhonda> So every patch that is pushed upstream is a patch less for us to keep care of, with the additional benefit to the rest of the Free Software ecosystem.
<Rhonda> Unfortunately (for certain definitions of that word) Debian doesn't use launchpad but debbugs, a special tailored BTS done for the requirements within Debian.
<Rhonda> The first interface I want you to get familiar with is the website: http://bugs.debian.org/
<Rhonda> It offers you simply and quite convenient query shortcuts - and it's just that: A query interface.
<Rhonda> The Debian BTS is run and operated only by emails, the website is a read-only tool.
<Rhonda> But it still offers a lot: If you want to see e.g. the bugreports about a certain package, you just add the packagename to the URL, like in http://bugs.debian.org/wesnoth-1.8
<Rhonda> There you get an overview of all the open bugreports against said package.
<Rhonda> From there you can click through and end up with different queries, like for a specific bugreport (which can also be reached through http://bugs.debian.org/bugnumber, like http://bugs.debian.org/12345)
<Rhonda> Or for a specific package maintainer address, it's http://bugs.debian.org/maintainer@email.address
<Rhonda> But more interesting for you, when you are reporting bugs, probably is to query all of your reported bugs that weren't dealt with yet. This is mine: http://bugs.debian.org/from:rhonda@debian.at
<ClassBot> hugohirsch asked: I need to know the exact version of the package I'm looking for bugs in Debian, right?
<Rhonda> No, the overview page for the bugs for a package aren't for a specific version, or release. You get them all on one page there.
<Rhonda> If you scroll down to the end of the overview page you have a form where you can narrow down the list, but in general you get them all.
<Rhonda> If your question was related to wesnoth-1.8, the 1.8 is part of the package name, it's not the package version. Sorry for having used a confusing example here. :)
<Rhonda> Please notice that a source package can have multiple binary packages, and if you want an overview for all the bugs for a certain source package, you go to http://bugs.debian.org/src:sourcepackagename
<Rhonda> Anyway, like said, the website is just a query interface. The actual working stuff behind debbugs is its email interface.
<Rhonda> There is one commandline tool that is very popular because it prepares a report template for you and fills in some additional information that are helpful for the package maintainer. That tool is called reportbug.
<Rhonda> Within Ubuntu though, you need to add pass the -B debian option to reportbug, otherwise it will tell you that you should use launchpad (for Ubuntu) instead to report bugs. :)
<Rhonda> So if you run reportbug -B debian somepackage, you will be asked a few questions, an editor will get fired up into which you enter the description of the bug, and then you can send it.
<Rhonda> This though requires usually a local installed mail transport agent, which might be a bit cumbersome. But even in those cases, reportbug can be very useful.
<Rhonda> It has a --template option which can produce the template text for you to paste into your preferred email client to get the additional information for the package maintainers.
<ClassBot> hugohirsch asked: Is reportbug similar to ubuntu-bug (reporting to LP instead)?
<Rhonda> Actually I've never used ubuntu-bug, this is where I would have hoped for a person deeper involved in Ubuntu to jump in to the rescue. ;)
<Rhonda> The general overview about debbugs can be found on https://wiki.ubuntu.com/Debian/Bugs, and the specific description about the email interface is at http://www.debian.org/Bugs/Reporting
<Rhonda> Actually reporting a bug to Debian is sending an email to submit@bugs.debian.org and add a few pseudo header lines in the first lines of your mail text.
<Rhonda> The most important here is "Package: packagename" so that the BTS knows where to sort your bugreport to.
<Rhonda> There are additional ones, like "Version: 1.2.3" to note that you found the bug in said version.
<Rhonda> Then there is "Severity: important" - this tells the BTS the severity of the bugreport. Valid values here are grave, critical, serious, important, normal, minor and wishlist
<Rhonda> Please don't choose the first three unless you are very certain here, they have a special meaning, I'll return to them later.
<Rhonda> If you are uncertain, just leave it out and it will default to normal. All these things can be adjusted later.
<Rhonda> You will receive an email in return telling you that your bugreport was received and telling you the number of the bugreport, for a reference.
<Rhonda> And here we come to the control bot of the BTS, reachable through control@bugs.debian.org
<Rhonda> You can send it commands to manipulate the bugs, and for this you need the bugnumber.
<Rhonda> The documentation for that can be found at http://www.debian.org/Bugs/server-control - you can see the list of commands in the table at the top.
<Rhonda> <MickStep> Is this debian method of dealing with bugs through email descended from the days before the WWW really took off
<Rhonda> Actually to some degree, or rather not. Yes, there weren't these possibilities in the early days of html, but forms were already there.
<Rhonda> But what actually is important for us to be able to reach the bug reporters, and an email interface is very convenient in that way because email is quite universal.
<Rhonda> With the commands for the control bot you can see that you can adjust almost all values, like with "severity 12345 important" you'd change the severity of that bug, with "forwarded 123 http://upstream.bugtracker/456" you can note down that this bug was also reported to some upstream project
<Rhonda> The "tag" command is also very useful, bugs can be marked with certain tags.
<Rhonda> Commonly used ones are moreinfo, unreproducible, wontfix, patch, help, security, pending, and releasename tags, like squeeze or wheezy or sid.
<Rhonda> retitle will set the bugtitle new, in case when the original bugreporter didn't provide a useful summary in the subject
<Rhonda> With found one can note down additional affecting versions, and with fixed one can note down that the bug is fixed in said version.
<Rhonda> Though, usually when bugs get closed in a version, it is done similar to how it's done in Ubuntu: with a changelog entry.
<Rhonda> For Debian this goes like "Closes: #12345" (in Ubuntu it's "LP: #12345")
<Rhonda> That will do two things in the end: It sets the fixed version in the bugreport, and it will mark the bugreport as done.
<Rhonda> And this is where I want to start with explaining how version tracking works in the Debian BTS.
<Rhonda> Because usually, after a while, bugs get archived so they disappear from the overview page.
<Rhonda> I wrote this down in a blog post of mine last year, but I'll explain it here nevertheless. The blogpost as a reference can be found here: http://rhonda.deb.at/blog/debian/on-BTS-usage.html
<Rhonda> Bugs get archived after 28 days they are done.
<Rhonda> Though, there might be certain delaying factors here: The bug has to be done on all architectures in unstable and in testing.
<Rhonda> When that's the case, the counter start.
<Rhonda> Well, it has to be done in testing only when the version tracking also sees testing as affected.
<Rhonda> When the bugreport was filed against a version that is only in unstable and all archs are in sync in unstable the counter starts then already.
<Rhonda> Also there are these special bug severities that I mentioned earlier: grave, critical and serious.
<Rhonda> Those are considered Release Critical bugs, and such bugs have to get fixed in _all_ affected distributions, not only in the ones in development.
<Rhonda> That means, bugreports for RC bugs that are done in unstable will still stay around in the overview for the package as a reminder.
<Rhonda> Sometimes though version tracking gets a bit tricky.
<Rhonda> I've dug up some bugreports that we can take a look at to learn to understand it.
<Rhonda> And actually, I want to also mention another great helpful tool, which is parts of the devscripts package: It's called "bts".
<Rhonda> bts is a commandline client to the BTS. Actually what it does is create a mail to control@bugs built from the options you give.
<Rhonda> The former mentioned example of setting the severity of a bugreport would be as easy with bts as "bts severity 12345 important".
<Rhonda> Please notice again that this requires a local configured MTA (ssmtp is quite easy for simple sending out mails)
<Rhonda> And it takes your DEBEMAIL environment variable as email address, so make sure to set that to your preferred value.
<ClassBot> MickStep asked: That debian ssl bug was a "grave"?
<Rhonda> Quite certainly. :)  You can read up on the definitions of the servities in the BTS documentation on http://www.debian.org/Bugs/
<Rhonda> So, coming back to my examples. Let's start to dig through the overview page that I mentioned before first, explaining a few more interesting parts there.
<Rhonda> http://bugs.debian.org/wesnoth-1.8 - you see the bugreports grouped by severities. You have links to the Bugs themself in the number, after that is a box of [m| | ] which notes down some flags.
<Rhonda> If you hover the characters you get their meaning in a tooltip - but you can also click there to get additional overview information
<Rhonda> Like who reported the bug, when, the tags, and such#
<Rhonda> If you actually go to the bug page, you find overview information at the top, and a version graph on the righthand side.
<Rhonda> Red circles mark affected versions, green boxes fixed versions.
<Rhonda> You also can see the distribution parts in there to see wether stable, testing and unstable are affected
<Rhonda> Let's look at a specific bug: http://bugs.debian.org/612780
<ClassBot> There are 10 minutes remaining in the current session.
<Rhonda> You don't see a version graph here because there aren't any version information given.
<Rhonda> The total lack of version information makes the BTS think the bug affects all versions of the package.
<Rhonda> Actually, building against a package from experimental isn't a release critical bug, so what am I going to do?
<Rhonda> I call this command:
<Rhonda> bts severity 612780 important '# FTBFS against packages in experimental is not RC'
<Rhonda> Leave the page open, we will reload it in a few minutes. :)
<Rhonda> This bugreport is also interesting: http://bugs.debian.org/456558
<Rhonda> It actually does have a bug graph, and both found and fixed versions.
<Rhonda> But why isn't there a green box?
<Rhonda> If one looks close then one can see that it was found in the audacious package but fixed in the audacious-plugins package.
<Rhonda> The BTS though doesn't find any information that audacious package is fixed, and the bugreport is assigned to that package.
<Rhonda> So the proper fix to get that bugreport really done is a reassign to audacious-plugins package.
<ClassBot> There are 5 minutes remaining in the current session.
<Rhonda> Please notice that a reassign deletes all version information, so we have to re-add the fixed version afterwards.
<Rhonda> Here bts comes to the rescue again, and this is a good example for a chained command: One can give multiple commands that are sent to the control bot in one commandline. This is what I am using:
<Rhonda> bts reassign 456558 audacious-plugins '# done in different source package' . fixed 456558 2.0.1-1
<Rhonda> Actually there are more than just this bug in that state, so I rather leave this up to a team member responsible for audacious: bdrung, please reassign them all appropriately. ;)
<Rhonda> The next example is more interesting: http://bugs.debian.org/src:mail-notification
<Rhonda> You will find a fair amount of still non-archived bugs at the bottom of the page.
<Rhonda> Let's pick out http://bugs.debian.org/383159 as example
<Rhonda> The version graph is pretty unreadable here, so let's click on it to get it in bigger size.
<Rhonda> If you look closer, you'll notice something pretty interesting: unstable is listed both in a green _and_ in a red box.
<Rhonda> That's â¦ special indeed. What's going on here? For that we use another fine resource as help: http://packages.debian.org/unstable/mail-notification
<ClassBot> Logs for this session will be available at http://irclogs.ubuntu.com/2011/03/01/%23ubuntu-classroom.html
<Rhonda> You might know a similar page, http://packages.ubuntu.com/ offers the same service for you, it's the same codebase.
* ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - https://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Questions in #ubuntu-classroom-chat ||
<Rhonda> At the end you'll find that the hurd-i386 package has a different version than the others.
<Rhonda> So actually the build for that architecture is having troubles. Given that that architecture is not really an official yet, filing a bugreport against ftp.debian.org and asking for removal of the package on that architecture will fix that.
<Rhonda> â¦ and I guess I should conclude the session, we run out of time.
<Rhonda> The fineprint is: Version tracking in the Debian BTS is still something rather new, not all Debian Developers have a good understanding of it and it needs a fair amount of cleanup.
<Rhonda> Don't be shy, feel free to ask, stumble by in #debian-ubuntu on irc.debian.org (different network than irc.ubuntu.com) and we'll try to help.
<djflor> Bonsoir tout le monde !
#ubuntu-classroom 2011-03-02
<Nijabo> Is there some IRC I should turn to with questions regarding getting into "Getting started"
<Nijabo> I have one regarding TestDrive
<Nijabo> Wrong room sorry
<kaydsoft> hi
<xiaog> anybody home?
<JackyAlcine> Hey
<xiaog> Im from china
<JackyAlcine> Cool, I'm in the US. :D
<xiaog> it's not the time to discuss?
<xiaog> I'm pool in english
<chalcedony> i just got here
<xiaog> me too
<JackyAlcine> Well, it's a bit early, I don't think that the next class starts any time soon.
<xiaog> yeh, difference of time
<xiaog> let's have a look the class list.
<chalcedony>  while waiting Full Circle Magazine: http://fullcirclemagazine.org/issue-46/
<chalcedony>  Direct: http://dl.fullcirclemagazine.org/issue46_en.pdf
<dholbach> good morning
<xiaog> It's time to say "good night" in our country ~ hehe
<sriram> Any Discussions?
<tdelv> sriram, if you mean the classes they do not start for another 7 hours
<sriram> tdelv, schedule please?
<head_victim> !schedule
<ubot2> To view the upcoming Ubuntu Classroom schedule, visit the Learning Events Calendar at http://people.ubuntu.com/~nhandler/classroom.html
<ranjan> hey what time the today session is starting ? I am from India...
<nigelb> ranjan: 2130 IST
<ranjan> nigelb, thanks :P)
<ranjan> can anybody give me the link of yesterdays' session log ?
<ranjan> zeitgeist's log
<dholbach> all on https://wiki.ubuntu.com/UbuntuDeveloperWeek
<ranjan> dholbach, thanks :)
<kajal> i am new to IRC
<kajal> can say ubuntu participation on GSOC?
<ElMago29> hey guys .. can you tell me why i cannot install with "sudo apt-get install openssh-server" in ubunto 10.04 Lucid?
<fisch246> !support
<ubot2> For general questions or support, please use our support channel, #ubuntu
<nigelb> You should probably ask in #ubuntu which is the support channel
<ElMago29> ok thanks!
<techbreak> what is this sesion like ? "test drive " ??
<techbreak> are we going to learn testing ?
<acarpine> techbreak, yes
<techbreak> acarpine, testing of what ?
<acarpine> I think we are going to learn testdrive tool
<techbreak> acarpine, what is that tool for  ? tool like ?
<nigelb> hey folks, keep chat to #ubuntu-classroom-chat, sessions will be happening here :)
<acarpine> ops right...
<dholbach> HELLO MY FRIENDS! IT'S DAY 3 of UBUNTU DEVELOPER WEEK! WELCOME! :)
<dholbach> if you need any information about the event at all, check out https://wiki.ubuntu.com/UbuntuDeveloperWeek
<fisch246> !caps | dholbach
<ubot2> dholbach: PLEASE DON'T SHOUT! We can read lowercase too.
<fisch246> :P
<dholbach> also, please make sure you join #ubuntu-classroom-chat
<dholbach> because that's where all the chatter goes
<dholbach> and questions too - please make sure you prefix your questions with QUESTION:
<dholbach> ie: QUESTION: RoAkSoAx: was Pisco invented in Peru or in Chile?
<RoAkSoAx> dholbach, Peru of course!
<RoAkSoAx> :)
<dholbach> today we'll start of the day with RoAkSoAx aka. Andres Rodriguez who will introduce you to TestDrive and how to run virtual machines (including the Ubuntu development release) in a sane manner
<dholbach> RoAkSoAx, the stage is yours
<dholbach> enjoy!
<RoAkSoAx> thanks dholbach
<RoAkSoAx> Good Morning Everybody! My name is Andres Rodriguez (as dholbach already saud) and I'm the upstream developer of TestDrive.
<RoAkSoAx> So Who is here for the TestDrive Session?
* ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - https://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Questions in #ubuntu-classroom-chat || Event: Ubuntu Developer Week - Current Session: TestDrive - Instructors: RoAkSoAx
<RoAkSoAx> raise your hands in #u-c-chat
<ClassBot> Logs for this session will be available at http://irclogs.ubuntu.com/2011/03/02/%23ubuntu-classroom.html following the conclusion of the session.
<RoAkSoAx> Perfect then.
<RoAkSoAx> This session is divided as follows:
<RoAkSoAx>  1. Introduction
<RoAkSoAx>  2. How to use TestDrive (its different uses)!
<RoAkSoAx>  3. Do you want to help TestDrive become better? - Development Opportunities!
<RoAkSoAx>  4. Questions/Comments/Suggestions?
<RoAkSoAx> == Introduction ==
<RoAkSoAx> TestDrive was originally created by Dustin Kirkland to test the Ubuntu Daily ISO's of the development release. It was originally a command line application, a shell script, that was later rewritten to python. At this point, it was only a command line application. Nowdadays we have a GTK UI as well. The GTK was my Google Summer of Project with the objective of not only be able to test the Daily ISO Image of the Development release, but to be
<RoAkSoAx>  able to test other ISO's in a simple way. I believe that the original objectives were achieved and there's also the opportunity to do more cool stuff.
<RoAkSoAx> So the initial sole purpose of TestDrive was to be able to test Ubuntu Daily ISO's, to help with the Testing when new Ubuntu pre-releases were available and others, such as start a VM in a quick manner with no configuration based in any Ubuntu Daily ISO Available. These daily ISOs were only the Ubuntu development release
<RoAkSoAx> So now you may wonder... what else can I do with TestDrive?
<RoAkSoAx> TestDrive can be used for the following:
<RoAkSoAx>  * Test Ubuntu Development Releases - Daily ISO's
<RoAkSoAx>  * Test Older Ubuntu Releases
<RoAkSoAx>  * Test flavors(Kubuntu/Xubuntu/Edubuntu/Mythbuntu/Ubuntu Studio)
<RoAkSoAx>  * Test any *other* ISO from any Other Distribution
<RoAkSoAx>  * Test Ubuntu Cloud Daily Images
<RoAkSoAx>  * Test qcow2 disk images.
<RoAkSoAx>  * Ubuntu ISO Download Manager :)
<RoAkSoAx>  * And of course, test if any of our packages is fixed in any release.
<RoAkSoAx> So at this point I'm assuming everybody is running TestDrive (and for those who are running natty, you'll notice a notification a few seconds right after you start TestDrive and I'll get to that in a bit)
<RoAkSoAx> If you are not running it yet, please go ahead
<RoAkSoAx> let me know when you all have TestDrive ready :)
<RoAkSoAx> !question
<RoAkSoAx> !q
<RoAkSoAx> !y
<ClassBot> techbreak asked: how to get testdrive ready ?
<ClassBot> monish001 asked: how to start testdrive?
<RoAkSoAx> sorry my bad
<RoAkSoAx> From the command line: sudo apt-get install testdrive
<RoAkSoAx> that comman will install both, TestDrive GTK and the command line application
<RoAkSoAx> Or you guys can go to Software Center and search for TestDrive and Install it
<RoAkSoAx> Then (for those running gnome Maverick + Applications > System Tools > TestDrive an Ubuntu ISO
<ClassBot> monish001 asked: terminal says - You will have to enable the component called 'universe'
<RoAkSoAx> monish001, yes you need to enable though by default it should be.You can also do it from Gnome but I can't seem to recall what to launch :)
<RoAkSoAx> If you are running Maverick I believe it is in System > Preferences > Software Sources
<RoAkSoAx> If you are running Ubuntu Software Center > Edit > Software Sources
<RoAkSoAx> monish001, ^^
<RoAkSoAx> (sorry I don't really use much Ubuntu Software Center)
<RoAkSoAx> So anyways, let's move on otherwise time might run out
<RoAkSoAx> So how can we Test Ubuntu Development Releases? It is easy. When you launch TestDrive, by default it will provide all the available ISO's of the current development release. In this case, Natty. The testing procedure is even easier. Simply 1. Select, 2. Sync, 3. Launch. So we can select either 1 or more ISO's. Sync means that It will download the ISO's form the repository automatically. And once an ISO is synced completely we can Launch it.
<RoAkSoAx>  dholbach has setup a nice wikipage that show's this behavior: https://wiki.ubuntu.com/UsingDevelopmentReleases/
<RoAkSoAx> techbreak_, Please do so :)
<RoAkSoAx> Now, I understand not everybody has the same hardware as I do, and not everybody has the same virtualization techonlogy
<RoAkSoAx> TestDrive Fully supports 2 virtualization technologies (In the latest release included in Natty, or in Maverick PPA)
<RoAkSoAx> So for those who are running maverick do this in the command line:
<RoAkSoAx> sudo apt-get install python-software-properties
<RoAkSoAx> sudo add-apt-repository ppa:testdrive/ppa
<RoAkSoAx> sudo apt-get update
<RoAkSoAx> sudo apt-get install testdrive
<RoAkSoAx> with that all in maverick/natty should have the latest release
<RoAkSoAx> now, if you are using KVM as your virtualization technology or your CPU supports KVM, when you installed TestDrive everything should be ready to launch
<RoAkSoAx> if you use virtualbox , you'll first have to install it: sudo apt-get install virtualbox-ose
<RoAkSoAx> so anyways, how can I choose what virtualization technology to use: Simple TestDrive > Edit > Preferences > Virtualization > Hypervisor (and select the hypervisor of your preference and click SAVE)
<RoAkSoAx> So by now I'm assuming you guys are downloading the ISO. Now we know how to change the Hypervisor. Please all take a look to https://wiki.ubuntu.com/UsingDevelopmentReleases/
<RoAkSoAx> you'll see the nice screenshots
<RoAkSoAx> so while the ISO downloads, I;ll continue to explain what other things we can do with TestDrive, so let's just leave TestDrive to do the work for a while
<RoAkSoAx> So, what else can I do with TestDrive besides testing the Ubuntu Development releases.... We can test *Older* Ubuntu releases. So, how can we do it?  It is also simple. Edit > Preferences > Ubuntu Releases. If you notice, there's two things to consider. The Repository and the Release itself. The repository can either be http://cdimage.ubuntu.com or http://releases.ubuntu.com and the releases would be the available releases for each reposito
<RoAkSoAx> ry. You just select the desired Repository and the desired release in the repository, and click save.
<ClassBot> darkdevil75 asked: if i have already downloaded the iso, how do i point to the location?
<RoAkSoAx> darkdevil75, I'll get to that in a bit
<RoAkSoAx> So how we select older Development Releases in the command line? Somthing like this: testdrive -p cdimage -r maverick
<RoAkSoAx> we specify the desired repository and the desired release
<RoAkSoAx> if you only run "testdrive" in the command line, it will default to "cdimage" and "ubuntu development release (in this case, natty)"
<RoAkSoAx> So, another thing we can do with TestDrive, is to also test different Ubuntu flavors, from both a previous release or the current development release. So now, how can we test different them? By default Ubuntu/Kubuntu/Xubuntu/Other are the flavors enabled. We can also test Edubuntu/Mythbuntu/UbuntuStudio. For that we go to  Edit > Preferences > Distributions > (Select the desired ones). Then we save and the available flavors in the selected
<RoAkSoAx> repository/release will be appear.
<RoAkSoAx> from the command line we do something like: "testdrive -p releases -r maverick -l kubuntu"
<RoAkSoAx> or "testdrive -l kubuntu" -> For Kubuntu Natty
<ClassBot> stefwal54 asked: is there a way to solve the problem that the virtual machine crashed
<RoAkSoAx> Steap, not with testdrive :(
<RoAkSoAx> stefwal54, not with testdrive :(
<RoAkSoAx> testdrive in the case of KVM only uses kvm command to launch the ISO's
<ClassBot> chilicuil asked: what if I pause downloading an iso, testdrive will continue downloading where I leave it?, what if I want to test the ubuntu dev version iso everyday, will it download all the iso again, or it will do a diff between the 2 isos?
<RoAkSoAx> chilicuil, TestDrive will only download the diff and not the whole iso. However the progress will always go from 0 to 100
<RoAkSoAx> Fpor all of those concerned, TestDrive to download all Ubuntu ISO's will use rsync
<RoAkSoAx> Now, TestDrive Also allows us to to download and launch ISO's that might not be Ubuntu ISOs or are located in other repositories/servers/or Even the local machine. So how can we do this? Simple. In the GTK main interface you'll notice that there's the"Other". Once the "Other" tab is selected, the "Add ISO" button will become enabled. Then we enter a simple description, the URL where the ISO is located, and the protocol to use, which is eith
<RoAkSoAx> er rzync, or zsync. If you notice there's also a file procotol. This can be used when the ISO is in our machine, and to be able to add it, we need to provide the absolute path of the ISO as URL.
<RoAkSoAx> So, "Add Other ISO" will launch another dialog to be able to add the ISO
<RoAkSoAx> In this case, we could use the URL of any ISO there, let's say a Fedora ISO, select zsync or rsync (if the server of the URL supports it), then click on "Add" and then "Save"
<RoAkSoAx> this will make available the ISO under the "Other" tab, and we can select it, click Sync, and once it finished download, we can just click Launch
<RoAkSoAx> easy huh?
<RoAkSoAx> but wait, did you just mention we can also add ISO's already downloaded??? Yes you can ( darkdevil75 ). There's a few ways to do this
<ClassBot> fisch246 asked: "Unable to validate Virtualization Method [virtualbox]" i have virtualbox installed... anyway i can fix this?
<RoAkSoAx> fisch246, We'll hold that question for the end :)
<RoAkSoAx> So anyways, how can be run with TestDrive ISO's that I already downloaded
<RoAkSoAx> simple: With the GTK we can use TestDrive > File > Open
<RoAkSoAx> TestDrive > File > New
<RoAkSoAx> and notice that TestDrive > File >  New is the same as "Add Other ISO"
<RoAkSoAx> so as URL we just give the full path of the ISO
<RoAkSoAx> however, we can also do this from the command line
<RoAkSoAx> testdrive -u rzync://www.youriso.com/download.iso
<RoAkSoAx> or testdrive -u /path/to/iso/ubuntu.iso
<ClassBot> chadadavis asked: 3D driver support?
<RoAkSoAx> chadadavis, that's hypervisor side of things, not TestDrive's :(
<RoAkSoAx> so anyways, what else can we do with TestDrive?
<RoAkSoAx> we can also Test Ubuntu Cloud Images
<RoAkSoAx> wait what? Cloud Images?? Yes, cloud images that run in the cloud can be tested in the local machine
<RoAkSoAx> unfortunately for now it will just work for daily images and it only works in testdrive command line
<ClassBot> techbreak asked: what is cloud image ? image of cloud ubuntu OS ?
<RoAkSoAx> techbreak_, the Cloud Image is the Ubuntu Image used in cloud computing for either Eucalyptus Cloud or Amazon EC2. In other words, whenever you launch Ubuntu in the Cloud it uses a cloud image (i.e. a disk file with some other components that have Ubuntu pre-loaded)
<RoAkSoAx> Now, to be able to test Ubuntu Cloud Daily Images we will need to use the command line application. So, we can open a command line and just do the following to obtain the latest Daily UEC/Cloud Images available:
<RoAkSoAx> testdrive -p uec-daily -l uec-server
<RoAkSoAx> We can also specify the release (i.e. Maverick)
<RoAkSoAx> testdrive -p uec-daily -l uec-server -r maverick
<RoAkSoAx> Now, a cool feature that was added lately is to be able to launch the Cloud Image in the local terminal/console. But what does this mean? Instead of launching the image in a separate KVM window it will display it in the terminal from where you are launching testdrive. The command is as follows:
<RoAkSoAx> testdrive -p uec-daily -l uec-server --curses
<RoAkSoAx> NOTE: Running cloud images only work with KVM
 * RoAkSoAx running out of time
<RoAkSoAx> as I mentioned before we can also run images located in the machine
<RoAkSoAx> Now we can also launch images that are located in the machine. With TestDrive GTK you can do it by using the "Other" tab - "Add ISO" (Equivalent to File > New) or simply  File > Open. The local images that can be launched can be either ISO Images, Disk Images (QCOW2) and Cloud Images. We can also do this from the command line as follows:
<RoAkSoAx> testdrive -u /local/path/to/image.iso
<RoAkSoAx> testdrive -u /local/path/to/image.img
<RoAkSoAx> testdrive -u /local/path/to/uec-image.tar.gz
<RoAkSoAx> testdrive -u /local/path/to/uec-image.tar.gz --curses
<RoAkSoAx> last but not least, for those running Natty, we have recently added an Indicator Applet (if you notice) that will appear and notify the user whenever there are available pre-release candidate ISO's available for testing. These ISOs are the ISOs that are being tested towards the next Ubuntu release. (i.e. ISO's for Tomorrow's Alpha3).
<RoAkSoAx> the idea behind that was to make aware people who were using TestDrive that there's an Ubuntu pre-release available for testing
<RoAkSoAx> == How to Contribute ==
<RoAkSoAx> Now, we've given an overview of the things we can do with TestDrive. What about if you want to contribute to TestDrive and make it better. Well it is simple, you can either contribute with ideas, fixing bugs or implementing new features. Though if you have an idea and can submit a patch, that's more desirable :). Some of the new reported feature requests are:
<RoAkSoAx> "Re-run this program with TestDrive" https://bugs.launchpad.net/testdrive/+bug/704675
<RoAkSoAx> "Quicklist and progressbar support" https://bugs.launchpad.net/testdrive/+bug/711915
<RoAkSoAx> "GUI Option for zsync" https://bugs.launchpad.net/testdrive/+bug/701818
<RoAkSoAx> "Support VMWare" https://bugs.launchpad.net/testdrive/+bug/527161
<RoAkSoAx> == Questions/Comments/Suggestions? ==
<RoAkSoAx> Since I only have 10 mins left
<RoAkSoAx> lets do questions/comments/suggestions and try to get up a machine up and running
<ClassBot> There are 10 minutes remaining in the current session.
<ClassBot> techbreak asked: ok if I am not funny what is this kvm ?
<RoAkSoAx> techbreak, indeed KVM is one of the varios methods to create Virtual Machines
<RoAkSoAx> and the one pre-ferred in Ubuntu
<ClassBot> acarpine asked: why i should run a cloud image?
<RoAkSoAx> acarpine, you don't have to, but if you would like to test it, you are more than welcome to do so!! :). Adding the support to TestDrive was a feature requested to be able to easily test Cloud Images by the Developer
<ClassBot> stefwal asked: is there a difference between a second machine and testdrive? If some one has a second machine of course!
<RoAkSoAx> stefwal: Of course, TestDrive uses a Vritualization Technology to run an ISO image (mainly) in a Virtual Machine
<RoAkSoAx> you could also burn that ISO in a USB Stick and then test it in real HW
<ClassBot> techbreak asked: what are we supposed do after testing ? what if we found some error or bug or something ? where to submit ? how ?
<RoAkSoAx> techbreak_, if you found a error/bug with Ubuntu, just file the bug http://launchpad.net/ubuntu
<RoAkSoAx> if you found a bug in TestDrive file a bug in launchpad.net/testdrive
<ClassBot> Vikash asked: I have one que. I may be off the topic because i have just come to the session... Which OS is better Ubuntu or Ubuntu-derivative
<RoAkSoAx> Vikash, you can test that yourself with TestDrive :)
<RoAkSoAx> and use whichever you like better
<ClassBot> There are 5 minutes remaining in the current session.
<RoAkSoAx> So anyways, anyone has anything else for the last 5 minutes of the session?
<ClassBot> stefwal asked: any good ways to test?
<RoAkSoAx> stefwal, refer to https://wiki.ubuntu.com/UsingDevelopmentReleases/ for the steps on how to test techbreak_ shows how to run the download ISO
<RoAkSoAx> stefwal, but that's the point, testing involves trying to do things
<RoAkSoAx> you can always follow ISO testing if you would like to contribute
<RoAkSoAx> and it will show step by step on how to do it and you can use TestDrive for that
<RoAkSoAx> stefwal, refer to iso.qa.ubuntu.com
<ClassBot> techbreak asked: what after i finish downloading ? any link if get stuck ?
<ClassBot> techbreak asked: can I burn cd /dvd from the downloaded image from testrive ?
<RoAkSoAx> techbreak_, yes: Slect the Image you'd like to burn and click on "Create USB disk"
<RoAkSoAx> which will launch USB creator
<RoAkSoAx> to finish please for more help you cn find me in channel #testdrive
<RoAkSoAx> I believe my time is over. Thank you all for attending
<RoAkSoAx> Project website: launchpad.net/testdrive IRC Channel: #testdrive
* ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - https://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Questions in #ubuntu-classroom-chat || Event: Ubuntu Developer Week - Current Session: LoCo Directory Hacking - Instructors: mhall119, cjohnston
<ClassBot> Logs for this session will be available at http://irclogs.ubuntu.com/2011/03/02/%23ubuntu-classroom.html following the conclusion of the session.
<mhall119> Hello everyone
<mhall119> my name is Michael Hall, and I'm one of the developers of the Ubuntu LoCo Directory
<mhall119> I hope you've all been to http://loco.ubuntu.com already, but does anybody not know what it is?
<mhall119> alright, quick overview then
<mhall119> the loco directory is a community-driven project, meaning decisions and implementation are determined by the community, not Canonical
<ClassBot> techbreak asked: mhall119, idk what is this sessoin about ? loco directory ???
<mhall119> techbreak_: http://loco.ubuntu.com
<mhall119> this session is going to get you ready to start hacking and contributing to it
<mhall119> the loco-directory is written in Python, and uses the Django web framework
<mhall119> you will need at least working knowledge of python, and some basic understanding of Django to work on LD
<mhall119> if you don't currently have Django knowledge, don't worry, it's very easy and I'll go over some of it this hour
<mhall119> the main developers of LD are myself, cjohnston, dholbach, Ronnie and daker
<mhall119> we all hang out in #ubuntu-locoteams, and that's usually where we discuss LD development
<mhall119> since loco.ubuntu.com is hosted on one of Canonical's servers running Ubuntu 10.04, we're restricted to the versions software in those repositories
<mhall119> specifically python 2.6, Django 1.1, jQuery 1.3 and jQuery-ui 1.7
<mhall119> if you're running Lucid, you're all set
<mhall119> if you're running Maverick or Natty, you'll need to grab those versions manually
<mhall119> < YoBoY> QUESTION : we can't develop with earlier versions of python, django, ... or
<mhall119>                it's just recomended ?
<mhall119> since we develop on 2.6, and it'll be running 2.6 in production, it's generally a good idea for you to use 2.6
<mhall119> I can't say for sure that it won't work with 2.4, but it's likely
<mhall119> I'm assuming you have all been introduced to the basics of bzr by now, but if not just ask about it as I go
<mhall119> alright, lets get the code!
<mhall119> cd to where you want it to live
<mhall119> then run: bzr branch lp:loco-directory
<mhall119> that'll get you a copy of the latest trunk
<mhall119> trunk is almost always stable
<ClassBot> RawChid asked: IS there a manual or webpage which describes how to do this?
<mhall119> not that I know if, but ask us in #ubuntu-locoteams (after this session) and we can help you with it
<mhall119> okay, by now you should all have a local branch of loco-directory
<mhall119> so cd loco-directory and let's take a look
<mhall119> quick Django info:
<mhall119> Django projects are divided between the root 'project' folder, and sub 'application' folders
<mhall119> in the root of the branch, 'loco_directory' is the django project folder
<mhall119> so cd loco_directory
<mhall119> under there you'll see 'common', 'events', 'meetings', 'services', 'teams', 'userprofiles' and 'venues'
<mhall119> those are all of the Django applications that make up LD
<mhall119> 'common' is just what it sounds like, it's for things that don't fit elsewhere
<mhall119> 'teams' contains all the code for LoCo Team records
<mhall119> ls ./teams/
<mhall119> a Django app typically has several standard files
<mhall119> models.py is where you define your data models, Django will automatically turn these into SQL tables for you (you'll see that later)
<mhall119> views.py is where you write the code that is responsible for responding to an HTTP request
<mhall119> and urls.py maps a URL pattern to a view
<mhall119> any questions so far?
<mhall119> ok, moving on
<mhall119> the 'events' and 'venues' are the apps that handle LD's event tracker, if you've used LD before you'll know what they do
<mhall119> they have the same basic structure as 'teams', with models.py, views.py and urls.py
<mhall119> same for 'meetings' and 'userprofiles'
<mhall119> now, Django has a built-in templating system that we use.  Our views.py code will usually make use of one or more templates in rendering an HTTP response
<mhall119> templates live under the 'templates' directory in the project folder
<mhall119> if you ls ./templates/ you'll see that they're separated out by app as well
<mhall119> so, to recap
<mhall119> if you want to change data structures, it'll likely be in a models.py
<mhall119> if you want to change the logic behind a display, it'll likely be in a views.py
<mhall119> and if you want to change the interface (html), it'll likely be in the templates
<mhall119> everybody with me so far?
<mhall119> alright, let's get you guys setup with a working instance of LD
<mhall119> first things first, lets look at settings.py in the project folder
<mhall119> there's a lot of stuff in here, but the key piece is down around line 116: INSTALLED_APPS
<mhall119> this is a list of apps that Django will use for this project
<ClassBot> monish001 asked: does Django works on MVC (model view controller framework)?
<mhall119> yes, though they call it Model-View-Template, and things are slighting shifted
<mhall119> specifically, the typical 'controller' logic is in the view, and most of the display stuff is in the templates
<mhall119> okay, lets loot at INSTALLED_APPS
<mhall119> the first 4 are the standard Django apps, auth gives us User and Group models, plus permissions
<mhall119> contenttypes is really internal stuff you won't likely ever need to worry about
<mhall119> sessions gives us automatic session tracking, just like any good web framework should
<mhall119> admin is the best of them all, it'll give you a fully functional interface to manage the data in your database for all your defined models
<mhall119> if you look in most of the application folders, you'll see amdin.py, which tells the admin app how to present your models
<mhall119> the next 6 items in INSTALLED_APPS are the LD apps we've already gone over
<mhall119> django_openid_auth is what let's us tie our users and groups to the Ubuntu Single Signon
<mhall119> south is a special Django app, by default Django will create DB tables based on your models, but it won't change existing tables, which means once you create them you have to make any future changes manually
<mhall119> south lets you track your model structure, and will provide migration scripts whenever you make changes to them
<mhall119> we make good use of south in the loco directory
<mhall119> if you look under most of the application folders, you'll see a 'migrations' folder, these are the south scripts
<mhall119> ok, that's all for settings.py
<mhall119> next step, copy local_settings.py.sample to local_settings.py
<mhall119> we use local_settings.py for settings that are specific to a running instance of LD, they aren't checked into bzr
<mhall119> there's not really anything you need to do with it right now, except make the copy
<mhall119> everyone with me still?  The next part is setting it all up
<mhall119> alright, lets get our database
<mhall119> from the project folder, run "./manage.py syncdb"
<mhall119> it will ask you for a superuser, select yes and give it a username, email and password
<mhall119> syncdb is the Django command that created your initial database tables
<mhall119> by default, LD will use a local sqlite3 file for it's database
<mhall119> in production, it runs against postgres
<mhall119> you're also free to use MySQL
<mhall119> when syncdb finishes, you'll see a message about some apps not being synced because they're under south's migration control
<mhall119> so after syncdb, run: ./manage.py migrate
<mhall119> this will cause South to run through all  of it's migration scripts
<mhall119> which will leave you with the proper table structures
<mhall119> if you're using sqlite, you'll see some warnings because it doesn't support some contraints, don't worry about those
<mhall119> finally, we'll need to initialize your setup, so run: ./manage.py init-ld
<mhall119> init-ld does several things, it'll setup a group in your database for the LoCo Council, it will create necessary symlinks for jquery, and finally it'll grab a copy of lp:ubuntu-website/light-django-theme
<mhall119> that last bit is important
<mhall119> light-django-theme provides the base templates and CSS for several Django powered Ubuntu sites
<mhall119> loco.ubuntu.com (of course), but also summit.ubuntu.com and 10.cloud.ubuntu.com
<mhall119> everybody run all of those steps okay?
 * mhall119 looks at the clock
<mhall119> okay, typically the next step is to either refresh your database with data from Launchpad,or refresh it with data from loco.ubuntu.com
<mhall119> but, both of those take a while to run, so we're going to skip them and I'll just have you download a copy of loco_directory.db
<mhall119> http://ubuntuone.com/p/fn1/
<mhall119> put that into your project folder (over-writing the one you made with syncdb)
<mhall119> for reference, "./manage.py lpupdate" will refresh teams and some users from Launchpad, but won't get events, venues or meetings
<mhall119> "./manage.py import-live-data" will use LD's REST/Json services to download data from loco.ubuntu.com
<mhall119> once you have the database file, run: ./manage.py runserver
<mhall119> this will run django's built in webserver on localhost:8000
<mhall119> which you can then visit in your browser to see your local instance running
<mhall119> oh yes, Ronnie brings up a point that I missed
<mhall119> INSTALL file in the root of the branch has instructions for getting things setup
<mhall119> one of the lines is a long apt-get install, which will get you all the dependencies
<mhall119> okay, hopefully I've gotten you guys a working (or mostly working) isntance of the LD code
<mhall119> the next step is to find a bug at https://bugs.launchpad.net/loco-directory to work on
<mhall119> if you need help figuring out what needs to be done, just ask us in #ubuntu-locoteams
<ClassBot> There are 10 minutes remaining in the current session.
<mhall119> but remember, data=models.py, logic=views.py, UI=templates
<mhall119> that'll get you to the right place 90% of the time
<mhall119> after you make the fix, test it locally first
<mhall119> once you're happy with it, run: bzr commit -m "You message" --fixes lp:12345
<mhall119> where 12345 is the bug number you're working on
<mhall119> that'll help launchpad associate your code with that bug
<mhall119> then: bzr push lp:~you/loco-directory/fixes-12345
<mhall119> agian, I hope you've all been introduced to bzr and distributed development, so this should be familiar
<mhall119> then go to https://code.launchpad.net/loco-directory, select your branch, and click the "Propose for merging" link
<mhall119> then one of the main developers will review your code (when we have time, we all have actual jobs too)
<mhall119> < chadadavis> QUESTION, doe the push statement make a new branch as well, or just
<mhall119>                     upload the current branch?
<mhall119> it will create a new branch in Launchpad, based off the lp:loco-directory branch
<mhall119> these are very lightweight in launchpad, so don't hesitate to push stuff
<mhall119> we typically have one branch per fix or feature
<ClassBot> There are 5 minutes remaining in the current session.
<mhall119> once your code bases a review, we will merge it into lp:loco-directory
<mhall119> from there it will get translated and wait for the next release of LD
<mhall119> anything that lands in trunk will be in the next release
<mhall119> we don't have a fixed release schedule though, so it's hard to say if it'll take days or weeks to get it out
<mhall119> < YoBoY> QUESTION : can you point us some easy bugs to start working on ?
<mhall119> we try to mark small/easy fixes as 'bitesize' in launchpad, you can get a list of them from https://bugs.launchpad.net/loco-directory/+bugs?field.tag=bitesize
<mhall119> if you get stuck or have other questions, come find one of us in #ubuntu-locoteams
<mhall119> and happy hacking!
* ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - https://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Questions in #ubuntu-classroom-chat || Event: Ubuntu Developer Week - Current Session: Ubuntu ARM and the OMAP4 images - Instructors: ogra
<ClassBot> Logs for this session will be available at http://irclogs.ubuntu.com/2011/03/02/%23ubuntu-classroom.html following the conclusion of the session.
<ogra> hey hey
<ogra> so i will give a short insight into Ubuntu ARM, the team and the images we care for, i dont expect this to take much time so there should be plenty of time for questions (if there are any)
<ogra> the ubuntu arm team (as the name suggests) cares for the arm port in ubuntu
<ogra> we build images for different types of arm hardware
<ogra> target audience for these images are endusers
<ogra> and we try to make them an identical experience to any other ubuntu architecture, so you can expect identical functionallity as in any other ubuntu install
<ogra> initially the ubuntu arm team consisted of 8 developers that cared for the whole archive
<ogra> all builds (and their failures) as well as all images had to be maintained by this small bunch of people
<ogra> recently ARM recognized how important ubuntu was for them, so they started linaro ...
<ogra> linaro is a consortium of companies taking care of improving arm and the arm experience
<ogra> i.e. nowadays if you get an arm board you will need a linux kernel from the vendor, a so called BSP
<ogra> usually that has tons of incompatible changes so the kernel couldnt be merged upstream in linus tree
<ogra> and you will also not run a kernel for board A on board B
<ogra> linaros mission is to fix such issues
<ogra> so that at some point you have someting like the linux-generic package that runs on all arm hardware
<ogra> they also care about the toolchain and compiler to get the best optimization out of them
<ogra> and they help a lot with failures to build from source
<ogra> so since linaro is around, the work of the ubuntu-arm team got a lot easier, we stand on their sholders now
<ogra> ...
<ogra> over the recent releases we built images for a variety of boards ... starting with freescales imx51 babbage board, marvells dove board (which is known from the press as armada board nowadays) and the very popular beagleboard from TI
<ogra> with maverick we started to work closely with TI to make ubuntu the reference platform for their OMAP4 pandaboard
<ogra> this was released in 10.10 and gets improved in 11.04 now
<ogra> as architectures come and go the babbage and dove architectures vanished from our list of ports, omap 3 and 4 persist
<ogra> if you want to help out with arm development i would highly suggest to take a look at the pandaboard on http://pandaboard.org
<ogra> its is available for $175 and has all HW you can imagine
<ogra> with the ubuntu install and the TI addons it is fully capable of playing 1080p video
<ogra> so if you are intrested in arm development on ubuntu a beagleboard (see beagleboard.org) or a panda is the way to go
<ogra> for people that cant afford hardware we also worked out cross ways of building and testing arm packages, the qemu-kvm-extras-static package brings all you need to run an arm chroot on your x86 boax
<ogra> for testing and devevlopment thats a good start
<ogra> for the highly embedded thinking people linaro offers a cross toolchain and the xdeb packages that makes it possible to cross build packages for arm on an x86 host
<ogra> if you are intrested in tryinf out our images you can find install instructions and download links at https://wiki.ubuntu.com/ARM/OMAP it sill always list links to the different release centric instructions
<ogra> ok, enough of me babbling i think :)
<ogra> there are some questions
<ClassBot> darkdevil75 asked: arm?
<ogra> yes :)
<ClassBot> monish001 asked: arm port means arm hardware architecture platform?
<ogra> right, it means the CPU you carry in your mobile phone, tablet or (rarely) in your netbook
<ClassBot> monish001 asked: why is arm hardware important?
<ogra> heh, well, as you see above it runs very transparently in many devices ... you can find arm in your dishwasher as well as in your mobile phone or the ipad
<ogra> even in TVs
<ogra> ARM CPUs usually eat a tenth of the power of an x86 CPU while providing the same computing power
<ogra> that means you usually dont need a fan for example
<ogra> within the last years ARM CPUs turned from very low profile embedded things into powerful CPUs
<ogra> i'm currently typing on a netbook (toshiba ac100) that is powered by an arm dual core cpu and can easily take it up with an atom
<ogra> but it only weights 700garms and has no fans
<ogra> in the next years you will very likely see arm approaching the server market
<ogra> in a datacenter the most power is used to keep the air condition running ... wirth arm CPUs that cost will drop significantly
<ogra> ...
<ogra> thats why arm is an important arch
<ogra> (and in my personal opinion the future)
<ClassBot> beachbrake asked: Why are ARM development boards more expensive? (from the point of view of a student)
<ogra> well, i dont think the beagle or pandaboards are much more expensive than and intel mainboard+cpu+graphics card+network card
<ClassBot> chadadavis asked: are compiler developers (i.e. GNU) also involved, or is Linaro also taking that upon themselves?
<ogra> linaro is working with gcc upstream and if you know a bit about arm you will know about codesourcery, they are part of linaro
<ogra> so all work done on the compiler is done very closely with all entities that are involved in arm gcc nowadays
<ClassBot> bullgard asked: "recently ARM recognized how important ubuntu was for them" <- Why is ARM important for Ubuntu end users?
<ogra> well, once you can buy netbooks with arm cpu and have a battery life of 3days you will know ;)
<ogra> honestly though, tablets, netbooks and mobile phones are the future
<ogra> while ubuntu doesnt offer any UI options for the latter two, having the distro running on such platforms enables the developer community to work on them
<ogra> so you can work on your concept of porting unity to a mobile phone if you are intrested for example ;)
<ClassBot> fisch246 asked: when will Ubuntu Server support ARM?
<ogra> well, theoretically it already does
<ogra> you can turn a pandaboard into a server and i.e. use it as webserver etc
<ogra> practically we might work on server images in future releases, server has always been on our list of devices to support, currently we only focus on netbook though
<ClassBot> bullgard asked: What do you mean by "low profile" in "ARM CPUs turned from very low profile embedded things into powerful CPUs"? ("low profile" appears to have several meanings in English.)
<ogra> well, i actually meant "underpowered"
<ogra> :)
<ogra> arm CPUs in the past were designed exactly for a low power task ... i.e. run your dishwasher or your TV settop box
<ogra> there was no focus in running a desktop or full server on them
<ogra> (though there were many embedded servers around ... your router might run an embedded arm with a webserver UI)
<ogra> over the recent years arm simply "grew up" your smartphone is as powerful as your PC was 5 years ago nowadays and you can play games you wouldnt have imagined a few years ago
<ogra> (or watch HD movies or ... or ...)
<ClassBot> bullgard asked: Is a Ubuntu image enough software or does one need additional software to run Ubuntu from an ARM board?
<ogra> depends what hardware you look at
<ogra> the omap3 and 4 images we provide also offer you the missing bits and pieces (closed source drivers etc) in an easy way so you can get up and running within minutes
<ogra> though the bare image is always good enough to start working right away
<ogra> the install isnt harder than on x86 and it doesnt behave different in userspace
<ClassBot> balau asked: Debian is working on ARM ports, too. Is Ubuntu (and Linaro) coordinated with Debian on this front?
<ogra> INDEED !!!
<ogra> i just returned from the emdebian sprint this weekend where debian, linaro, ubuntu and genesi met for working on improvements of the arm port
<ogra> and as with x86 debian is our upstream for packages, even though ubuntu is optimized more
<ogra> ubuntu builds focus only on the last two generations of arm cpus while debian tries to be backwards compatible for a lot more boards
<ogra> but that goes at the cost of performance
<ogra> the first arm port in ubuntu was a nearly unmodified rebuild of debian
<ogra> optimizations and architecture specific improvements happened since though
<ClassBot> jderose asked: what hardware do you recommend for uTouch + ARM?
<ogra> oh, thats hard to say since i dont know what HW utouch supports yet, i would recommend talking to the utouch guys for this
<ogra> theoretically all hardware that runs on x86 will also run on arm
<ogra> i.e. a usb touchscreen you attach to x86 that is supported by utouch will definitely also work on an arm device
<ClassBot> chadadavis asked: Are licenses required to distribute the necessary drivers?
<ogra> yes
<ogra> powervr (which you might know as poulsbo from the intel world) is the most sold 3D chip in the arm world
<ogra> sadly the situation isnt much better than with nvidia drivers here
<ogra> the drivers are freely usable but not distributable in images
<ogra> so we have a set of PPAs for these and a process that automatically installs them after first boot if you chose so
<ogra> in cases where you have to accept an EULA this is shown and you can approve or decline it
<ClassBot> jderose asked: speaking of drivers, embedded graphics drivers are a big concern for me... looking at ARM website, I got the impression the Mali-T604 might have fully open-source drivers... do you know if this is true?
<ogra> i know there are plans that all drivers should go opensource but i dont know if this is already the case
<ogra> in fact there is only one board that just came out that uses the mali engine, the linaro guys might know more about this board
<ClassBot> abhinav19 asked: so your work involves working at the kernel level or user space packages also need to be modified ? and also, how can new developers get started if they are interested in contributing or learning ?
<ogra> our work involves everything that makes up ubuntu
<ogra> from the kernel up to UI we make sure everything works on the platform
<ogra> while i'm not particulary a kernel guy we gave persons in the team that cover that area and we have community developers that help out as well
<ogra> if you want to get started i would suggest dropping by ion #ubuntu-arm, this is the channel where we all hang out
<ogra> and there is also the #linaro channel if you are more intrested in the hardcore lowlevel stuff ... like assembler, hacking on toolchains or any other bit thats very close to the hardware
<ogra> jederose said he was hoping i could give him a recommendation for a touchscreen regarding his question above
<ogra> i cant really, what i know is that the liliput displays work quite well
<ogra> they are mainly for car entertainment, but they are cheap and can do full HD
<ogra> (and come with a USB touchscreen by default)
<ogra> afaik there is no actual recommendation from TI for pandaboard touchscreens
<ogra> you could ask in #pandaboard though :)
<ogra> so there are 10min to go but no questions left
<ogra> i hope i could give some insight in the ubuntu world of arm, linaro and the omap images, thanks for the questions :)
<ClassBot> There are 10 minutes remaining in the current session.
<ogra> tsimpson, i think i'm done, feel free to take the stage
<tsimpson> give me a minute to get my notes :)
<ogra> oh, there is another question ...
<ogra> i can answer while tsimpson gets his notes
<ClassBot> jderose asked: have the Linaro members (TI, Freescale, IBM, Samsung, etc)... been sympathetic to the importance of fully open-source drivers?  Are you optimistic about improvements on this front?
<ogra> i think tehy see the need but after all they are all business people indeed
<ogra> in fact though, the powervr situation changed a lot during the last year
<ogra> part of that is because of TI pushing for more openess
<ClassBot> abhinav19 asked: thanks. well I dont have the capacity to buy ARM hardware right now. So if one wants to do application level development, is there some thing like a simulator or emulator to run on PC ?
<ogra> yes, as i noted above, there is the qemu-kvm-extras-static package that gives you a chroot ... and indeed you can run qemu VMs
<ClassBot> There are 5 minutes remaining in the current session.
<ogra> if there are remaining questions, feel free to come by in #ubuntu-arm at any time, the team is there and happily helps
* ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - https://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Questions in #ubuntu-classroom-chat || Event: Ubuntu Developer Week - Current Session: How supybot killed my mind - Instructors: tsimpson
<tsimpson> Hello everyone \o
<ClassBot> Logs for this session will be available at http://irclogs.ubuntu.com/2011/03/02/%23ubuntu-classroom.html following the conclusion of the session.
<tsimpson> my name is Terence Simpson, and I'm lead developer of the Ubuntu Bots project (that's the one that gives us ubottu and friends)
<tsimpson> I'm also an IRC operator in several Ubuntu channels, and a councillor on the Ubuntu IRC Council
<tsimpson> so I have come to know IRC quite well over the years
<tsimpson> and contrary to some reports, I haven't been hacking on IRC bots since I was 5, I'm just not that 1337 ;)
<tsimpson> this is the Launchpad project for Ubuntu Bots: https://launchpad.net/ubuntu-bots
<tsimpson> today I'm going to talk to you a bit about the IRC protocol, and creating a simple plugin for the supybot IRC bot
<tsimpson> so you may want to 'sudo apt-get install supybot' now if you want to play along
<tsimpson> the IRC bot most of you will be familiar with is ubottu, or one of its ubot* and lubotu* clones
<tsimpson> these bots are all standard supybot IRC bots with our custom plugins, which are developed in the launchpad project above
<tsimpson> later, I'll go through creating a custom plugin, some python knowledge is required for that part
<tsimpson> before that though, you should know a something abou the IRC protocol itself
<tsimpson> some of what I'm going to discuss may not be necessary for developing a supybot plugin, but it's useful to understand what's actually going on
<tsimpson> also, other IRC bots may require more/less knowledge than others, or you may be feeling particularly insane and want to write your own IRC bot/client
<tsimpson> http://www.irchelp.org/irchelp/rfc/ contains lots useful information about the IRC protocol, as well as the RFC (the document describing the IRC protocol)
<tsimpson> the general way IRC works is, you send a command to the IRC server, followed by carriage-return new-line, and it responds in some way
<tsimpson> in this way we say IRC is an "event driven" protocol
<tsimpson> the carriage-return and new-line characters are represented by "\r" and "\n" in character strings, new-line is also known as line-feed
<tsimpson> and the server uses those two characters to determine when you're done sending your commands
<tsimpson> the IRC command you'll care most about when developing an IRC bot, or plugins for IRC bots, is the "PRIVMSG" command
<tsimpson> a PRIVMSG is how I'm talking to you now, it how clients send messages, and despite its name, it's not inherently a PRIVate MeSsaGe.
<tsimpson> when you type a message into your IRC client, and hit enter, the client will send a PRIVMSG command to the server
<tsimpson> command in IRC usually have some arguments/parameters that go along with them
<tsimpson> for PRIVMSG, you'll want to tell the server where you want the message sent to
<tsimpson> and what the message is
<tsimpson> in IRC each argument is separated by a space
<tsimpson> if you need to send an argument with a space in it, it has to be the last argument and it needs to be prefixed with a ':' character
<tsimpson> our messages usually contain spaces, so that's an instance of where you need to do that
<tsimpson> so here's an example
<tsimpson> if I wanted to send the message "Hello World!" to the channel "#mychannel", this is what my client would send:
<tsimpson> PRIVMSG #mychannel :Hello World!\r\n
<tsimpson> the way the server responds to this is to forward that message to all of the other servers it's connected to and clients connected to it
<tsimpson> however, when the server forwards these messages, it adds something called a "prefix" to the message
<tsimpson> his prefix tells everyone who receives the message where it came from, it's made up of your nick name, user/ident, and host. then prefixed with a ':'
<tsimpson> the format is ':nick!ident@host', so the prefix for me is ":tsimpson!~tsimpson@ubuntu/member/stdin"
<tsimpson> when your client sees the "Hello World!" message from me, it would receive this:
<tsimpson> :tsimpson!~tsimpson@ubuntu/member/stdin PRIVMSG #mychannel :Hello World!\r\n
<tsimpson> the only difference between a public channel message and a private one-to-one message is the "target"
<tsimpson> the target is either a channel, as #mychannel is above, or a nick of another user
<tsimpson> there are lots of commands in the IRC protocol, like NICK, JOIN, PART, QUIT, PRIVMSG, NOTICE, MODE, and many numeric commands
<tsimpson> all the numeric commands come from the server and are usually informational or indicate errors
<tsimpson> all these messages have the same form when you receive them
<tsimpson> :<prefix> <command> <arg0..argN> :<last>
<tsimpson> where each item after the <command> is optional (depending on the command)
<tsimpson> it's also worth noting that when you get a message from the server, rather than another person, the <prefix> is the server rather than a user mask
<tsimpson> for instance, if you connect to someserver.freenode.net, that will be the prefix when you get a message from the server.
<tsimpson> using the information in the IRC RFC you could create your own IRC client, and have that do whatever you wanted
<tsimpson> and IRC bot is just an IRC client that reacts to the messages in some custom way
<tsimpson> really, there is no difference between a "real" IRC client, and some script that connects to an IRC server
<tsimpson> another thing to note about IRC, is that it has no character encoding. that is, it's not ASCII, or UTF-8, or anything
<tsimpson> it is up to the client to figure out what each particular message is encoded in
<tsimpson> but most clients are UTF-8 aware by default, and that's what you should use
<tsimpson> IRC is also case insensitive, that is "PRIVMSG #MyChannel" and "privmsg #mychannel" are exactly the same command with exactly the same destination
<tsimpson> the only exception to this is the characters '{', '}', and '|', which are considered the lower-case forms of '[', ']' and '\', respectively
<tsimpson> the reason for that has to do with IRCs Scandinavian origin, and it's something you'll need to be aware of when comparing nick names etc
<tsimpson> from that, you should have a good idea of how ubottu works when responding to factoid requests
<tsimpson> it receives a PRIVMSG command from the server, looks at the message target (a channel or itself)
<tsimpson> if the message is in a channel, it checks that it starts with the '!' character
<tsimpson> then it goes looking in its database for that factoid reply, and sends that off to either the channel or the nick name
<tsimpson> ubottu does more complicated things than that
<tsimpson> like prefixing a nick in the "!factoid | nick" form, and sending the messages in private with the "!factoid > nick" form
<tsimpson> that's a little more complicated, but it all starts with a PRIVMSG command.
<tsimpson> there's lots more I could tell you about the IRC protocol
<tsimpson> but I wanted to give you an example of how to write a plugin for supybot
<tsimpson> some Python knowledge is required here on in, but you should get the general idea even if you don't know Python
<tsimpson> if you've installed supybot, you can see its files in /usr/share/pyshared/supybot/
<tsimpson> the first thing you need to do, after installing supybot, is to choose a directory where your bot is going to live in
<tsimpson> this will be where all the config file and plugin will go
<tsimpson> ~/bot is a good example, and that's what I'm going to use in this example
<tsimpson> you need to have a terminal open for this, as supybot is set-up via the command-line
<tsimpson> irst you create the directory; "mkdir ~/bot", then change to that directory; "cd ~/bot"
<tsimpson> then you run though the supybot set-up with the "supybot-wizard" command from ~/bot
<tsimpson> you can just hit enter for the first question about bolding, and then 'y' if it works
<tsimpson> choose 'n' for the question "Are you an advanced supybot user?"
<tsimpson> you can look through that later if you want, but it's not necessary right now
<tsimpson> then hit enter to create the directories in the current (~/bot) directory
<tsimpson> for the "IRC network", enter: freenode
<tsimpson> for the server: irc.freenode.net
<tsimpson> then hit enter (or choose 'n') for "Does this connection require connection to a non-standard port?"
<tsimpson> then you need to choose a nick name for your bot, remember that it needs to be unique on the network (so don't choose ubottu ;)
<tsimpson> for this example, I'll refer to the nick "mybot", but you should choose something different
<tsimpson> press enter, or choose 'n', for the question about setting a server password
<tsimpson> next it'll ask if you want the bot to join some channels when it connects, you'll want to choose 'y' here
<tsimpson> you should now get yourself a temporary channel, this is easy enough, you just join an empty channel
<tsimpson> a good idea is to create one based on your nick, so if you are "someone", you'd /join ##someone
<tsimpson> the double-# on freenode indicates it's an "about" or unaffiliated channel, anyone is free to create that kind of channel on freenode
<tsimpson> so, once you're in your new channel, type the name into the supybot wizard and press enter
<tsimpson> supybot comes with many plugins pre-installed, you can look at them later
<tsimpson> for now just answer 'n' when it asks if you want to look at them individually
<tsimpson> next, it will ask if you want to add an owner for the bot, you do
<tsimpson> supybot will only accept certain commands from an owner or an admin
<tsimpson> commands that make it join/part channels or change nicks or quit for example
<tsimpson> type in your IRC nick for the user-name and then pick a password you'll use
<tsimpson> it'll ask twice for the password to make sure you don't mistype
<tsimpson> the next question is about the "prefix char", this is a character that the bot will use to recognise when you are giving it a command
<tsimpson> press 'y', then enter, then you can choose a character. a good choice is the '@' character
<tsimpson> and that's it, a basic set-up for a working supybot IRC bot
<tsimpson> to start the IRC bot and get it connected to IRC, you run the command "supybot mybot.conf" (where "mybot" is the nick you chose for your bot)
<tsimpson> you'll see it connecting from the console, it'll print lots of information there so you can monitor it
<tsimpson> as a note, you can run a supybot instance in "daemon" mode by adding '-d' to the command
<tsimpson> that will make the supybot instance run in the background and log messages to ~/bot/log/messages.log
<tsimpson> for now though, we will want to see the messages in case there are any errors when we start developing a plugin
<tsimpson> which is quite common
<tsimpson> you should see something like "Join to ##someone on freenode synced in 1.15 seconds.", that means the bot has successfully joined the channel you gave it
<tsimpson> and you should see it sitting there in your channel
<tsimpson> the first thing you need to do is let the bot know you are the owner, you do this in /msg as it requires you sending a password
<tsimpson> so you do /msg mybot identify someone my_password
<tsimpson> (changing "someone" and "my_password" for the name of the owner and the password you gave to supybot-wizard)
<tsimpson> you should get a message back with "<mybot> The operation succeeded."
<tsimpson> the bot knows you are the owner now
<tsimpson> next you should type this in the channel where the bot is: @config supybot.reply.whenNotCommand False
<tsimpson> (replacing '@' with the prefix character you choose)
<tsimpson> I'll come back to why you did that that later
<tsimpson> with its default set-up, the bot won't do very much
<tsimpson> so we are going to make a plugin for the bot to do something :)
<tsimpson> you'll want to open another terminal window/tab and navigate to ~/bot/plugins (cd ~/bot/plugins)
<ClassBot> abhinav19 asked: are there any additional dependencies or requirements for running supybot-wizard as I got some errors ?
<tsimpson> there shouldn't be
<tsimpson> it just requires the basic python stuff
<tsimpson> which should be pre-installed
<tsimpson> ok, so we're in ~/bot/plugins
<tsimpson> hat is where the bot will look for plugins you create for it
<tsimpson> *that
<tsimpson> we are going to create a plugin, called Say, that will make the bot say something when we tell it to
<tsimpson> it will have one command in it, "say", which will repeat everything after the command
<tsimpson> so when we do "@say Hello, World!", our bot will reply with "Hello, World!"
<tsimpson> how exciting :)
<tsimpson> to start we run the command "supybot-plugin-create"
<tsimpson> it'll ask what the name of the plugin should be
<tsimpson> et's choose "Say"
<tsimpson> (plugin names should usually start with an upper-case character)
<tsimpson> the question about if it should be threaded is for more advanced plugins, that may be doing many things at the same time. we don't need that so we choose 'n'
<tsimpson> it'll then ask for your real name, so it can add a copyright and licensing information, go ahead and enter that
<tsimpson> and choose 'y' to use the Supybot license
<tsimpson> you can choose another license for your plugins if you wish, but the supybot license is an open-source license
<tsimpson> the template for the plugin should now be in the "Say" sub-directory at ~/bot/plugins/Say, so navigate there
<tsimpson> you'll see 5 files and one directory, "config.py", "__init__.py", "plugin.py", "README.txt", and "test.py" are the files
<tsimpson> the directory is there in case you want to create custom python modules
<tsimpson> we won't be using it in this example, but it does no harm being there
<tsimpson> "config.py" is where all the configuration for the plugin will go, we don't need any configuration for this plugin, so we won't modify that
<tsimpson> "__init__.py" is there to make that directory a python module, you can put some things in there if you wanted, but we don't need to do anything special here
<tsimpson> "plugin.py" is where our actual plugin code will be, we'll come back to that in a second
<tsimpson> "README.txt" is pretty self-explanatory, it's where you'll put some information about your plugin, like a description and any set-up information
<tsimpson> "test.py" is for testing, for complex plugins you can use that with the supybot-test script to run tests on the plugin
<tsimpson> now go ahead and open plugin.py in your favourite editor or python IDE
<tsimpson> the comment block at the top is the your copyright and the supybot license
<tsimpson> then it has some default imports followed by our plugin class "class Say(callbacks.Plugin):"
<tsimpson> all supybot plugin classes need to derive from supybot.callbacks.Plugin in some way, and there are a few special sub-classes too
<tsimpson> then is the line "Class = Say"
<tsimpson> when supybot imports a plugin module, it looks for "Class" in that module to identify the plugin
<tsimpson> and in __init__.py it imports "plugin", and sets Class = plugin.Class
<tsimpson> now we should change the doc-string to something meaningful
<tsimpson> supybot uses the doc-strings of classes and methods to provide the "@help" command
<tsimpson> so it's good practice to always document as you go
<tsimpson> something like """A plugin to say something when told to""" is good enough for this plugin
<tsimpson> when supybot receives a command from the IRC server, it looks for a corresponding method in the plugins it has loaded
<tsimpson> the command is lower-cased and capitalized, so "PRIVMSG" becomes "Privmsg"
<tsimpson> the method supybot looks for is "do" followed by the command
<tsimpson> so, if we want to listen for channel/private message, we need to create an "doPrivmsg" method
<tsimpson> for all of these kinds of method, supybot passes 2 arguments
<tsimpson> an instance of the supybot.irclib.Irc class (or a wrapper class), which represents the IRC client/bot, remember there's really no difference
<tsimpson> and an instance of the supybot.ircmsgs.IrcMsg class, which represents and IRC message
<tsimpson> in our method the Irc class we get will be a 'supybot.callbacks.ReplyIrcProxy'
<tsimpson> it just adds some convenience methods for replying to messages
<tsimpson> the Irc instance will contain information such as the network connected to
<tsimpson> nick name of the bot on that network
<tsimpson> and state information, like what channels are joined and what users are in those channels etc
<tsimpson> as I mentioned earlier, when you want to compare channels or nicks in IRC, there are some special characters to consider
<tsimpson> supybot has some utility function that help us, they are located in the supybot.ircutils module, which is already imported as "ircutils"
<tsimpson> back to the plugin
<tsimpson> in you plugin class (Say), remove the line "pass"
<tsimpson> then create a method called "doPrivmsg" taking 3 arguments, "self", "irc", and "msg"
<tsimpson> you should now have something similar to http://people.ubuntu.com/~tsimpson/botdev/plugin.1.py
<tsimpson> still nothing useful there, but we're about to change that
<tsimpson> this doPrivmsg method of our plugin class will be called when ever the bot sees a message
<tsimpson> now, we need some way to tell if the message was addressed to the bot or not
<tsimpson> we don't want our bot to respond to random messages after all
<tsimpson> our bot is addressed for example, if the message starts with the bots nick or command character you set
<tsimpson> now we could write some code to do all that
<tsimpson> but I'm lazy ;)
<tsimpson> and besides, we don't need to
<tsimpson> there is a "addressed" function in the 'supybot.callbacks' module which will do all that for us
<tsimpson> and supybot.callbacks is already imported as 'callbacks' for us
<tsimpson> we give it the bots nick, and the IRC message ('msg' parameter)
<tsimpson> it will either return an empty string, in which case the bot wasn't addressed
<tsimpson> or it will return the message without the part of the message used to address the bot
<tsimpson> for example, if the message way "mybot: this is a message", and we executed this code:
<tsimpson> message = callbacks.addressed(irc.nick, msg)
<tsimpson> the result in 'message' would be "this is a message"
<tsimpson> f the message was just "this is a message", then 'message' would be an empty string ''
<tsimpson> by the way, as I mentioned above the 'irc' parameter contains information, such as the bots nick. that's what 'irc.nick' gives us
<tsimpson> in the 'msg' parameter there is the property 'args'
<tsimpson> that holds a tuple with all the arguments of the message
<tsimpson> remember that PRIVMSG has 2 arguments
<tsimpson> the "target" (a channel or nick), and the message
<tsimpson> the target is in 'msg.args[0]' and the message is in 'msg.args[1]'
<tsimpson> when we call 'callbacks.addressed', it looks at both msg.args[0] and msg.args[1]
<tsimpson> it will check if msg.args[0] (the target of the message) is the bots nick, in which case it is a private message
<tsimpson> so, the first thing we do in our doPrivmsg method, is this:
<tsimpson> message = callbacks.addressed(irc.nick, msg)
<tsimpson> then we can check if 'message' is empty and, in that case, just return
<tsimpson> this is the code:
<tsimpson> if not message:
<tsimpson>     return
<tsimpson> that way our plugin will just ignore all the messages which are not addressed to it
<tsimpson> next we will need to check that the message is our "say" command
<tsimpson> we can do this by splitting off the first word of 'message' and checking that it equals 'say'
<tsimpson> we'll also want to remove it from the 'message' string, as it's not part of what we are supposed to repeat
<tsimpson> this is the code:
<tsimpson> bot_cmd = message.split(None, 1)[0]
<tsimpson> message = message[len(bot_cmd):].strip()
<tsimpson> here we're also slicing the 'message' to remove the command, and calling strip on that
<tsimpson> the command could well just be one word, so we can't just split it and assign to two variables
<tsimpson> we need to use strip() so that we don't have any leading space if/when we reply
<tsimpson> now we check if the command in 'bot_cmd' is the one we are looking for
<tsimpson> this is the code:
<tsimpson> if bot_cmd.lower() != 'say':
<tsimpson>     return
<tsimpson> we lower-case the command and check if it's "say", if not we just return as we aren't interested in other commands
<tsimpson> the next thing we need to do is check if we were actually given a message to repeat
<tsimpson> there's not much point calling a command that repeats a message without a message to repeat!
<tsimpson> if we weren't give a message, then we need to respond with an error message indicating that we need more arguments
<tsimpson> remember that 'message' is now whatever was left after we removed the command
<tsimpson> this is the code:
<tsimpson> if not message:
<tsimpson>     irc.error("I need something to say")
<tsimpson>     return
<tsimpson> 'error' is a method on the 'irc' object that lets us respond with an error message
<tsimpson> it will prefix "Error: " to whatever message you pass to it
<tsimpson> if we get past that part of the code, then we know three things
<tsimpson> 1) we know the bot was addressed in some way
<tsimpson> 2) we know the command is "say"
<tsimpson> 3) we know we have the message to repeat
<tsimpson> the only thing left to do, is actually repeat the message!
<tsimpson> this is the code:
<tsimpson> irc.reply(message)
<tsimpson> that's it, the 'reply' method does exactly what you think it does, replies to the message we got
<tsimpson> now our plugin is ready to be used, it should look something like this: http://people.ubuntu.com/~tsimpson/botdev/plugin.2.py
<tsimpson> that's around 12 lines of python we've added, and it does exactly what we want :)
<tsimpson> to tell you bot to load that plugin, you issue the command "@load Say" in the channel it's in, or in a /msg
<tsimpson> you should see a "The operation succeeded." message from the bot
<tsimpson> if you get an error message, you probably have some typo in the code
<tsimpson> now you can test the plugin out
<tsimpson> I'll have nubotu join here to show you how it should work
<tsimpson> nubotu is my general testing/development bot
<tsimpson> @load Say
<nubotu> tsimpson: The operation succeeded.
<tsimpson> @say Hello, World!
<nubotu> tsimpson: Hello, World!
<tsimpson> the bot won't respond to this message, callbacks.addressed() will return an empty string
<tsimpson> @the bot won't respond to this either, as "the" is not the "say" command we want
<tsimpson> nubotu: and it won't respond here, as "and" isn't the "say" command either
<tsimpson> this will cause nubotu to respond with an error, as I'm leaving out the message
<tsimpson> @say
<nubotu> tsimpson: Error: I need something to say
<tsimpson> nifty ey?
<tsimpson> now, even though that's only around 12 lines of code
<tsimpson> it's still an awful lot of code for a simple repeater command
<tsimpson> fortunately supybot can help us some more here
<tsimpson> in the above example, we didn't really create a command
<tsimpson> at least not in the sense supybot cares about
<tsimpson> remember we did "@config supybot.reply.whenNotCommand False"?
<tsimpson> if we set that back to True, you'll see what I mean
<tsimpson> @config supybot.reply.whenNotCommand True
<nubotu> tsimpson: The operation succeeded.
<tsimpson> @say
<nubotu> tsimpson: Error: "say" is not a valid command.
<nubotu> tsimpson: Error: I need something to say
<tsimpson> @say Hello, World!
<nubotu> tsimpson: Error: The "Say" plugin is loaded, but there is no command named "Hello," in it.  Try "list Say" to see the commands in the "Say" plugin.
<nubotu> tsimpson: Hello, World!
<tsimpson> that's not so good :(
<tsimpson> in supybot, we create command by defining a method of the same name, and then "wrapping" it
<tsimpson> I'll talk more about wrap in a second
<tsimpson> so now go ahead and delete the entire "doPrivmsg" method from your plugin.py
<tsimpson> the whole thing
<tsimpson> we don't need it
<tsimpson> and replace it with this:
<tsimpson> def say(self, irc, msg, args, message):
<tsimpson>     """<message>
<tsimpson>     Repeats <message>
<tsimpson>     """
<tsimpson>     irc.reply(message)
<tsimpson> and that's our 'say' command
<tsimpson> the doc-string describes how to use the command, we take only one argument '<message>', so that goes on the first line
<tsimpson> then we have a blank line, followed by a description of the command.
<tsimpson> this will be shown when we do @help say
<tsimpson> the irc and msg parameters are pretty much the same as in our previous doPrivmsg method
<tsimpson> except that 'irc' will usually be a supybot.callbacks.NestedCommandsIrcProxy, that' not something you really need to care about though
<tsimpson> you don't need to worry about the 'args' parameter for now, it's for more advanced commands
<tsimpson> the 'message' parameter is what is going to hold the message we are supposed to say, we don't need to do anything special like with doPrivmsg
<tsimpson> when our command method is called, we *will* have a message to repeat, 'wrap' will make sure for us
<tsimpson> next we need to tell supybot that that method is a command, we do this using the 'wrap' function, which is imported from supybot.commands
<tsimpson> put this under you method:
<tsimpson> at the same indentation as "def"
<tsimpson> say = wrap(say, ['text'])
<tsimpson> the 'wrap' function takes a method, and then a list of so-called "converters"
<tsimpson> in this case, we only want some text, we don't care what it is as long as it's there
<tsimpson> by the way, if you are creating a command that doesn't take any parameters, you can use wrap as a method decorator by putting '@wrap' before the definition
<tsimpson> but you'll usually want to have some parameters for your commands
<tsimpson> now your plugin.py should look like this: http://people.ubuntu.com/~tsimpson/botdev/plugin.3.py
<tsimpson> without all the comments and doc-strings, it's just 3 lines. nice :)
<tsimpson> let's reload the plugin so the changes take effect
<tsimpson> @reload Say
<nubotu> tsimpson: The operation succeeded.
<tsimpson> now we test
<tsimpson> @help say
<nubotu> tsimpson: (say <message>) -- Repeats <message>
<tsimpson> @say Hello, World!
<nubotu> tsimpson: Hello, World!
<tsimpson> @say
<nubotu> tsimpson: (say <message>) -- Repeats <message>
<tsimpson> nubotu: say hello to all the people
<nubotu> tsimpson: hello to all the people
<tsimpson> it works!
<tsimpson> by the way, if you do '@config supybot.reply.withNickPrefix False', it won't prefix your nick to the response
<tsimpson> @config supybot.reply.withNickPrefix False
<nubotu> tsimpson: The operation succeeded.
<tsimpson> nubotu: say hello to all the nice people
<nubotu> hello to all the nice people
<tsimpson> and that's the _basics_ of building plugins for supybot
<tsimpson> things can get a lot more complicated very quickly, have a look at our plugins at: http://bazaar.launchpad.net/~ubuntu-bots/ubuntu-bots/devel/files
<tsimpson> that's basically ubottu right there
<tsimpson> there's also some useful documentation for using supybot at http://supybook.fealdia.org/latest/ and http://ubottu.com/supydocs/
<tsimpson> and the documentation that comes with supybot in /usr/share/doc/supybot/, especially the USING_WRAP.gz document
<tsimpson> oh, and come join us in #ubuntu-bots-devel if you want to help make ubottu even better :)
<tsimpson> I'll answer any questions you may have now
<tsimpson> (but please don't expect me to know the details of other IRC bot programs, I'll do my best though ;)
<tsimpson> nubotu: part
<tsimpson> hey, I just zoomed through the IRC protocol and bot plugin development in 47 minutes
<tsimpson> no one has questions?
<ClassBot> There are 10 minutes remaining in the current session.
<ClassBot> Mkaysi asked: Doesn't Supybot require pysqlite ?
<tsimpson> no
<tsimpson> not the basic supybot
<tsimpson> but as the plugins are just python modules
<tsimpson> they can, and do, have their own dependencies
<tsimpson> Encyclopedia (the factoid plugin for ubottu), does use it, for example
<tsimpson> we plan to change that though :)
<tsimpson> I should probably end by saying that supybot isn't the only IRC bot out there
<tsimpson> there are many others
<tsimpson> in different languages
<tsimpson> and with different capabilities
<ClassBot> There are 5 minutes remaining in the current session.
<tsimpson> we use supybot mostly because it's the easiest to develop in, as Ubuntu comes with python anyway
<tsimpson> but other bots can be, and are, just as good or better for you
<ClassBot> Mkaysi asked: What things I should tell supybot to forget from Encyclopedia? In example op ops calltheops owner.
<tsimpson> there is detailed use info on the bot wiki
<tsimpson> http://ubottu.com/devel/wiki
<tsimpson> and we can help in #ubuntu-bots too
<ClassBot> chadadavis asked: Can a I configure a plugin to load on start (myplugin.conf)?
<tsimpson> by default supybot loads all the plugins that were running when the bot shut down
<tsimpson> so unless you @unload a plugin, it will auto-load
<tsimpson> if you have any more question, the bots team hangs out in #ubuntu-bots and #ubuntu-bots-devel
<tsimpson> we'll help you there :)
<tsimpson> thanks for listening, and I hope you'll all come help us make ubottu rock! :D
* ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - https://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Questions in #ubuntu-classroom-chat || Event: Ubuntu Developer Week - Current Session: Rocking out with libunity - Instructors: kamstrup
<ClassBot> Logs for this session will be available at http://irclogs.ubuntu.com/2011/03/02/%23ubuntu-classroom.html following the conclusion of the session.
<kamstrup> Hi all, so I guess I'm next one up...
<kamstrup> And thanks to Terence Simpson for the cool talk
<kamstrup> I am Mikkel Kamstrup Erlandsen
<kamstrup> and I work on the DX team for Canonical
<kamstrup> I am working on the backend side of all things unity
<kamstrup> My work is primarily around the "places"
<kamstrup> and in my spare time I hack on Zeitgeist
<kamstrup> so its all searching and backend code for me :-)
<kamstrup> So for today
<kamstrup> It's about libunity
<kamstrup> Here's what I plan to go over:
<kamstrup>  - libunity background
<kamstrup>  - libunity feature set
<kamstrup>  - the unity launcher integration
<kamstrup>  - the unity places integration
<kamstrup>  - some working examples of ^^
<kamstrup>  - and finally a bit about what you can expect for the future of libunity
<kamstrup> Hopefully this should empower you all to go out and rock the world with awesome unity integration
<kamstrup> So first item on the agenda: About libunity
<kamstrup> It's a native library  written in Vala
<kamstrup> We use Vala to generate GObject Introspection files so we can have automagic bings for Python and friends
<kamstrup> It's important to underline that libunity is strictly a client side library
<kamstrup> that is
<kamstrup> Unity itself does *not* link to it
<kamstrup> We focus on making the API simple and fun
<kamstrup> So we've chosen to very "property based"
<kamstrup> so you get access to a bunch of object on which you set properties
<kamstrup> and that is automatically reflect on unity
<kamstrup> all of the communication it does is pretty much DBus
<kamstrup> and it leverages libdbusmenu and libdee
<kamstrup> to perform some of the more complex dbus-stuff
<kamstrup> Now let's move on to talk about the feature set of libunity
<kamstrup> Right now there are 2 main things supportedd
<kamstrup>  - the launcher inetgration
<kamstrup>    - with progress, counter, emblems, and quicklist attached to application tiles in the launcher
<kamstrup>  - and then place inetgration
<kamstrup>     - which allows you to hook into the place framework and write you own places
<kamstrup> Maybe some of you already saw the wiki page about the launccher API: https://wiki.ubuntu.com/Unity/LauncherAPI
<kamstrup> let's slowly step through it
<kamstrup> looking at the first screenshot
<kamstrup> you'll see the progress bar and counter in action
<kamstrup> and the screenie below is a quicklist
<kamstrup> So if you scroll down to the Vala example
<kamstrup> you can see it's all property based
<kamstrup> all of the attributes has a _visible cousin
<kamstrup> like emblem_visible
<kamstrup> these allow you to keep the state of you variables around
<kamstrup> by just hiding the overlay
<kamstrup> there is one thing worth mentioning here
<kamstrup> it is that the quicklists are not 100% wired up on the unity side yet
<kamstrup> there are 2 ways to write quicklists
<kamstrup> "static quicklists" are there even when your app is not running
<kamstrup> these are defined inside the .desktop files for the apps
<kamstrup> then there are "dyanmic quicklists"
<kamstrup> dynamic
<kamstrup> these are created at runtime by your app
<kamstrup> and can be very funky
<kamstrup> they use the Dbusmenu API which some of you may already know from the indicators
<kamstrup> it's a powerful api that let's you create arbitrarily complex menus
<kamstrup> if you want to compile the vala example you'll need the very latest libunity from the archives
<kamstrup> that would be 3.4.6 i believe
<kamstrup> if you run the example as is, you'll need to start evolution before you run the example
<kamstrup> if you want to use the python example
<kamstrup> make sure you have the packages:
<kamstrup> gir1.2-unity-3.0
<kamstrup> gir1.2-dee-0.5
<kamstrup> so i hope you don't have trouble running that if you try
<kamstrup> don't hesitate to ask if you have trouble
<kamstrup> chances are that 50% of the other people here have the same problem
<kamstrup> Ok, that was hopefully pretty light
<kamstrup> The next thing we'll look at is the places
<kamstrup> as you may expect that's more complex
<kamstrup> There is a wiki page which gives a rought overview of the places architecture: https://wiki.ubuntu.com/Unity/Places
<kamstrup> it probably can't stand for itself though
<kamstrup> The first thing unity will look for when integrating with a place is a ".place file"
<kamstrup> The .place files define the basic access point for your place
<kamstrup> It's a standard .ini or .desktop format what ever we call it
<kamstrup> [Place]
<kamstrup> DBusName=Well known bus name the place can be found under
<kamstrup> DBusObjectPath=DBus object path the place object lives at
<kamstrup> This is the main section
<kamstrup> defining the dbus name and dbus object path your place can be found on
<kamstrup> doing it like this allows you to have more than one place inside the same process
<kamstrup> although noone is doing that right now
<kamstrup> A "place" consist of a set of "place entries"
<kamstrup> A place in itself has no icon in the launcher - it's just a container for place entries
<kamstrup> For each Place Entry you implement there will be one icon in the launcher
<kamstrup> (or you can hide it if you want)
<kamstrup> So in the .place files you specify each of the place entries you expose
<kamstrup> It can look like:
<kamstrup> [Entry:Stuff]
<kamstrup> DBusObjectPath=DBus path for the place entry (must be a direct child of Places' DBusPath)
<kamstrup> Icon=Icon for the place entry
<kamstrup> Name=Display name for the entry
<kamstrup> Description=Short description of what the entry provides. Suitable for display as tooltip or other
<kamstrup> ShowGlobal=True|False (defaults to True)
<kamstrup> ShowEntry=True|False (defaults to True)
<kamstrup> In theory Unity could just as well look all this up over DBus once it has your address from the main [Place] group in the .place file
<kamstrup> but
<kamstrup> having it in the .place file allows unity to put icons on screen even before you place has started up
<kamstrup> so this is good for startup time
<kamstrup> So going over the [Entry:Stuff]
<kamstrup> There is another dbus path for the place entry itself
<kamstrup> And you can assign an icon, name, and description
<kamstrup> ShowGlobal tells unity whether or not this entry has search result to show in the Dash
<kamstrup> Dash - aka the homescreen
<kamstrup> you get when you click the ubuntu button in the top left corner
<kamstrup> so setting ShowGlobal=False will make unity not call you when it needs to update the results for the Dash
<kamstrup> Likewise the SHowEntry
<kamstrup> it determines whether you have a tile in the Launcher on the right
<kamstrup> You can check out your  current .place files in /usr/share/unity/places
<kamstrup> You'll also notice a "Shortcut" entry in the .place files you have
<kamstrup> It defines the letter you need to press in combo with <super> to bring up the dash showing your particular place
<kamstrup> And you'll also notice
<kamstrup> that since the groups in the .place file are formatted like [Entry:NameOfEntry]
<kamstrup> You can define more than one entry per .place file
<kamstrup> so far so good - given a .place file unity can now find you
<kamstrup> so before we proceed I need to talk to you about how unity shares datamodels with the place daemons
<kamstrup> There is a central library called Dee (or libdee if you will)
<kamstrup> Dee implements a set of datamodels you can share across dbus
<kamstrup> And they are like peer-2-peer models
<kamstrup> So both unity and the place daemon can modify the models
<kamstrup> although in practice it's mostly just the place daemons
<kamstrup> This makes implement searching and all that very convenient
<kamstrup> So when you search (fx. with Zzeitgeist) you don't have to collect a result set an send it to unity
<kamstrup> you simply update your model
<kamstrup> this gives a neat way to implement "incremental searches" if you want
<kamstrup> meaning - iteratively removing hits from the result set as the user types
<kamstrup> so we don't have to send the entire result set over and over
<kamstrup> you just update your model removing the rows that no longer match
<kamstrup> under the hood Dee basically sends a "diff" to all the peers sharing the model
<kamstrup> So Dee is very powerful
<kamstrup> If we go back to the wiki page...
<kamstrup> https://wiki.ubuntu.com/Unity/Places
<kamstrup> We need to establish the "terminology" on the top of the page
<kamstrup> There are three words you need to know the meaning of:
<kamstrup>  - result model
<kamstrup>  - groups model
<kamstrup>  - sections model
<kamstrup> It's probably easiest if we take the Apps place as an example
<kamstrup> The "result model" here is (surprise!) what you see when you search
<kamstrup> The "groups model" defines the user visible grouping of the result model
<kamstrup> If you open the apps place
<kamstrup> (super-a)
<kamstrup> You'll see two groups there
<kamstrup> or wait - maybe you don't just yet
<kamstrup> ... sorry
<kamstrup> But there are 3 groups - let me write them for you
<kamstrup> Installed
<kamstrup> Available for Install
<kamstrup> and Most Popular Apps
<kamstrup> These partition the result set in 3
<kamstrup> So on to the "sections"
<kamstrup> Sections in the apps place are like "Accesories", "Media", "System", ...
<kamstrup> Ie they partition not the result set, but more the "browsable space"
<kamstrup> or the entire set of items you can potentially find
<kamstrup> I think it'll be most easy for all if I spring my surprise now
<kamstrup> So the surprise is that just today I have a fully working stack supporting place daemon implementations in Python!
<kamstrup> This makes playing around with this stuff so much easier
<kamstrup> So let me point you to a fully working place implemented in Python
<kamstrup> Here: http://bazaar.launchpad.net/~unity-team/unity-place-sample/unity-place-python/files
<kamstrup> So let's dig into unity-place-pythhon.py
<kamstrup> Let's start at line 28 http://bazaar.launchpad.net/~unity-team/unity-place-sample/unity-place-python/view/head:/unity-place-python.py#L28
<kamstrup> Here we create the Place Entry i talked about
<kamstrup> we give it some random dbus path
<kamstrup> The models we create are all DeeSharedModels
<kamstrup> On each of the models we need to call set_schema()
<kamstrup> The schema *must* be like this
<kamstrup> you can see the definitions on https://wiki.ubuntu.com/Unity/Places#Results%20Model
<kamstrup> The "model schemas" is really just a list of GVariant or DBus signatures
<kamstrup> one signature for each column you want to have in the model
<kamstrup> and you can even shove arbitrarily complex variants in the schema
<kamstrup> it works
<kamstrup> but for unity places we only use simple types such as strings "s" and uints "u"
<kamstrup> On line 42
<kamstrup> I create the sections model
<kamstrup> i give it a bus name
<kamstrup> which the model will use to rendevouz with other models with the same name
<kamstrup> and sync up with them
<kamstrup> and on line 44 i tell the place entry that i want to use this model as my sections
<kamstrup> ditto for all the other models created in there
<kamstrup> notice the models with a _global in the variable names
<kamstrup> these models will be used for searches via the Dash
<kamstrup> while those without global_ will be used when you search dedicated within this particular place
<kamstrup> Let's skip a bit forward an look at line 73: http://bazaar.launchpad.net/~unity-team/unity-place-sample/unity-place-python/view/head:/unity-place-python.py#L73
<kamstrup> here I connect to a bog standard Gobject signal from the place entry
<kamstrup> The notify signal when the "active-search" property changes
<kamstrup> On line 127 http://bazaar.launchpad.net/~unity-team/unity-place-sample/unity-place-python/view/head:/unity-place-python.py#L127
<kamstrup> you'll see the callback i connect to this signal
<kamstrup> Here i simply figure out what the new search string is and I start updating the model
<kamstrup> the results model that is
<kamstrup> To keep this example simple i always just call model.clear()
<kamstrup> the "real" places - files and apps - don't do this, but they iteratively narrow down the results_model as you type
<kamstrup> but that's quite a lot more complex and it works very well without it
<kamstrup> So what does this particular place do..?
<ClassBot> There are 10 minutes remaining in the current session.
<kamstrup> It simply just splits the search string into letters and adds a hit for each letter pointing to the wikipedia article for that letter
<kamstrup> You can see it splits the results into different groups
<kamstrup> ok, I need to start wrapping up
<kamstrup> One important note:
<kamstrup> If you want to run the Python example you need a small hack for now
<kamstrup> because all the latest jazz isn't in the package archives just yet
<kamstrup> The hack you need is to take this file: http://bazaar.launchpad.net/~unity-team/dee/trunk/view/head:/bindings/python/Dee.py
<kamstrup> and then:
<kamstrup> download it somewhere and copy it to the right location like so:
<kamstrup> sudo cp Dee.py /usr/lib/pymodules/python2.7/gi/overrides/Dee.py
<kamstrup> This is needed to make Dee play well with Python
<kamstrup> With that in place you should follow the guidelines in http://bazaar.launchpad.net/~unity-team/unity-place-sample/unity-place-python/view/head:/README
<kamstrup> We probably don't have a lot of time to debug any problems now, but if you poke at it  and find problems don't hesitate to ping me on the #ayatana channel
<kamstrup> While I'm throwing links around - the most basic Vala example is lp:unity-place-sample
<kamstrup> but you can dig in and find an example a tad more complex - doing youtube searches
<ClassBot> There are 5 minutes remaining in the current session.
<kamstrup> You can see the list of example places here https://code.launchpad.net/unity-place-sample
<kamstrup> I'll try and put all illustrative examples there
<kamstrup> when new ones crop up
<kamstrup> So quickly on the future of libunity:
<kamstrup>  - We'll have API docs for C, Python, and Vala up very soon
<kamstrup>  - Dee already have good docs for C in the libdee-doc package . but we'll have Vala and Python docs for it too
<kamstrup>  - the longer term goal for libunity is to be able to integrate and instrument the entire Unity shell from top to bottom
<kamstrup> So launcher and places is just the prelimanry goodies we can deliver for Natty
<kamstrup> For N+1 you see some nice APIs to work with the various indicators and menus
<kamstrup> And lastly - a disclaimer
<kamstrup> Sorry to end with that
<kamstrup> But we can't guarantee API or ABI stability at this point
<kamstrup> we hope there will be no landslide changes
<kamstrup> but small changes will trickle in
<kamstrup> but we we'll provide stability at some point
<kamstrup> Maybe N+1 or +2
<kamstrup> and that's a wrap!
<kamstrup> Any questions can go in #ayatana
<ClassBot> Logs for this session will be available at http://irclogs.ubuntu.com/2011/03/02/%23ubuntu-classroom.html
* ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - https://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Questions in #ubuntu-classroom-chat ||
#ubuntu-classroom 2011-03-03
<changed_nick> when is next lecture going to start and what will be the topic?
<chandan_kumar> changed_nick, https://wiki.ubuntu.com/UbuntuDeveloperWeek
<chandan_kumar> changed_nick, go to that url ,you will got all the details regarding the classs....
<changed_nick> chandan_kumar: thank you :)
<chandan_kumar> changed_nick, yours welcome.
<raki_> what is the time for developer week today?
<Mkaysi> raki_: http://is.gd/8rtIi
<raki_> thank you!!
<raki_> are there any logs forthe previous days
<Mkaysi> Maybe https://wiki.ubuntu.com/Classroom has link.
<Mkaysi> There should be logs.
<Mkaysi> raki_: https://wiki.ubuntu.com/Classroom#Logs/Transcripts
<Pendulum> wiki.ubuntu.com/UbuntuDeveloperWeek has links to logs (just yesterday's are in progress but will be up in about 5 minutes as long as the wiki cooperates with me)
<Pendulum> all the logs from Developer Week so far are now up at https://wiki.ubuntu.com/UbuntuDeveloperWeek/
<Fvic> please guide me how to use this channel?someone told me this is best place to learn about linux...
<Mkaysi> Fvic: https://wiki.ubuntu.com/Classroom
<techbreak> which session today ?
<dholbach> HELLO MY FRIENDS! WELCOME TO DAY 4 of UBUNTU DEVELOPER WEEK!
<dholbach> if you need any information at all (which sessions, etc.) head to: https://wiki.ubuntu.com/UbuntuDeveloperWeek
<dholbach> also... if you haven't joined #ubuntu-classroom-chat yet, you might want to do that now
<dholbach> because that's where we chat and ask questions
<dholbach> if you have questions, please ask - we want our sessions to be as interactive as possible
<dholbach> if you do ask, please make sure you prefix your question with QUESTION:
<dholbach> ie: QUESTION: Which language should become default language of Ubuntu?
<dholbach> The first session of the day is lead by an awesome guy, a friend and colleague of mine, who probably has an opinionated answer to the last question
<dholbach> it's David Planella, Mr. dpm
<dholbach> who is going to talk about hooking up your application with Launchpad Translations
<dholbach> dpm, you still have a few minutes until you get started :)
<dholbach> have a great day 4 every one - enjoy the sessions!
<dpm> Thanks dholbach, I've got the right answer to that question, but we'll leave it for another full session :)
<dholbach> of course you do :)
<dholbach> enjoy!
<dpm> ;)
* ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - https://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Questions in #ubuntu-classroom-chat || Event: Ubuntu Developer Week - Current Session: Integrating your package with Launchpad Translations - Instructors: dpm
<dpm> Let's wait a couple of minutes for everyone to join in, and then we can get started
<ClassBot> Logs for this session will be available at http://irclogs.ubuntu.com/2011/03/03/%23ubuntu-classroom.html following the conclusion of the session.
<dpm> Ok, let's get started...
<dpm> Hi all
<dpm> Welcome to this Ubuntu Developer Week talk on integrating your package with Launchpad Translations
<dpm> I'm David Planella, from the Community team at Canonical, and my job as the Ubuntu Translations Coordinator is to make sure, with the help of our awesome translations community, that Ubuntu rocks equally hard in every language.
<dpm> Today I'd like to get a bit more technical and explain how you can make sure your package is well integrated with the Launchpad Translations web app,
<dpm> so that Ubuntu translators can happily do their work and provide a well localized OS to our users.
<dpm> Just to give you a brief summary, here's how it will go:
<dpm> We'll first start with a couple of background subjects, then we'll go more into the details related to packaging and finally we'll wrap it up with a Q+A session
<dpm> If you have questions during the session though, feel free to interrupt and ask me on #ubuntu-classroom-chat
<dpm> So, without further ado...
<dpm> Let's roll
<dpm> Integrating Your Package with Launchpad Translations
<dpm> ====================================================
<dpm> So, as mentioned in the intro, the idea of this talk is to give you an overview of what is needed in your package to play well with Launchpad and for their translations to be exposed to translators there.
<dpm> Note that this only essentially applies to packages in the main and restricted repositories (and additionally for the -security, -proposed and -updates pockets).
<dpm> Only their translations will be imported into Launchpad and delivered in language packs (more on this in a few minutes).
<dpm> Packages in universe, multiverse, etc. will not be translatable in Launchpad, and translations will be shipped with the packages and have no direct interaction with Launchpad or the language pack infrastructure.
<dpm> i.e. they will be shipped as they come from upstream
<dpm> First of all, I'll start with a bit of background for those of you not yet too all familiar with translations
<dpm> Launchpad Translations
<dpm> ----------------------
<dpm> As you might know, in Ubuntu we use our very own translations tool: Launchpad Translations
<dpm> Launchpad Translations allows distributed translation of our Operating System, by a large number of volunteer contributors, who work hard to ensure Ubuntu is well localized for everyone to use it in their own language.
<dpm> You can see the Ubuntu translations here: https://translations.launchpad.net/ubuntu
<dpm> (you can choose a distro series there, e.g. Natty to see the stats)
<dpm> There you'll see a list of translatable applications and documentation, ordered by priority
<dpm> Ubuntu is currently translated in more than 200 languages, with different levels of coverage, and can easily support more.
<dpm> You can see the languages supported of in the last stable version of Ubuntu here:
<dpm> http://people.ubuntu.com/~dpm/ubuntu-10.10-translation-stats.html
<dpm> Many of those translations are done by upstream translation communities, and they also get imported into Launchpad during package uploads
<dpm> The Ubuntu Translations Community
<dpm> ---------------------------------
<dpm> I won't dwell too much on this subject, as I think as a packager you might be more focused on the technical side of things.
<dpm> Nevertheless, I'd like to add a few words about the Ubuntu Translations community, since I think, be it for the subject of this talk, or be it because we are all part of the bigger Ubuntu family, it is important for those working directly or indirectly with translations to know more about it.
<dpm> Ubuntu Translators are a vast number of volunteers who organise themselves in translation teams, appointed to be responsible for the translation of a given language.
<dpm> And they just rock.
<dpm> You can see the full list of Ubuntu translation teams here:
<dpm> https://translations.launchpad.net/+groups/ubuntu-translators
<dpm> With your translation uploads you'll be enabling them to deliver Ubuntu in hundreds of languages, to many, many people
<dpm> So time to feel proud now :)
<dpm> Language Packs
<dpm> --------------
<dpm> btw, I guess there were no questions so far, if there is anything that was not clear, feel free to ask
<dpm> In Ubuntu we ship all translations in dedicated .deb packages called language packs
<dpm> Packages in main and restricted don't contain translations in the form of .mo files themselves
<dpm> (if you are not familiar with them, .mo files are a type of binary files where translations are loaded from at runtime. The source for translations are textual .po files that get compiled into the final .mo files)
<dpm> They are stripped during the build on the Launchpad buildds and put into the language-pack-* packages instead.
<dpm> There is a set of language packs per language
<dpm> They are divided roughly between generic translations and those which are used in a GNOME-based desktop and those used in a KDE-based desktop
<dpm> We essentially make use of language packs to deliver translations independently from applications and thus we're able to ship regular translation updates throughout a distro series lifecycle.
<dpm> Translations Import Workflow
<dpm> ----------------------------
<dpm> On a 1000 feet view, what happens when you do a package upload is that their translations get stripped by a tool called pkgbinarymangler, and they are put in a translations tarball containing a translations template (more on this later on) and the translations themselves.
<dpm> This tarball is then fed to Soyuz, which ends up handing it to the translations imports queue. There, they will be eventually processed, approved and imported into Launchpad, at which point they will be exposed in the translations web interface ready for translators to do their job.
<dpm> If you are interested in seeing what the imports queue looks like, you can see the translation uploads currently pending review here:
<dpm> https://translations.launchpad.net/ubuntu/natty/+imports?field.filter_extension=pot&field.filter_status=NEEDS_REVIEW&start=75&batch=75
<dpm> That's the global imports queue, but you can see it per package as well
<dpm> https://translations.launchpad.net/ubuntu/natty/+source/gtkhtml3.14/+imports
<dpm> There's an example ^
<dpm> So now we come to the nitty gritty details... :)
<dpm> let's try to answer some of the questions first...
<ClassBot> monish001 asked: Are we taking here about the time of package installation - "stripped during the build on the Launchpad buildds and put into the language-pack-* packages instead."
<dpm> No, the translations are stripped during the package build. By the time the package is installed, translations are no longer in the package
<dpm> They will be in the language packs instead
<ClassBot> chadadavis asked: when translations from different packages are merged into a language pack, how do you check that expressions like "File not found" are translated consistently between applications?
<dpm> That's something that as a packager you cannot ensure, so you'll be relying on translators to work consistently
<dpm> Launchpad also helps on that, giving global suggestions for translations which have the same original message in other projects
<dpm> What I'm trying to say is that this is something translators are used to deal with
<dpm> and translation consistency is part of their work
<dpm> ok, let's move on then
<dpm> Package Modifications for a better Ubuntu integration
<dpm> -----------------------------------------------------
<dpm> In order for translations to be imported to Launchpad and in order to direct translators to the translations page to start contributing straight away,
<dpm> we make two main changes to the application at the packaging level:
<dpm> * Creation of a POT file on build - We require the .deb package to produce a .pot translation template during the build, which will be imported into Launchpad and be used to expose translations for translators to do their work.
<dpm> * Addition of the Launchpad integration library - We add some functionality to display some additional entries to the Help menu, to direct contributors to Launchpad to report bugs, submit translations and get help.
<dpm> For those not familiar with the concept of a POT template:
<dpm> It's a textual file with the .pot extension
<dpm> and it's what Launchpad use as the source for exposing translations
<dpm> all translations in all languages will be based on that template, which contains the translatable messages in English
<dpm> It's generally built by gettext-based tools
<dpm> which extract translatable messages from the code in an application
<dpm> and put them in the textual .pot file
<dpm> Generating POT templates
<dpm> ~~~~~~~~~~~~~~~~~~~~~~~~
<dpm> For pkgstriptranslations (in the pkgbinarymangler package) to do the job right and translations to be imported into Launchpad,
<dpm> you should make sure that your package in main or restricted generates a POT translation template during the build.
<dpm> It does not necessarily need to be shipped in the source or in the binary package.
<dpm> Generating it during the build is good enough.
<dpm> -> Note that if your package does not generate a POT template on build, its translations will remain as Blocked in the Launchpad Translations import queue and will not be imported
<dpm> So it's important to get this right
<dpm> The most common approaches are running either of the following in the debian/rules file:
<dpm> * For packages using CDBS and automake:
<dpm>   * You just need to include /usr/share/cdbs/1/rules/langpack.mk in debian/rules
<dpm>   * If the package is a GNOME one, and you are using the gnome.mk CDBS class already, you should be good to go, since it already includes langpack.mk
<dpm>   * If for some reason the POT template cannot be generated during the build, see the next points below.
<dpm> * Other packages, using intltool usually require:
<dpm>   * A call to intltool-update -p in debian/rules, or
<dpm>   * a call to an already existing Makefile target to build the POT (this does exist quite often in fact).
<dpm> * For packages which don't use intltool:
<dpm>   * Need to get fixed individually:
<dpm>   * Usually by adding a call to xgettext and po/POTFILES.in, or
<dpm>   * Finding an already existing Makefile target. e.g. Use $(MAKE) -C po update-po instead of (cd po; make update-po; cd ..). Example in the debian/rules file from upower:
<dpm>     common-post-build-arch::
<dpm>             make -C po upower.pot
<dpm> * Packages which use python-distutils-extra:
<dpm>   * Template creation should happen automagically :)
<dpm> oh, btw:
<dpm> Gettext is the underlying and most widely used technology to enable translations of Open Source projects.
<dpm> Intltool is a higher level tool that adds functionality to gettext by allowing the extraction of translatable strings from a variety of file formats.
<dpm> Questions so far?
<dpm> Is it clear that Ubuntu packages need to generate a .pot file during the build?
<dpm> ok, next then
<dpm> The Launchpad Integration Library
<dpm> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<dpm> Ubuntu applications use the Launchpad integration library to provide shortcuts to Launchpad to obtain help, report bugs and submit translations.
<dpm> You can see it in action in every application's help menu, and it lives here:
<dpm> https://launchpad.net/launchpad-integration
<dpm> Note that this only works for Ubuntu packages available in the repositories. The Launchpad integration library does not work with PPAs or other projects hosted in Launchpad.
<dpm> It has bindings for several languages. An example in Python:
<dpm>         import LaunchpadIntegration
<dpm>         LaunchpadIntegration.set_sourcepackagename('my_app')
<dpm>         LaunchpadIntegration.add_items(self.builder.get_object('menu_help'), 0, False, True)
<dpm> Unless the packaged application itself makes use of it already, you should add it as a patch.
<dpm> If you want to see a couple of examples, these bugs will help you learning how you can add support for the Launchpad Integration Library to your package:
<dpm> https://bugs.launchpad.net/bugs/436742
<dpm> https://bugs.launchpad.net/bugs/508395
<dpm> Verifying Packages
<dpm> ------------------
<dpm> Finally, here is a small recipe and some guidelines to help you test and optimize your packages, so that translation-related files get automatically imported seamlessly into Launchpad.
<dpm> Generally, you will only need to do this once when setting up your package the first time, altough it can also be useful to debug import problems, for example
<dpm> Testing the package locally
<dpm> ~~~~~~~~~~~~~~~~~~~~~~~~~~~
<dpm> To test if your package conforms to the requirements of the import script in the Launchpad imports queue, you can do the following:
<dpm> oops short disconnection :)
<dpm> anyway, let's continue...
<dpm> * Template name and domain: the filename of the template (.pot file) should be the same as what the expected translation domain is.
<dpm> * Translation filenames: the actual translations (.po files) must have a filename of the format $LANGUAGECODE.po or $LOCALECODE.po (e.g. de.po, pt_BR.po, zh_TW.po)
<ClassBot> There are 10 minutes remaining in the current session.
<dpm> * Template and translations location: all translation-related files (the .pot template and its corresponding .po templates) must end up in the same (sub-)directory if possible.
<dpm> * Obsolete translations: if there are .po files present in the package but no associated .pot template, please remove them, since they cannot be used without a .pot template.
<dpm> * Valid POT template: please check if the .pot file has any meaningful content. Empty .pot files should best be removed and the package build rules be fixed.
<dpm> * Templates generated by patches: if your package contains patches and those patches result into extra templates, like patches.pot, please merge those changes into the main template
<dpm> Anyway, that was it for the session content,
<dpm> I hope you found it useful
<dpm> If you've got any questions related to the session or to translations in general, now feel free to ask! :-)
<dpm> Q+A
<dpm> ---
<ClassBot> chadadavis asked: does the Launchpad integration provide any services for PPA packages? Since it's not officially supported/working on those?
<dpm> As far as I know, it works only if there is a package available in the Ubuntu repositories, but I haven't tried it with PPAs
<dpm> Any more questions?
<ClassBot> There are 5 minutes remaining in the current session.
<dpm> ok then, if there are no more questions we'll wrap up early
<dpm> Thank you very much for your attention, I hope you enjoyed it and I hope to see you soon!
<dpm> I'll now leave you in the able hands of Kaleo, who'll tell you all about Getting Started with Unity 2D!!
<dpm> Enjoy!
<dpm> it seems Kaleo is not here yet, and I see there is a question, so I'll try to answer that one in the meantime
<ClassBot> monish001 asked: What if i want the enduser to choose the language?
* ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - https://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Questions in #ubuntu-classroom-chat || Event: Ubuntu Developer Week - Current Session: Getting Started with Unity 2D - Instructors: Kaleo
<ClassBot> Logs for this session will be available at http://irclogs.ubuntu.com/2011/03/03/%23ubuntu-classroom.html following the conclusion of the session.
<dholbach> Kaleo has been caught up in something else important. I'll keep you posted. Hold tight.
<dholbach> thanks a lot Kaleo
<dholbach> with just 5 minutes delay, I give you Florian "Kaleo" Boucault, one of the masterminds behind Unity 2D
<dholbach> enjoy the session :)
<Kaleo> Thanks people for joining in
<Kaleo> I will give a brief overview of Unity 2D
<Kaleo> And let you guys shoot questions my way
<Kaleo> Unity 2D is essentially an implementation of the Unity user interface using Qt and QML
<Kaleo> it reuses the same backend technologies used in Unity proper
<Kaleo> libbamf, libdee, libunity, places, etc.
<Kaleo> and intends to provide a UI that matches Unity proper as much as possible
<Kaleo> The rationale behind Unity 2D is that we want to run on platforms that do not provide accelerated OpenGL
<Kaleo> QUESTION: < jack002> what are those: libbamf, libdee, libunity, places,
<Kaleo> BAMF provides application matching services: it tells you what applications are running on the desktop and informations about them
<Kaleo> libdee is a way to publish lists of data over D-Bus
<Kaleo> places are the providers of data for the dash (the dash is the thing that comes up when you click on the Ubuntu button in the top left corner)
<Kaleo> For those who want to try out Unity 2D, you can find it in a PPA for Natty
<Kaleo> We also provide a stable version for Maverick in the same PPA but it does not contain the latest features
<Kaleo> < monish001> QUESTION: how to find it in a PPA for Natty?
<Kaleo> https://launchpad.net/~unity-2d-team/+archive/unity-2d-daily
<Kaleo> Unity 2D is the default interface for ARM based Ubuntu isos
<Kaleo> For developers
<Kaleo> and people interested contributing to it
<Kaleo> we have a home on the ubuntu wiki
<Kaleo> https://wiki.ubuntu.com/Unity2D
<Kaleo> In terms of architecture
<Kaleo> Unity 2D is divided into:
<Kaleo> - window management (using metacity)
<Kaleo> - a top panel
<Kaleo> - an application launcher on the left
<Kaleo> - the dash search interface
<Kaleo> - a workspace switcher
<Kaleo> they are all separate applications/processes
<Kaleo> the code (hosted on launchpad with Bazaar) reflects that separation of components
<Kaleo> each having its directory:
<Kaleo> - panel
<Kaleo> - launcher
<Kaleo> - places (= dash)
<Kaleo> - spread (= workspace switcher)
<Kaleo> metacity being mostly upstream with around 3 small patches
<Kaleo> 18:17 < chadadavis> The current natty seems to already have it in the default repositories.
<Kaleo> That's correct
<Kaleo> We pushed a recent version into Natty last week
<Kaleo> but I really recommend the PPA
<Kaleo> which contains critical bug fixes
<Kaleo> 18:19 < abhinav> QUESTION: what languages can we use for development ? and can development be done on Maverick or Natty is absolutely necessary ?
<Kaleo> Unity 2D is written in C++, QML and incidentally Javascript
<Kaleo> C++ is used to create APIs that the user interface written in QML uses
<Kaleo> QML is a declarative language to describe user interfaces; it is part of Qt
<Kaleo> Development is now only done on Natty
<Kaleo> We stopped developing on Maverick 2 weeks ago
<Kaleo> Only backporting essential bug fixes
<Kaleo> 18:20 < rsajdok> QUESTION: Can you describe how to run unity-2d-launcher with gdb and any function?
<Kaleo> If you have Unity 2D installed from the PPA
<Kaleo> and if Unity 2D is running
<Kaleo> you can attach gdb to the unity-2d-launcher process
<Kaleo>  ps aux | grep unity-2d-launcher will give you the PID of it
<Kaleo> sudo gdb -pid PID_OF_LAUNCHER
<Kaleo> will give you the gdb prompt
<Kaleo> rsajdok: does it answer your question?
<Kaleo> < jack002> QUESTION: Is there any plan to implement "windows tiling" like in Windows? I constantly need two programs opened like Firefox and Terminal.  Switching between them is annoying, resizing windows is time consuming...
<Kaleo> There is no plan for windows tiling as far as I know
<Kaleo> Sorry :(
<Kaleo> < monish001> QUESTION: Could we expect projects from unity 2D for GSoC 2011?
<Kaleo> We have not thought about it at all
<Kaleo> It sounds like a great idea
<Kaleo> I would love any help we can get :)
<Kaleo> For people who want to chat about Unity 2D in general
<Kaleo> we hang out on #ayatana on freenode
<Kaleo> with the Unity proper people
<Kaleo> agateau, oSoMoN and uriboni are the people to talk with
<Kaleo> by uriboni I meant nerochiaro!
<Kaleo> Ok, well
<Kaleo> I feel we are running out of questions
<Kaleo> Thank you all for the good questions and your time
<Kaleo> I will stay here longer in case any question comes up
<Kaleo> 18:35 < raki__> i would want to help too how can i start?
<Kaleo> Start by installing it and trying it out
<Kaleo> If you like it
<Kaleo> I suggest you find something you would like to improve
<Kaleo> And start from there
<Kaleo> The wiki page is a great starting point
<Kaleo> https://wiki.ubuntu.com/Unity2D
<Kaleo> < monish001> QUESTION: do we have something called unity 3d also>
<Kaleo> Unity 3D is a nickname for Unity proper, Unity you get by default in Ubuntu Natty
<Kaleo> < Mkaysi> QUESTION: Is Unity2D going to be shopped with Natty, if someone uses computer, which can't run Unity 3D?
<Kaleo> No, it will not be installed by default
<Kaleo> It will not be on the CD
<Kaleo> but it is installable via the packages very easily
<Kaleo> < rsajdok> QUESTION: It started but I can not set backtrace on function launcherapplication::launch()
<Kaleo> for that you will need to run from the source code
<Kaleo> by that I mean
<Kaleo> get the source code as indicated on the wiki page
<Kaleo> compile it
<Kaleo> and then start the launcher from there using gdb:
<Kaleo> bzr branch lp:unity-2d
<Kaleo> cd unity-2d
<Kaleo> cmake . && make
<Kaleo> gdb ./launcher/app/unity-2d-launcher
<Kaleo> should do it
<Kaleo> QUESTION:
<Kaleo> < raki__> suppose if i want to develop something for unity then will i have to learn qml or c++ is enough?
<Kaleo> < raki__> and what are you using javascript for?
<Kaleo> if you are going to touch the user interface at all you will need to understand QML
<Kaleo> Javascript is used inside QML
<Kaleo> but no worries, QML is really as easy as it gets
<Kaleo> the learning curve is not so high if you did UIs before
<Kaleo>  monish001> QUESTION: could you provide any good tutorial for QML to get started?
<Kaleo> the QML documentation is quite good
<Kaleo> and there is an official tutorial
<Kaleo> http://doc.qt.nokia.com/4.7-snapshot/qml-tutorial.html
* ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - https://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Questions in #ubuntu-classroom-chat || Event: Ubuntu Developer Week - Current Session: Q+A with Ubuntu Engineering Director - Instructors: rickspencer3
<rickspencer3> hello all
<rickspencer3> I guess there's no intro or such, just dive in?
<rickspencer3> so, I'm Rick Spencer
<rickspencer3> I'm currently the director of engineering for Ubuntnu Engineering
<rickspencer3> which basically means that I help the teams that create Ubuntu, Ubuntu Server, Ubuntu Arm editions, Ubuntu virtual images, etc...
<rickspencer3> I'm happy to take questions on any and all topics
<rickspencer3> please note that I don't typically have a lot of fine grained technical context on some things, so I may have to refer you to others for certain things
<rickspencer3> I guess I'll just hang out and see if I get any questions?
<ClassBot> mhall119 asked: What do you do as Engineering director?
<rickspencer3> well, the Engineering Managers, and the our release manager and our technical architect all report to me
<rickspencer3> so, there is a lot of my job that is typical people management
<rickspencer3> making sure people have what they need to do their jobs
<rickspencer3> signing off on holiday requests and expense reports, that kind of stuff
<rickspencer3> also, the Engineering Managers (as well as Kate and Allison - release manager and technical architect) and I are all a management team
<rickspencer3> so I have some leadership roles on that team
<rickspencer3> for instance, I try to herd this particular herd of cats through planning UDS
<rickspencer3> another part of the role is around product management
<rickspencer3> this involves a lot of working with folks in the Ubuntu community, upstreams, Canonical, etc... to understand what they need or want to do with Ubuntu
<rickspencer3> and I try to get everyone aligned to make those things happen
<rickspencer3> Director of Engineering sounds like a role with a lot of Authority ... but it's not really that kind of job
<rickspencer3> I do try to use the position to influence the project though in ways that I think are important
<rickspencer3> for instance, in Natty I wanted to see more work to enable community contributions to land easily, so I worked with the community team and engineering managers to make sure that Canonical engineers could do that
<rickspencer3> hmm ClassBot stopped working for me :/
<rickspencer3> I'll go copy and paste method
<rickspencer3> QUESTION: What challenges do you see in recruiting and keeping good people?
<rickspencer3> well, for Ubuntu Engineering, their are a couple of challenges
<rickspencer3> first, people do best when they are comforatable working in a transparent community minded manner
<ClassBot> jsjgruber asked: What challenges do you see in recruiting and keeping good people?
<rickspencer3> hmmm, freenode seems to be acting a bit wonky, please try to bear with me here
<rickspencer3> so, finding engineers and managers who *like* to work on a community project can be difficult at times
<rickspencer3> like, we may find someone who knows a technical space really well, but is not comforatable working in the open
<rickspencer3> another aspect is that Canonical folks who get paid to work on Ubuntu work at home
<rickspencer3> but then that is punctuated with travel
<rickspencer3> personally, I love the lifestyle, but it's not for everyone
<rickspencer3> also, for my part, I am very picky
<rickspencer3> I really look for people who are "awesome" in multiple ways, so it can take longer to fill some roles
<rickspencer3> finally, we work really hard, but have high standards in terms of being easy to work with
<rickspencer3> so that's recruiting
<rickspencer3> in terms of retaining, this has not been so challenging, we don't get too much turn over
<rickspencer3> but when people do leave, they seem to become more like alumni than "ex-Canonical" folks
<rickspencer3> so it seems that in general people depart on good terms
<ClassBot> mhall119 asked: Do you have any specific goals for the Natty Cycle, and if so who are those going so far?
<rickspencer3> hey, classbot is working again!
<rickspencer3> anyway
<rickspencer3> YES!
<rickspencer3> hold on
<rickspencer3> so, there are goals that are project wide, then my personal goals
<rickspencer3> for the project wide goals, there was a lot of focus on the client
<rickspencer3> we had 5 primary areas for Canonical folks to focus on on the client
<rickspencer3> 1. Unity (natch)
<rickspencer3> 2. 2d experience
<rickspencer3> 3. software center
<rickspencer3> 4. contributors (as previously mentioned)
<rickspencer3> 5. testing
<rickspencer3> this last bit is new to us
<rickspencer3> for my perosnal goals, I wanted to see:
<rickspencer3> 1. more nurturing of new contributors
<rickspencer3> 2. more and better communication across the project
<rickspencer3> 3. more systematic release process with better quality
<rickspencer3> I think that #1 has gone pretty well thanks to the community team and the redoubled efforts of Canonical engineers AND Ubuntu engineers
<rickspencer3> for instance, the sponsorship queue hit a low of only 14 items earlier this week
<rickspencer3> #3 has gone well thanks to the efforts fo skaet and many others
<rickspencer3> #2, I'm not to sure we made much progress there, it's a hard problem
<ClassBot> chadadavis asked: Is there are hard line between Canonical employees and others, or does Canonical sponsor / support some developers part time as well?
<rickspencer3> well ...
<rickspencer3> to be a Canonical employee working in Ubuntu essential means that you get paid by Canonical to work in the Ubuntu community full time
<rickspencer3> so, the community of Ubuntu developers is a super set of the developers that Canonical pays
<rickspencer3> however, Canonical does, from time to time, outsource some development work on Ubuntu, but typically for projects for which Canonical is the usptream
<rickspencer3> for example, to finish off parts of Unity
<rickspencer3> normally, but not always, that will go through a company like Codethink, or Collabora
<ClassBot> fisch246 asked: i realize this is really early... but has there been any talk on 11.10 yet? any ideas being passed around? care to share any?
<rickspencer3> it is early, but not really really early
<rickspencer3> allison (wendar) the Technical Architect on our team ... is going to work on getting all the great ideas from users and developers organized 11.10 UDS, and I think she's going to start that soon
<rickspencer3> so at the product level, what will ubuntu *be*, nothing really specific comes to mind
<rickspencer3> however, in terms of the project, I would like to see more nurturing of new contributors, but also
<rickspencer3> revisit if existing core contributors are being sufficiently and properly supported
<rickspencer3> also, the whole project wide communication part, I'd like us to take another whack at that
<rickspencer3> one area that does occur to me for the project is how users actually get Ubuntu
<rickspencer3> I'm wondering if having basically a set of CD ISOs should be the only way to get Ubuntu, or if there should be others
<rickspencer3> like should we have a tool for creating a USB stick
<rickspencer3> or maybe you we could use a net-install kind of thing
<ClassBot> mhall119 asked: Last I heard, Canonical doesn't run a private UEC cloud for their own websites (or community-run sites like loco-directory), why is that and is there any plans to change?
<rickspencer3> Canonical has an IS team that sets up all that infra structure and such
<rickspencer3> I very much trust that they make good decisions about how best to support Ubuntu, so I never really looked into this
<rickspencer3> so, I can't really answer your question
<rickspencer3> if you PM me, I can work to connect you with someone who could though
<ClassBot> gaberlunzie asked: when is Libre.fm going to get some love to make it into Banshee or other?
<rickspencer3> sorry, I have no idea
<rickspencer3> I would follow up with jasonwarned, he hangs out in #ubuntu-desktop
<ClassBot> darkdevil666 asked: Any thought of implementing gnome shell 3 in later versions?
<rickspencer3> sure
<rickspencer3> I look at it in 2 ways
<rickspencer3> first, Ubuntu should always offer the choices of the best in FOSS software
<rickspencer3> so, when we are able, it should be trivial to install a gnome-shell session on Ubuntu
<rickspencer3> secondly, if in the long run, gnome-shell turns out to be simply the best choice for users, we shouldn't hesitate to embrace it
<rickspencer3> currently, I think we are on a good path with Unity
<rickspencer3> but heck, who knows what things will be like a year from now, we shouldn't fear changing trajectory if it's the right thing for usres
<ClassBot> fisch246 asked: do you know how canonical plans to implement Wayland, in the next several years?
<rickspencer3> slowly and carefully :)
<rickspencer3> seriously, between bryce, RAOF, tselliot, and others, Ubuntu has a lot of graphics stack expertise
<rickspencer3> then there is the whole xorg-edgers community as well
<rickspencer3> so, a really large group of engineers who know this stuff up and down, backward and forward
<rickspencer3> I would expect that the first implementations that use wayland would be hardware specific, but that's a guess on my part
<rickspencer3> sorry I don't have more specifics there, but Ubuntu xorg community is pretty easy to find and discuss with
<ClassBot> mhall119 asked: Is Ubuntu going to target any other formfactors, tablets or phones or tabletop devices?
<rickspencer3> currently, I don't know of any specific plans for *Canonical* to do that
<rickspencer3> however, I understand that other companies are already doing this
<rickspencer3> I think that with Unity and the multitouch efforts, Ubuntu makes a good platform for this, though
<rickspencer3> I don't know of any community effort to make a derivative atm
<rickspencer3> I expect that some of the work that Linaro is doing in terms of supporting ARM architectures will really really help with this if someone wanted to go down that route
<ClassBot> darkdevil666 asked: We already have Ubuntu for netbook, for Tablet PCs with touch interface. I'd really want to see Ubuntu being operated by voice commands. Are there any teams working on it. I'd like to be a part of it
<rickspencer3> hmmm, none that I know of
<rickspencer3> darkdevil666, this sounds like a great opportunity for you to provide some leadership in our community if this is an area that you are passionate about
<rickspencer3> I bet there is technology out there that could be leveraged for this
<rickspencer3> and maybe you could be the instrument to make this happen
<rickspencer3> if you PM me I can try to connnect you with resources to get you started
<rickspencer3> ok, there are no questions in the queue, but there was a follow up question about USB creator
<rickspencer3> so, we do have that, and it's good
<rickspencer3> but I was thinking, what if you were using a proprietary operating system, and there was some Free software that you could install ...
<rickspencer3> and this Free software would download Ubuntu and create a Ubuntu USB stick for you
<rickspencer3> also ..
<rickspencer3> and this is pie in the sky ...
<rickspencer3> what if you could go to a web site or run a program, and point and click at feautres that you want, and have it create a USB stick for you, like that
<rickspencer3> maybe even in the language(s) that you want
<rickspencer3> that kind of thing
<ClassBot> abhinav asked: I don't know if it's stupid to ask. But I started with fixing bugs after the Ist day of UDW. Now, I am confused that if Feature Freeze has been called then will my patches be accepted or reviewed ?
<rickspencer3> they should all be reviewed
<rickspencer3> if they are bug fixes, well that's great!
<rickspencer3> if they are good fixes they will be accepted
<rickspencer3> however, if your patches add new features, they will not *automatically* be accepted
<rickspencer3> new features require a Feature Freeze Exception
<rickspencer3> so, the point of Feature Freeze is to say "from now on, focus 100% on fixing bugs"
<rickspencer3> so keep fixing those bugs, they will be most awesomely appreciated now
<rickspencer3> :)
<rickspencer3> hmm freenode seems to be lagging for me again
<ClassBot> gaberlunzie asked: what is the current opinion and status among engineers on pulseaudio integration?
<rickspencer3> I can speak for myself here
<rickspencer3> first, I know the road was a bit rocky
<rickspencer3> but pulseaudio was an awesome contribution to free software
<rickspencer3> I am very grateful to the pulseaudio upstream
<ClassBot> There are 10 minutes remaining in the current session.
<rickspencer3> in terms of integration, well I think it's going well now
<rickspencer3> pulse itself is stable and we've had several cycles to accumulate quirks and such
<rickspencer3> fwiw, it works well for me, and I definately field fewer complaints about it
* ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - https://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Questions in #ubuntu-classroom-chat || Event: Ubuntu Developer Week - Current Session: Getting your app into Ubuntu (Post-release) - Instructors: stgraber
<stgraber> Hey everyone !
 * stgraber hopes the bot won't die and freenode isn't as laggy as it was for the previous session ...
<stgraber> ok, so let's start
<stgraber> Hi everyone, I'm StÃ©phane Graber, an Application Review Board member.
<stgraber> In this session, I plan on quickly explaining what the ARB does and how you can get your app on extras.ubuntu.com
<stgraber> Please feel free to ask any question in #ubuntu-classroom-chat, prefixing them with "QUESTION: " so the bot gets them.
<stgraber> first a quick intro on what the ARB does
<stgraber> The Application Review Board is responsible on reviewing applications to be included in extras.ubuntu.com.
<stgraber> These apps are extra application that are usually quite small and simple and weren't present in the archive at the time of the release.
<stgraber> This process is mostly meant for upstream developers of a small app who wants it available in Ubuntu.
<stgraber> Apps must be Open Source and available under an OSI approved license.
<stgraber> These extra apps aren't supported or maintained by the Ubuntu community, it's the application author's responsability to take care of bug fixes and security updates.
<stgraber> If for some reason this doesn't happen, the app will be removed from the repository.
<stgraber> For new version of a package that already existed in the archive at the time of the release, the backport process should be used instead.
<stgraber> An ARB member is assigned to each proposed app and will review it and comment on Launchpad
<stgraber> When they are confident the app is in a good shape, it'll be submitted for vote at our next IRC meeting (every two weeks).
<stgraber> So far for maverick, we only have one app on extras.ubuntu.com, suspended-sentence by tumbleweed
<stgraber> we have another one that got approved and will be in extras.ubuntu.com as soon as the screenshot branch will be processed by Canonical IS
<stgraber> this one being a news rss ticker
<stgraber> any question so far ?
<stgraber> ok, seems like there's none :)
<stgraber> so I'll now quickly go through the process of getting a new app on extras.ubuntu.com
<stgraber> First thing if you want to get your app in the extra repository is to make sure it meets our criteria.
<stgraber> It needs to be a standalone app, run as the user, not ship with any kind of daemon and can't depend on anything that's in extra.
<stgraber> You can't submit an app that was already in the distro at release time, even if it's a new major version.
<stgraber> The basic process is:
<stgraber> 1) Release your app and learn how to package it
<stgraber> 2) Review https://wiki.ubuntu.com/AppReviews
<stgraber> 3) Update the packaging accordingly and upload your app to your PPA
<stgraber> 4) File a bug at https://bugs.launchpad.net/ubuntu-app-review-board/
<stgraber> 5) Wait for an ARB member to comment in the bug
<stgraber> 6) Fix anything that needs to be fixed, updating the version in your PPA
<stgraber> 7) When the ARB member is happy with your packaging, the app will be sumitted for vote at our next meeting (you don't necessarily need to be present)
<stgraber> 8) If it gets approved, an ARB member will ask for the screenshot branch to be merged and published, as soon as it's done (can take a while), your package will be uploaded
<stgraber> and that's about it
<stgraber> so far the most issues we got were with getting everything to stay in /opt except the .desktop files
<stgraber> also, the 8th step can take quite a while (up to a month) due to the process not being automated yet, we hope to have that improved quite soon
<ClassBot> fisch246 asked: if i was releasing a game in the extras repo, that was written in python 3.1, would that mean i couldn't ship it with python 3.1?
<stgraber> if python 3.1 doesn't exist in the target release and you need it for your app then indeed you won't be able to get it into extra
<ClassBot> mhall119 asked: will packages in extra be automatically rolled into universe (or multiverse) for the next release?
<stgraber> no, at least not automatically
<stgraber> we still strongly recommend whoever uploaded something to extras to get the package in universe for the next release or even more, into Debian and synced to Ubuntu
<stgraber> packages in extras won't be copied to the next release either
<stgraber> so it's really a good idea to get them into universe so you don't have to go through the ARB process again
<stgraber> and so your app eventually gets into Debian and can benefit from team maintenance, the bug tracking system and more generally a larger user base
<ClassBot> titeuf_87_ asked: when a new version of Ubuntu gets released, will all the apps need to be approved again, or that's not needed anymore?
<stgraber> all the post-release apps will need to be reviewed again, though hopefully they'll have been pushed to universe by then and won't need to go through the post-release process again
<ClassBot> mhall119 asked: So to stay in extra, you need to re-apply on each Ubuntu version?
<stgraber> that's correct, though we definitely don't recommend doing that ;)
<ClassBot> barcc1 asked: Is it possible to get plugins (e.g. for gedit) in extra?
<stgraber> good question, we didn't get any plugin in our queue yet, but I wouldn't think that'd work
<stgraber> as the plugin would need to be in /opt and it's not likely any application like gedit would look in there for plugins
<stgraber> also, the current criteria says "executable applications" which probably wouldn't apply to plugins
<stgraber> but there was discussion of being able to ship unity places or similar plugins in the extras repository with unity being updated to look in /opt (not sure if that's going to happen any time soon though)
<stgraber> the current queue for post-release packages is available here: https://bugs.launchpad.net/ubuntu-app-review-board/+bugs
<stgraber> and most of the documentation on how to get an app in the repository is here: https://wiki.ubuntu.com/AppReviews
<stgraber> any other question ?
<ClassBot> seidos asked: how is it checked that an app is secure?
<stgraber> we usually do a full code review, if the code is considered too complex, we'll decline the app
<stgraber> we also make sure the app won't listen on the network and won't start a daemon
<stgraber> I also tend to run the app in a sandbox (using arkose) to check what the app reads/writes on the disk as well as network access
<ClassBot> seidos asked: why must "question:" be capitalized?
<stgraber> as I got your question twice, I don't think the bot is case sensitive ;)
<ClassBot> seidos asked: do you work for ubuntu or canonical?
<stgraber> I work on Ubuntu and Edubuntu for Revolution Linux in Sherbrooke, QC
<ClassBot> seidos asked: which is the most secure version of ubuntu?  lts?  newest?
<stgraber> any supported release is usually quite secure as security updates are checked for all supported versions and pushed usually at the same time to all of them too
<stgraber> I usually always run LTS releases on the servers to get a longer life cycle
<stgraber> and the latest stable release for desktop computers
<stgraber> and usually whatever is the current dev release on my laptop, though running the current dev version can be dangerous both from a stability than a security point of view ;)
<ClassBot> titeuf_87_ asked: should bugs for extra apps be submitted in launchpad? Or directly to the author of the app?
<stgraber> packages in extras.ubuntu.com don't have a https://bugs.launchpad.net/ubuntu/+source/<source package name/+bugs page so it's not possible to report bug against them
<stgraber> it's usually best to contact the author/packager of the app and if it's a serious security issue and you don't get a reply, then contact the ARB directly
<stgraber> so we can try to contact the author again or even remove the app from extras.ubuntu.com if needed
<ClassBot> seidos asked: i have an idea for a "medicine app" who should i get in touch with?
<stgraber> if it's an existing app you want to make available, then getting familiar with packaging and the post-release app process is probably what you should do
<stgraber> if it's for a new non-existing app, then I honestely don't know much about the "medicine app" community to answer that question
<stgraber> but it's probably best to contact someone who's already involved in that community to find other people to work with and start developping it
<ClassBot> seidos asked: how can i find that community?  or would i have to create it?
<stgraber> I'd suggest looking for similar apps in the archive, check who's writting them and try to contact one of the upstreams
<stgraber> that's probably the best way of getting introduced to people doing something similar to what you want to do
<ClassBot> highvoltage asked: would the ARB be open to infrastructure on Ubuntu in the future that would allow Android apps in the extras repository?
<stgraber> interesting question
<stgraber> we discussed it a bit at the last UDS and it's something I'd personaly be fine with
<stgraber> though we'd probably find some way of allowing all Android apps to run then rather than having to review them one by one
<stgraber> (making sure they're sandboxed properly so even evil/badly coded ones can't harm your system)
<ClassBot> There are 10 minutes remaining in the current session.
<ClassBot> There are 5 minutes remaining in the current session.
<stgraber> ok, as there's no more question, now is time for a 5 minutes break before bdrung starts talking about the good stuff in ubuntu-dev-tools
<stgraber> thanks everyone for attending
* ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - https://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Questions in #ubuntu-classroom-chat || Event: Ubuntu Developer Week - Current Session: Good stuff in ubuntu-dev-tools - Instructors: bdrung
<ClassBot> Logs for this session will be available at http://irclogs.ubuntu.com/2011/03/03/%23ubuntu-classroom.html following the conclusion of the session.
<bdrung> hi everyone!
<bdrung> i am Benjamin Drung, a Debian & Ubuntu-Developer (and a DMB member).
<bdrung> In this session I talk about good stuff in ubuntu-dev-tools.
<bdrung> I will talk about some old tools, some improved, and some quite new ones.
<bdrung> Please feel free to ask any question in #ubuntu-classroom-chat, prefixing them with "QUESTION: " so the bot gets them.
<bdrung> ubuntu-dev-tools is a package that contains scripts and tools that are used by Ubuntu developers. You can install it with "sudo apt-get install ubuntu-dev-tools".
<bdrung> Some tools are quite new and you need to run Ubuntu 11.04 (natty) or grab the latest version from https://code.launchpad.net/~udt-developers/+archive/daily (sorry, only maverick and natty)
<bdrung> Let's start with the first set: pull-*-source
<bdrung> There are multiple ways to grab the source package.
<bdrung> You can either run "apt-get source <package>", but that's works only if you have the correct distros in your sources.list.
<bdrung> Especially if you want to pull the package from an other series or from Debian, it get's complicated.
<bdrung> For that reason we have the pull-*-source tool: pull-lp-source downloads a source package for a given Ubuntu series. pull-debian-source downloads a source package for a given Debian series.
<bdrung> "pull-lp-source vlc lucid" would download the latest source package version of vlc in Ubuntu 10.04 (lucid).
<bdrung> "pull-lp-source vlc" would pull the source package from the current Ubuntu development version (natty).
<bdrung> "pull-debian-source vlc" would pull the source package from Debian unstable.
<bdrung> "pull-debian-source vlc stable" would pull the source package from Debian stable and so on.
<bdrung> Questions?
<bdrung> The next tool I want to present is suspicious-source.
<bdrung> Open a terminal, navigate into an extracted source package and run "suspicious-source" there.
<bdrung> The tool will check the mimetype and extension of every file in the directory (and subdirectories) and report the ones that are not known as source files.
<bdrung> It's good for finding pre-compiled or generated files in a source package.
<bdrung> I recommend to use for a first check if you package a new software.
<bdrung> chadadavis asked: how is this different than branching from bzr?
<bdrung> bzr branch and pull-*-source have the same purpose, except bzr gives you a branch and pull-*-source will give you only the tarballs.
<bdrung> pull-*-source is the old way, bzr branch is the UDD way
<bdrung> Next tools: wrap-and-sort
<bdrung> That tools works on the files in debian/ - especially on the control file
<bdrung> It work on nearly every kind of list.
<bdrung> In debian/control you have a list in the Build-Depends, Depends, Recommends, Suggests, ... fields.
<bdrung> These lists are sometimes long and written in one line.
<bdrung> There are two problems with such lists:
<bdrung> 1. You may have one item twice in the list
<bdrung> 2. Changing one item in the list changes the whole line and it's hard to read a diff then (especially when we merge packages from Debian)
<bdrung> These points can be addressed if we wrap the list (one item per line; point 2) and sort the list (point 1)
<bdrung> Just run "wrap-and-sort" and it will sort these lists. Run "wrap-and-sort -v" to see which files are touched.
<bdrung> One example: Running wrap-and-sort in inkscape gives you these changes: http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;filename=wrap-lines.patch;att=1;bug=576357
<bdrung> Questions?
<bdrung> Not everyone likes the kind of indentation. Run "wrap-and-sort --short-indent" if you want only one space for indentation.
<bdrung> Next tools: sponsor-patch
<bdrung> This tool is especially interesting for Ubuntu developers with upload right, who want to sponsor someone else.
<bdrung> Let's look at http://reports.qa.ubuntu.com/reports/sponsoring/ and pick one item.
<bdrung> For example bug #728438.
<bdrung> Let's run "sponsor-patch -s 728438"
<bdrung> "-s" does the same as "-b -u ubuntu"
<bdrung> Here's what the tools does: It pulls the patch from the bug, it download the corresponding source tarball, applies the patch, created the source tarball.
<bdrung> Before it created the new source tarball, it will run "update-maintainer" and update the timestamp of the changelog entry.
<bdrung> It simplifies the bunch of commands that I would have to type otherwise.
<bdrung> But it does even more: It makes some sanity checks: Does the changelog automatically close the sponsorship bug?
<bdrung> Is the version number greater than the current version in the archive?
<bdrung> Is the changelog target valid? E.g. "maverick" is wrong, it must be "maverick-proposed".
<bdrung> Then the package will be built (if you have specified -s or -b) with your builder (supported are pbuilder, pbuilder-dist, and sbuild)
<bdrung> One correctly built, it will give you the debdiff, the lintian run, and the build log.
<bdrung> Once you checked them manually, you can upload it.
<bdrung> If something went wrong or a sanity check failed, you will be asked if you want to fix it. If you say yes, you will get a shell, do your changes, exit with 0, and then it will try again.
<bdrung> sponsor-patch works with debdiff, merge proposals (if the have a corresponding bug).
<bdrung> If you feed sponsor-patch a normal patch file, it will apply it with add-patch (another tool in ubuntu-dev-tools). Then you have to write the changelog yourself.
<bdrung> You can use sponsor-patch to upload the package to a PPA.
<bdrung> Questions?
<bdrung> Next tool: backportpackage
<bdrung> This tool can be used to backport a package from a later version to an older version.
<ClassBot> MadCow108 asked: sponsor-patch does not support cowbuilder? is it planned to add it?
<bdrung> I have no plans to add it. Please file a bug report.
<bdrung> Bug report can be files either with "ubuntu-bug ubuntu-dev-tools" or on https://bugs.launchpad.net/ubuntu/+source/ubuntu-dev-tools
<bdrung> We have a internal interface for the builder. Adding cowbuilder support shouldn't be that hard. We just need someone who tests it. ;)
<bdrung> backportpackage and sponsor-patch use the same builder backend and therefore support the same types of builders.
<bdrung> backportpackage can build the package with your builder (pbuilder, pbuilder-dist, or sbuild)
<bdrung> It can upload the backported package to an PPA or it can do both.
<bdrung> Let's give an example: "backportpackage -u ppa:bdrung/backports -b ubuntu-dev-tools"
<bdrung> "-u ppa:bdrung/backports" says that backportpackage should upload the backported version to my PPA called backports.
<bdrung> "-b" tells it to build the package before the upload.
<bdrung> and "ubuntu-dev-tools" is the package to upload.
<bdrung> if not specified, the source series is the current development series (natty) and the target series is the running series (determined by lsb-release)
<bdrung> If you look at https://launchpad.net/~bdrung/+archive/backports/+packages you will see ubuntu-dev-tools - 0.119~maverick1~ppa1 there.
<ClassBot> There are 10 minutes remaining in the current session.
<bdrung> You can feed every .dsc file into backportpackage.
<bdrung> For example I can backport adblock-plus from Debian unstable:
<bdrung> backportpackage -u ppa:mozillateam/xul-ext http://cdn.debian.net/debian/pool/main/a/adblock-plus/adblock-plus_1.3.3-3.dsc
<bdrung> Questions?
<bdrung> Most of the new tools presented here, were written by tumbleweed and me.
<bdrung> Feel free to poke us if you have questions about the script internals.
<bdrung> If you were stimulated by this talk, you can look at the package description so see which script are also available.
<ClassBot> There are 5 minutes remaining in the current session.
<bdrung> Every script in ubuntu-dev-tools has a man page. Some of them give a detailed description what they do, what parameters they take, and some examples.
<bdrung> Thanks everyone for attending.
<bdrung> You can listen to^W^W read more talks tomorrow.
<ClassBot> Logs for this session will be available at http://irclogs.ubuntu.com/2011/03/03/%23ubuntu-classroom.html
* ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - https://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Questions in #ubuntu-classroom-chat ||
<seidos> right view, right intention, right speech, right action, right livelihood, right effort, right mindfulness, right concentration
#ubuntu-classroom 2011-03-04
<rrrrrrr23> exit
<rrrrrrr23> hiii
<rrrrrrr23> any one der
<rrrrrrr23> wat is dis abt
<Ampelbein> rrrrrrr23: this is the classroom where sessions for ubuntu are held. https://wiki.ubuntu.com/Classroom has more information.
<rrrrrrr23> but no one is teaching
<Ampelbein> rrrrrrr23: you can see the schedule at http://is.gd/8rtIi
<dholbach> HELLO EVERYBODY! WELCOME TO THE LAST DAY OF UBUNTU DEVELOPER WEEK!
<dholbach> I know it's unfortunate that it's the last day, but I promise it's going to be action packed and loads of fun.
<dholbach> if you haven't joined #ubuntu-classroom-chat yet, please do that now
<dholbach> because that's where all the chatter and the questions go
<dholbach> you know how it works... please prefix your question with QUESTION:
<dholbach> first up are Brian Murray and Nigel Babu who are going to tell us how to get better bug reports
<dholbach> we still have a few minutes left, so go and grab yourself some coffee, tea or water and let's get cracking in 3 minutes :)
* ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - https://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Questions in #ubuntu-classroom-chat || Event: Ubuntu Developer Week - Current Session: Getting better bug reports  - Instructors: bdmurray, nigelb
<dholbach> alright... bdmurray, nigelb: the stage is yours
<nigelb> ok, that's our cue!
<ClassBot> Logs for this session will be available at http://irclogs.ubuntu.com/2011/03/04/%23ubuntu-classroom.html following the conclusion of the session.
<nigelb> Hello and welcome everyone!
<nigelb> I'm nigel from the Bug Control Team and with me is bdmurray who's with the QA Team and the Bug Master for Ubuntu
<nigelb> We're both going to talk to you folks today about getting better bug reports for your application
<nigelb> Bugs happen with software.  We can't control it.
<nigelb> Getting good bug reports is very essential to us developers.
<nigelb> Sometimes along with bugs we want the user to give us certain debugging information.
<nigelb> Sometimes we want to talk to users just before and just after they file a bug.
<nigelb> One of the first things we'd like to show you is a newish LP feature.
<nigelb> This new feature lets us set package specific bug reporting guidelines.
<nigelb> For example, the ubiquity package can have specific guidelines (and it does!).
<nigelb> Lets take a look at the information displayed for ubiquity.
<nigelb> Lets all look at https://bugs.staging.launchpad.net/ubuntu/+source/ubiquity/+filebug.  This is LP's staging interface and feel free to play with it.
<nigelb> If you enter a summary and click next, you'll get to see what I'm talking about
<nigelb> If you get a list of duplicate bugs, click "No, I want to file a new bug" and you should see it
<nigelb> Here's a screenshot of what I see http://people.ubuntu.com/~nigelbabu/Screenshot.png
<nigelb> So, the cool bit is we can tell our users that "Please attach the files /var/log/syslog and /var/log/partman to your bug....
<nigelb> and here we get a huge advantage, the bug report now has some information that is probably absolutely necessary for triaging it
<nigelb> Launchpad also lets developers set the bug reported acknowledgement.
<nigelb> This acknowledgment might be a good way to tell people to test this package from a PPA or tell them what to expect next
<nigelb> This would be awesome if you have a daily build PPA for your package
<nigelb> (If you dont, hang around and listen to Quintasan_ later today ;) )
<nigelb> The Bug supervisor for Ubuntu, which is set to Bug Control has access to edit the bug reporting information and the acknowledgement
<nigelb> Since I'm part of bug control, I can see this edit page
<nigelb> Here's a screenshot of that page: http://goo.gl/t73Lj
<nigelb> Any questions so far?
<nigelb> Moving on then.
<nigelb> The next very important way to get good bug reports is through apport.
<bdmurray> nigelb: if I may
<nigelb> bdmurray: please :)
<bdmurray> If you can not set the bug reporting guidelines or the acknowledgement for a particular package please let nigelb or I know, or email the bug squad, and we'll be happy to set it for you.
<bdmurray> Anything we can do to get higher quality bug reports is a win for everyone! ;-)
<ClassBot> techbreak asked: can you explain bit more no syslog and partman ?
<bdmurray> So ubiquity logs information to /var/log/partman and /var/log/syslog and the developers want / need to this information to sort out what is going on
<bdmurray> After file in the title and the description and the bottom you'll notice an attach files dialog.  There you can then add a log file as an attachment.
<bdmurray> However, we have just the tool for you techbreak which makes bug reporting much easier.
<bdmurray> Which we'll get to shortly.
<nigelb> Ok, so apport is that mystery tool :)
<nigelb> Apport is a system which intercepts crashes right when they happen, in development releases of Ubuntu
<nigelb> and gathers useful information about the crash and the operating system environment.
<nigelb> Additionally, it is used as a mechanism to file non-crash bug reports about software so that we receive more detailed reports.
<nigelb> Precisly what we're talking about.
<nigelb> Lets take a look at a bug filed by apport.
<nigelb> I filed a test bug in the staging environment.
<nigelb> https://bugs.staging.launchpad.net/ubuntu/+source/squid3/+bug/724766
<nigelb> This bug is filed against the squid3 package (the proxy server for those curious).
<nigelb> The title and description isn't very helpful, but hey its a test bug!
<nigelb> Of note here is that the squid3 package does not have an apport hook. (we'll get to what it is later)
<nigelb> So the information we have here is generic information that apport would collect for any package.
<nigelb> We have the architecture, the release being used, the package version and the source package name.
<nigelb> Additionally, in the Dependencies.txt attachment we have information about the versions of packages upon which squid3 depends.
<nigelb> Really cool isn't it?
<nigelb> I was talking about hooks earlier.
<nigelb> Apport lets us write 2 types of hooks,
<nigelb> one is package specific hooks that run for a particular package.
<nigelb> like for example a squid3 package
<nigelb> The other is symptom based hooks like audio or storage or display.
<nigelb> audio is the problem but the actual bug may be in different packages depending on the symptoms
<nigelb> So, questions on apport so far?
<nigelb> netsplit's playing havoc today, stay with us :)
<nigelb> Lets take a look at /usr/share/apport/package-hooks to see what hooks are on your computer right now.
<nigelb> One thing common among a  lot of files in that folder is that a majority of them were probably written by bdmurray ;)
<nigelb> When you open that folder there's going to be a lot of python files
<nigelb> almost all of them are of the pattern source_foo.py
<nigelb> Well, apport hooks are all written in python because apport itself, I belive, is written in python
<bdmurray> nigelb: it is written in python
<nigelb> Aha!
<nigelb> I wasn't sure ;)
<bdmurray> and now you are! ;-)
<nigelb> heh, thanks
<nigelb> Lets take a look at one of the hooks
<nigelb> There are some really simple ones and some really complicated ones in there
<nigelb> Open the source_totem.py file
<nigelb> That's the hook for totem, the media player
<nigelb> Its on the default install, so the hook should be in most of your computers
<nigelb> In case you don't have the file, head over to http://goo.gl/UUWpt
<nigelb> techbreak> can you tell me what actually a hook is ? a bug ? a problem ?
<nigelb> I figure this question would benefit a common answer.
<nigelb> A hook is a python script that gets executed when you run ubuntu-bug <packagename>
<nigelb> So, we do smart things in the hook like as you questions, run certain processes, gather certain log files, and get them all onto launchpad
<nigelb> Lets look at the import statements in the totem hook first
<nigelb> apport.hookutils and apport.packaging are the significant ones
<nigelb> You can look at 'pydoc apport.hookutils' and 'pydoc apport.packaging' to see the functions in both these imports
<nigelb> Basically both of them provide a collection of readymade and safe functions for many commonly used things.
<nigelb> There are functions for attaching a file's contents, getting a command's output, grabbing hardware information and much more.
<nigelb> In this hook, we start with asking the user a question and providing 3 choices for an answer.
<nigelb> The question is "How would you describe the issue?" and the options are "The totem interface is not working correctl", "No sound is being played", "Some audio files or videos are not being played correctly".
<nigelb> While the first one is definitely something to be filed against totem, the other 2 may not be a totem problem.
<nigelb> I mean, how can you blame the media player if your sound driver itself has a bug ;)
<nigelb> If the user selected "No sound is being played", we'd come to "if response[0] == 1:", which means the problem is actually a something to do with audio and not totem, so we open the audio hook.
<nigelb> there, we straightfoward use a python function to execute another program
<nigelb> And if the user selected "Some audio files or videos are not being played correctly", we come to if "response[0] == 2:" where we add the gstreamer package info.
<nigelb> Here we use a function provided by apport to add information about a package
<nigelb> Now turn your attention to lines 16, 17, and 18.
<nigelb> The lines are self explanatory, but I'll take a moment to name those functions
<nigelb> apport.hookutils.command_output, apport.hookutils.package_versions, and apport.hookutils.read_file
<nigelb> Very self explanatory and the pydoc command I gave earlier should explain all of these functions
<nigelb> With these 3 commands we've added valuable debugging information for the developer.  All this information will be uploaded to launchpad and attached to the bug report.
<nigelb> As a developer you'll surely recognize the value of this information.
<nigelb> That was a bit of information cramming.  Are there any questions so far?
<ClassBot> techbreak asked: i just checked /var/log.. but there is neither syslog or partman directory..
<nigelb> err, sorry
<ClassBot> techbreak asked: can we edit this .py files if we think it can be better and submit ?
<nigelb> In short, yes!
<nigelb> All these files belong to a particular package.  Like the source_totem.py in the totem package.
<nigelb> If you'd like to help make it better, get the code, open a bug, and submit a patch
<bdmurray> report a bug about the sourcepackage providing the file so in this example totem
<nigelb> You can poke bdmurray or me in #ubuntu-bugs and we'd be happy to review and help get it packaged
<nigelb> you can use dpkg S /path/to/file to figureout which package
<nigelb> err, that was dpkg -S /path/to/file
<nigelb> One of my favorite hooks is the new audio hook, http://goo.gl/r4dFW
<nigelb> Don't get alarmed by its size though
<nigelb> It asks good questions and manages to be very friendly in diagnosing audio problems.
<nigelb> There are some other neat things you could do with hooks, like add tags to the bug report.
<nigelb> For example, if a particular question is answered, you want to add a particular tag
<nigelb> This helps reduce the load with triaging
<nigelb> To see an example of that, see the cheese hook, http://goo.gl/tsJ6G
<nigelb> See line numbers 9, 42, 45, 72-76 for the bits where the tags come into play.
<nigelb> If you know python, its kind of simple to read what's done.
<nigelb> With the cheese hook tags are added based on symptoms, so the devs have a generic idea of the bugs
<nigelb> There's developer information for Apport available at https://wiki.ubuntu.com/Apport/DeveloperHowTo.
<nigelb> There are lots of packages without an apport hook.
<bdmurray> Well, that's partially because there are a lot of packages. ;-)
<nigelb> Clearly we've shown how much an apport hook helps get better bug reports for a package
<ClassBot> There are 10 minutes remaining in the current session.
<nigelb> heh, that too ;)
<nigelb> If you'd like to write a hook for your own package and need help, feel free to poke either me (nigelb) or Brian Murray (bdmurray) in #ubuntu-bugs.
<nigelb> Some of the fairly new hooks we've managed over the last few cycles is the rhythmbox book (I wrote that one), cheese hook (kermiac, a fellow bug control member wrote that one), and a few more that I now forget
<nigelb> ah, thanks techbreak.  rhythmbox *hook* :0
<nigelb> :)
<nigelb> I fail at typing :p
<nigelb> Anyway, that's the end of our session.
<nigelb> We'll take questions now :)
<nigelb> bdmurray: Anything you want to add?
<bdmurray> Once you have bugs reported by apport in Launchpad because the data is in a regular format it is also possible to some automated processing of those bug reports using the Launchpad API.
<ClassBot> There are 5 minutes remaining in the current session.
<bdmurray> With the combination of high quality reports and some automatic processing your bug life can become much easier.
<nigelb> and our triaging life too ;)
<bdmurray> Another neat thing about the cheese hook is that it asks you to close cheese so that it gets run in debug mode.
<bdmurray> The possibilities of what you can do with apport really are amazing.
<bdmurray> Feel free to ask nigelb or I any questions.  We are always in #ubuntu-bugs.
<nigelb> ok, I guess we're done
<nigelb> Next up is kim0, the man behind the clouds ;)
<kim0> Hello Hello everyone o/
<ClassBot> Logs for this session will be available at http://irclogs.ubuntu.com/2011/03/04/%23ubuntu-classroom.html following the conclusion of the session.
<nigelb> Kim0 is going to talk about Introducing boto EC2 Cloud API.  kim0, the stage is all yours :)
<kim0> Thanks nigelb
* ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - https://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Questions in #ubuntu-classroom-chat || Event: Ubuntu Developer Week - Current Session: Introducing boto EC2 Cloud API - Instructors: kim0
<kim0> It's really a pleasure to be presenting in UDW
<kim0> So the topic of the session is "intro to boto ec2 api"
<kim0> basically what that means is
<kim0> how to control the Amazon EC2 cloud
<kim0> from the ease and comfort of your python shell
<kim0> Please feel free to shoot any questions to me in #ubuntu-classroom-chat
<kim0> just prepend your questions with QUESTION:
<kim0> I'll give a few lines intro
<kim0> since many might not be totally familiar with cloud means
<kim0> basically, cloud computing has tons of different definitions
<kim0> however, almost everyone will agree
<kim0> resources have to be allocated by an api call
<kim0> and that resource allocation is instantaneuous
<kim0> and that it should be elastic and almost infinite
<kim0> Amazon ec2 cloud meets those conditions
<kim0> so basically
<kim0> through an api call
<kim0> you're able to very quickly allocate computing resources
<kim0> i.e. servers, networking gear, IPs, storage space
<kim0> ...etc
<kim0> you use them for as much as you want
<kim0> then you simply "delete" them
<kim0> So in real life
<kim0> assuming you (as a developer) were tasked with the compute heavy task of say converting 100k text files into PDFs
<kim0> a "typical" implementation would be to spawn 20 servers in the cloud
<kim0> kick them crunching on the conversion .. and finish in say 2 hours
<kim0> then delete that infrastructure!
<kim0> and yes, you only pay for the used resources (40 hours of compute time)
<kim0> lovely, isn't it :)
<kim0> Any questions so far on the general concepts
<kim0> before I start digging into boto
<kim0> Ok .. assuming no one has questions
<kim0> let's get started
<kim0> the first step would be to install the python-boto package
<kim0> sudo apt-get install pyton-boto
<kim0> I also prefer to work in the ipython envrionment
<kim0> sudo apt-get install ipython
<kim0> short break .. taking questions
<ClassBot> techbreak asked: short introduction to urself please.. we wonder who our session master is :)
<kim0> hi techbreak :) I'm Ahmed Kamal, the ubuntu cloud community liaison
<kim0> My role is to help the ubuntu cloud community grow and succeed
<kim0> I always hang-out at #ubuntu-cloud
<kim0> feel free to ping me anytime
<ClassBot> techbreak asked: i have seen examples of cloud to be "facebook" too.. how facebook can be a cloud  ?
<kim0> well yes, FB is considered a cloud app
<kim0> It is a cloud "application"
<kim0> not a cloud platform
<kim0> the likes of Google apps (gmail, gdocs...) facebook ..
<kim0> are all considered cloud apps
<kim0> because the data and code are distributed in highly distributed system
<kim0> I could go into all sorts of details, but that question is a bit offtopic .. feel free to pick it up later :)
<ClassBot> techbreak asked: ipython ? iron ptyhon ?
<kim0> ipython is "interactive python shell" afaik
<kim0> ok .. assuming you're all set
<kim0> â back to boto
<kim0> In order to actually execute the steps here .. you'd need to have an amazon ec2 account
<kim0> setup and have generated secret keys and stored your variables in ~/.ec2/ec2rc
<kim0> this is outside the scope of this tutorial however
<kim0> for those interested
<kim0> follow along with https://help.ubuntu.com/community/EC2StartersGuide
<kim0> If you spot any wrong info, let me know
<kim0> In all examples, I will copy/paste
<kim0> the api calls and the results
<kim0> so that everyone can follow along easily
<kim0> $ ipython
<kim0> we're now inside the ipython interperter
<kim0> import boto
<kim0> the boto python module is imported (ready to be used)
<kim0> The Amazon cloud is composed of multiple regions
<kim0> similar to "data centers" all around the world
<kim0> we need to pick one to connect to
<kim0> let's see how to do that
<kim0> from boto import ec2
<kim0> regions = ec2.regions()
<kim0> Out[7]:
<kim0> [RegionInfo:eu-west-1,
<kim0>  RegionInfo:us-east-1,
<kim0>  RegionInfo:ap-northeast-1,
<kim0>  RegionInfo:us-west-1,
<kim0>  RegionInfo:ap-southeast-1]
<kim0> What you see are the Amazon regions (data-centers) around the world
<kim0> we'll pick the one in us-east-1 to work with and connect to!
<kim0> >> useast = regions[1]
<kim0> I will prepend all python input code with (>>) to make it easily distinguishable
<kim0> >>useast.endpoint
<kim0>  u'ec2.us-east-1.amazonaws.com'
<kim0> Let's connect
<kim0> >> useconn = useast.connect()
<kim0> Awesome
<kim0> we're now connected
<kim0> let's do something useful
<kim0> by default .. Amazon configure its cloud firewall
<kim0> to block all incoming port connections
<kim0> the rule-sets .. are called "secutiy groups" in its jargon
<kim0> let's get a list of security groups available
<kim0> >> useconn.get_all_security_groups()
<kim0> Out[14]: [SecurityGroup:default]
<kim0> the result is a single group called "default" ... makes sense!
<kim0> just a little note, for anyone trying to setup a new account with amazon, you're gonna need a credit card
<kim0> while they offer a completely free instance (micro type) free for a year
<kim0> i.e. you most likely won't be charged anything .. but you still need a valid one
<kim0> try to follow along with me in the session, I'll be pasting all input on output
<kim0> back on track
<kim0> so let's get our security group (firewall rule)
<kim0> sg=useconn.get_all_security_groups()[0]
<kim0> let's "open" port 22
<kim0> that's for ssh
<kim0> >> sg.authorize('tcp', 22, 22, '0.0.0.0/0')
<kim0> Ok ..
<kim0> so let's quickly recap
<kim0> what we've done
<kim0> we've enumerated amazon cloud datacenters .. and chose to connect to the one in us-east
<kim0> and we're manipulated the firewall to open port 22
<kim0> all using API calls .. all on-demand and elastic
<kim0> let's start the really cool stuff :)
<kim0> let's start our own cloud server
<kim0> a little intro
<kim0> Ubuntu created official ubuntu cloud images, and publishes them to the amazon cloud
<kim0> each published image is called AMI
<kim0> Amazon Machine Image
<kim0> and each AMI .. has its own "id" .. which is like a long number identifying it
<kim0> when you want to start a new cloud server, you tell amazon what ami you want to use .. then it clones that ami and starts an "instance" of that ami for you!
<kim0> so let's do that
<kim0> >> ubuimages=useconn.get_all_images(owners= ['099720109477', ])
<kim0> note that useconn .. is the us-east connection we had setup
<kim0> get_all_images() is the call to get a list of images from amazon
<kim0> the "owners=['099720109477', ]" part .. is basically a filter .. that number is the ID for Canonical .. so that you only get official ubuntu images
<kim0> while you can start using fancy code to filter the huge list
<kim0> of images to what you want!
<kim0> You could use code like
<kim0> nattymachines = [ x for x in ubuimages if (x.type == 'machine' and re.search("atty", str(x.name))) ]
<kim0> I prefer a simpler approach
<kim0> Visit the Ubuntu cloud portal
<kim0> http://cloud.ubuntu.com/ami/
<kim0> this page shows a listing of all publicly available ubuntu images
<kim0> You just use the search box on the top right to search for what you want
<kim0> In my case, I searched for "us-east natty"
<kim0> the ami ID is shown in the table and you can simply copy it!
<kim0> For me it's    ami-7e4ab917
<kim0> so let's filter the list using that ID
<kim0> >> natty = [ x for x in ubuimages if x.id == 'ami-7e4ab917' ][0]
<kim0> >>  natty.name
<kim0> Out[22]: u'ebs/ubuntu-images-milestone/ubuntu-natty-alpha3-amd64-server-20110302.2'
<kim0> voila .. as you can see
<kim0> it's a natty image .. alpha3!
<kim0> hot from the oven :)
<kim0> Let's go ahead and start a server
<kim0> >> reservation = natty.run(key_name='default',instance_type='t1.micro')
<kim0> natty.run() starts an image
<kim0> the key_name .. is your ssh key .. this is part of setting up your Amazon ec2 account
<kim0> that key is injected into the ubuntu instance as it boots, so that you're able to ssh into it later
<kim0> The instance_type parameter .. is the "size" of the server you want
<kim0> in my case, I'm starting the smallest one .. micro
<kim0> since I'm executing this live
<kim0> the server must have been created right now
<kim0> in a matter of seconds
<kim0> the API call
<kim0> returns as "reservation"
<kim0> let's interrogate that
<kim0> >> instance = reservation.instances[0]
<kim0> Let's see if the server is ready
<kim0> >>  instance.state
<kim0> Out[26]: u'pending'
<kim0> oh .. that's interesting
<kim0> state pending means it's still being allocated
<kim0> any questions so far ?
<kim0> now is a good time while amazon allocates the instance :)
<kim0> not that it takes more than a few seconds actually
<kim0> Great
<kim0> it's ready
<kim0> >> : instance.update()
<kim0> Out[28]: u'running'
<kim0> The serer has been created, booted, my ssh key "default" injected into it
<kim0> how do we login you say
<kim0> let's ask about the serer's name
<kim0> >>  instance.public_dns_name
<kim0> Out[29]: u'ec2-184-72-132-193.compute-1.amazonaws.com'
<kim0> I can now ssh into that Ubuntu cloud server just like that
<kim0> ssh ubuntu@ec2-184-72-132-193.compute-1.amazonaws.com
<kim0> If I had used a different ssh key, I would nice ssh "-i" parameter .. but I'm using my default "~/.ssh/id_rsa" .. so no need to do anything
<kim0> I've just configured the server to allow
<kim0> you guys to ssh into it
<kim0> Go ahead
<kim0> ssh session@ec2-184-72-132-193.compute-1.amazonaws.com
<kim0> password: session
<kim0> please don't do anything nasty :)
<kim0> Once logged in .. feel free to start byobu
<kim0> a nice colorful gnu/screen customization
<kim0> I'm ready to take some questions
<ClassBot> ranamalo asked: when new packages are released are they incorporated in the ubuntu ami's?  Like if openssh is currently 5.3 and 5.4 is released today, if fire up the ubuntu ami tomorrow will i have 5.4 installed?
<kim0> ranamalo: Well, with package being updated
<kim0> new AMIs are pushed
<kim0> remember that AMI-ID we got   ami-7e4ab917
<kim0> that we got from cloud.ubuntu.com/ami
<kim0> every couple of weeks or so
<kim0> updates will be pushed
<kim0> and a new image will be created
<kim0> however
<kim0> if you're running an older image .. there's nothing preventing you from apt-get dist-upgrade 'ing it
<ClassBot> There are 10 minutes remaining in the current session.
<kim0> this is espeically true if you're running natty or a recent maverick (pvgrub booted instance) .. not too important for now
<ClassBot> techbreak asked: if you are copy pasting can you link us to the python code ? so that we can have the code and you can explain one by one /
<kim0> Here you are
<kim0> http://paste.ubuntu.com/575608/
<kim0> That's all the commands I've written so far
<kim0> you can practice on your own later
<kim0> and if you need any help .. everyone at #ubuntu-cloud is more than helpful (at least I hope so) :)
<ClassBot> mhall119 asked: does boto work on UEC as well?
<kim0> mhall119: yes it does AFAIK
<kim0> UEC is Ubuntu Enterprise Cloud
<kim0> it's a private cloud product
<kim0> that you can use to run your own cloud (like Aamzon)
<kim0> on your own hardware
<kim0> It is based on the eucalyptus open source project
<kim0> for more info on using boto with UEC .. check out this link http://open.eucalyptus.com/wiki/ToolsEcosystem_boto
<ClassBot> ranamalo asked: what advantages are there to using boto over ec2-ami-tools and ec2-api-tools?
<ClassBot> There are 5 minutes remaining in the current session.
<kim0> ranamalo: well, you can use command line tools in those packages
<kim0> to effectively do the same thing
<kim0> however the benefit of using python bindings
<kim0> is clear .. if you're writing a tool
<kim0> or some program
<kim0> running external commands
<kim0> and parsing results from the stdout text
<kim0> is effectively hell
<kim0> for programmers
<kim0> an API provides a consistent clean interface
<ClassBot> akshatj asked: What would be the advantages of deploying dmedia( https://launchpad.net/dmedia ) on clous?
 * kim0 checking that out
<kim0> akshatj: I'm not familiar with that project
<kim0> however the generic advantages would be
<kim0> you don't worry about hardware
<kim0> you don't manage the infrastrucutre
<kim0> you can scale-up/down easily cheaply
<ClassBot> ranamalo asked: Is there a howto url you can give us?
 * kim0 racing to answer :)
<kim0> howto url for ?
<kim0> a boto howto
<kim0> well .. nothing special .. just googling you'll find tons of stuff
<kim0> many useful info on the wiki
<kim0> like https://help.ubuntu.com/community/UEC
<kim0> If you're interested in learning more or contributing
<kim0> ping me anytime
<kim0> on #ubuntu-cloud
<kim0> Thanks everyone
<kim0> hope this was useful
<kim0> don't forget to terminate your instances
<kim0> or you keep paying for them :)
<kim0> bye bye
* ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - https://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Questions in #ubuntu-classroom-chat || Event: Ubuntu Developer Week - Current Session: Introduction to Django Development - Instructors: lukasz
<ClassBot> Logs for this session will be available at http://irclogs.ubuntu.com/2011/03/04/%23ubuntu-classroom.html following the conclusion of the session.
<lukasz> Hello everybody, my name is Åukasz CzyÅ¼ykowski, I'm part of ISD (Infrastructure Systems Development) team at Canonical. This will be a short introduction for creating web applications with Django framework.
<lukasz> I assume that everybody is using Maverick and have Django installed. If not then:
<lukasz> $ sudo apt-get install python-django
<lukasz> will do the trick.
<lukasz> btw, if I'll be going too fast or something is unclear do not hesitate to ask
<lukasz> This is last stable version of Django. All documentation for it can be found at http://docs.djangoproject.com/en/1.2/ .
<lukasz> Now it's time to start coding. Or at least start working on the project. In the beginning we need to create a Django project. This something which, in theory, should be connected to the site.
<lukasz> For the purpose of this tutorial we'll build simple web application, we'll use most bits of Django. Our app will be partial Twitter/status.net clone.
<lukasz> All code for this project is accessible at https://launchpad.net/twitbuntu, you can either download it and look at revisions which moves app forward in (almost) the same way as this session is planned or you can only follow irc session as all required code will be presented here.
<lukasz> So, the first step is to create Django project:
<lukasz> $ django-admin startproject twitbuntu
<lukasz> $ cd twitbuntu
<ClassBot> hugohirsch asked: will the sources be available somewhere later? (in case I'm not fast enough to get a database up'n'running)
<lukasz> Yes, as I mentioned earlier the code is already on Launchpad
<lukasz> Project is container for database connection settings, your web server and stuff like that.
<lukasz> Now twitbuntu contains some basic files:
<lukasz> - manage.py: you'll use this script to invoke various Django commands on this project,
<lukasz> - settings.py: here are all settings connected to your project,
<lukasz> - urls.py: mapping between urls of your application and Python code, either created by you or already existing
<lukasz> and the last one
<lukasz> - __init__.py: which marks this directory as Python package
<lukasz> Next is setting up the database
<lukasz> Open settings.py file in your favourite text editor.
<lukasz> For purpose of this tutorial we'll use very simple sqlite database, it holds all of its data in one file and doesn't require any fancy setup. Django can of course use other databases, MySQL and PostgreSQL being most popular choices.
<lukasz> Modify your file so that DATABASE setting looks exactly like this: http://pastebin.ubuntu.com/575582/
<lukasz> To test that those settings are correct we'll issue syncdb management command. It creates any missing tables in the database which in our case is exactly what we want to get:
<lukasz> $ ./manage.py syncdb
<lukasz> If everything went right you should see bunch of "Creating table" messages and query about creating superuser. We want to be able to administer our own application so it's good to create one. Answer yes to first question and proceed with others
<lukasz> My answers to those questions are:
<lukasz> (just if anybody wonders)
<lukasz> Would you like to create one now? (yes/no): yes
<lukasz> Username (Leave blank to use 'lukasz'): admin
<lukasz> E-mail address: admin@example.com
<lukasz> Password: admin
<lukasz> Password (again): admin
<lukasz> Email address is not too important at that stage
<lukasz> later you can configure Django to automatically receive crash reports on that address, but that's something bit more advanced.
<lukasz> Next bit is to create an application, something where you put your code.
<lukasz> By design you should separate different site modules into their own applications, that way it's easier to maintain it later and also if you create something which can be usable outside of your project you can share it with others without necessary putting all of your project out there.
<lukasz> It's pretty popular in Django community, so it's always good idea to check somebody already haven't created something useful. That way you can save yourself reinventing the wheel.
<lukasz> For this there's startapp management command
<lukasz> $ ./manage.py startapp app
<lukasz> In this simple case we're calling our application just 'app', but normally it should be called something more descriptive. Something like 'blog', 'gallery', etc. In out case, it could be called 'updates'.
<lukasz> This creates an 'app' directory in your project. Inside of it there are files created for you by Django.
<lukasz> - models.py: is where your data model definitions go,
<lukasz> - views.py: place to hold your views code.
<lukasz> Some short clarification with naming.
<lukasz> Django is (sort of) Model/View/Controler framework
<lukasz> The idea is that your application into separate layers. But in case of Django the naming of the standard and what creators did is bit confusing
<lukasz> Models are called as they should.
<lukasz> Views are templates in Django
<lukasz> and Controllers are called view functions.
<lukasz> ok, quick break for questions
<ClassBot> wolfrage76 asked: Is it possible to setup Django to use more than one database, for different sections of the site? For instance SQlite as default for the site, but MySQL for the forums?
<lukasz> wolfrage76: Yes, you can do that. The details (as this is bit more advanced topic) are in the documentaion.
<ClassBot> abhinav asked: what is a superuser ? a database admin ?
<lukasz> abhinav: it's an admin for whole web application, it's separate from database administrator
<lukasz> abhinav: basically, this user can access Django admin and do anything there
<lukasz> continuing
<lukasz> First layer are models, where data definitions lies. That's the thing you put into models.py file. You define objects your application will manipulate.
<lukasz> Next bit is to add this new application to list of installed apps in settings.py, that way Django knows from which parts your project is assembled.
<lukasz> In settings.py file find variable named INSTALLED_APPS
<lukasz> Add to the list: 'twitbuntu.app'
<lukasz> It should look like that:
<lukasz>    INSTALLED_APPS = (
<lukasz>      'django.contrib.auth',
<lukasz>      'django.contrib.contenttypes',
<lukasz>      'django.contrib.sessions',
<lukasz>      'django.contrib.sites',
<lukasz>      'twitbuntu.app',
<lukasz>    )
<lukasz> or pastebin: http://pastebin.ubuntu.com/575583/
<lukasz> You can see that there are already things here, mostly things which give your project some out-of-the-box funcionality
<ClassBot> chadadavis asked: judging by the tables created, users and authentication are built in. I.e. it doesn't require any external modules (as Catalyst does)?
<lukasz> chadadavis: yes, the authentication is build in
<lukasz> Names are pretty descriptive so you shouldn't have problem with figuring out what each bit does
<lukasz> although contenttypes and sites can be bit confusing
<lukasz> as those are bits of underlying machinery required by most of the other django addons
<ClassBot> chadadavis asked: my settings.py also has 'django.contrib.messages' (Natty). Is that going to cause any problems?
<lukasz> chadadavis: not a problem
<lukasz> all the defaults are good to go
<lukasz> Now we start making actual application. First thing is to create model which will hold user updates. Open file app/models.py
<lukasz> You define models in Django by defining classes with special attributes. That can be  translated by Django into table definitions and create appropriate structures in database.
<lukasz> For now add following lines to the end of the models.py file: http://paste.ubuntu.com/575584/
<lukasz> Now some explanations. You can see that you define model attributes by using data types defined in django.db.models module
<lukasz> Full list of types and options they can take is documented here: http://docs.djangoproject.com/en/1.2/ref/models/fields/#field-types
<lukasz> ForeignKey bit links our model with User model supplied by Django that way we can have multiple users having their updated on our site
<lukasz> class Meta bit is place for settings for whole model. In this case we are saying that whenever we'll get list of updates we want them to be ordered by create_at field in ascending order (by default order is descending, and '-' means reversing that order).
<lukasz> Now we have to synchronize data definition in models.py with what is in database. For that we'll use already known command: syncdb
<lukasz> $ ./manage.py syncdb
<lukasz> You should get following output:
<lukasz> Creating table app_update
<lukasz> Installing index for app.Update model
<lukasz> As you can see each table name have two parts: the app name and model name.
<lukasz> Great thing about Python is it's interactive shell. You can easily use it with Django.
<lukasz> But because of bit of setup django requires there's a shortcut of setting up proper environment within your project
<lukasz> $ ./manage.py shell
<lukasz> This runs interactive shell configured to work with your project. From here we can play with our models and create some updates.
<lukasz> first we get the user we created when first running syncdb
<lukasz> >>> from django.contrib.auth.models import User
<lukasz> >>> admin = User.objects.get(username='admin')
<lukasz> Here 'admin' is whatever you've chosen when asked for admin username.
<lukasz> First thing is to get hold to our admin user, because every update belongs to someone. You can see that we used 'objects' attribute of model class.
<lukasz> >>> from twitbuntu.app.models import Update
<lukasz> >>> update = Update(owner=admin, status="This is first status update")
<lukasz> At that point we have instance of the Update model, but it's not saved in the database you can see that by checking update.id attribute
<lukasz> Currently it's None
<lukasz> but when we save that object in the database
<lukasz> >>> update.save()
<lukasz> the update.id attribute has a value
<lukasz> >>> udpate.id
<lukasz> 1
<lukasz> That's only one of many ways to create instances of the models, this one is the easiest one.
<lukasz> When we have some data in the database there's time to somehow display it to the user.
<lukasz> First bit for a view to work is to tell Django for which url such view should respond to.
<lukasz> For that we have to modify urls.py file.
<lukasz> Open it and add following line just under line with 'patterns' in it, so whole bit should look like that:
<lukasz> urlpatterns = patterns('',
<lukasz>     (r'^$', 'twitbuntu.app.views.home'),
<lukasz> )
<lukasz> First bit there is regular expression for which this view will respond, in our case this is empty string (^ means beginning of the string and $ means end, so there's nothing in it), second bit is name of the function which will be called.
<lukasz> Now open app/views.py file. Here all code responsible for responding to users' requests will live.
<lukasz> First bit is to import required bit from Django:
<lukasz> from django.http import HttpResponse
<lukasz> Now we can define our (very simple) view function:
<lukasz> def home(request):
<lukasz>     return HttpResponse("Hello from Django")
<lukasz> As you can see every view function has at least one argument, which is request object
<lukasz> It contains lots of useful information about request, but for our simple example we'll not use it.
<ClassBot> chadadavis asked: Is that an instance of the *model* or a record in the update table?
<lukasz> chadadavis: both
<lukasz> saved instances are records in the database
<lukasz> but you access all data on that record as convenient python attributes on that object
<lukasz> After that we can start our app and check if everything is correct, to do that run:
<lukasz> $ ./manage.py runserver
<lukasz> If everything went ok you should see following output
<lukasz> Validating models...
<lukasz> 0 errors found
<lukasz> Django version 1.2.3, using settings 'twitbuntu.settings'
<lukasz> Development server is running at http://127.0.0.1:8000/
<lukasz> Quit the server with CONTROL-C.
<lukasz> Now you can access it at provided url
<lukasz> What you should see is "Hello from Django" text.
<lukasz> any questions/problems/comments?
<lukasz> continuing
<lukasz> It would be nice to be able to log in to our own application, fortunately Django already has required pieces inside and only thing left for us is to hook them up.
<lukasz> Add following two lines to the list of urls:
<lukasz> (r'^accounts/login/$', 'django.contrib.auth.views.login'),
<lukasz> (r'^accounts/logout/$', 'django.contrib.auth.views.logout'),
<lukasz> Next we need to create template directory and enter it's location in settings.py file
<lukasz> $ mkdir templates
<lukasz> In settings.py file find TEMPLATE_DIRS setting:
<lukasz> import os
<lukasz> TEMPLATE_DIRS = (
<lukasz>     os.path.join(os.path.dirname(__file__), 'templates'),
<lukasz> )
<lukasz> This will ensure that Django can always find the template directory even if current working directory is not the one containing application (for example when run from Apache web server).
<lukasz> Next is to create registration dir in templates directory and put there login.html file with following content: http://paste.ubuntu.com/575631/
<lukasz> Last bit is to set up LOGIN_REDIRECT_URL in settings.py to '/':
<lukasz> LOGIN_REDIRECT_URL = '/'
<lukasz> That way after login user will be redirected to '/' url instead of default '/accounts/profile' which we don't have.
<lukasz> Now getting to http://127.0.0.1:8000/accounts/login should present you the login form and you should be able to log in to application.
<lukasz> Now it's time to use information about logged in user in our view.
<lukasz> Django provides very convenient way of accessing logged in user by adding 'user' attribute to request object.
<lukasz> It's either model instance representing logged in user or instance of AnonymousUser class which have same interface as model.
<lukasz> Easiest way distinguishing between them is by using user.is_authenticated() method
<lukasz> Modify our home view function so it looks like that: http://paste.ubuntu.com/575585/
<lukasz> That way logged in users will be greeted and anonymous users will be sent to login form. You should see "Hello username" at http://127.0.0.1:8000/
<lukasz> Using that information we can build a functionality to restrict access to some parts of an application.
<lukasz> Fortunately Django already has a lot of stuff build for that purpose.
<lukasz> Add following line to the top of the views.py file:
<lukasz> from django.contrib.auth.decorators import login_required
<lukasz> This decorator does exactly what we have done manually but it's less code which doesn't hides what this view is doing, now we can shorten it to: http://paste.ubuntu.com/575586/
<lukasz> Test view in your browser, nothing should have changed
<lukasz> Now when we have reliable way of getting to the user instance we can return all user's updates.
<lukasz> When creating an Update model we have used ForeignKey type, this connects two models together.
<lukasz> Later when we've created updates we used user instance as value of this attribute.
<lukasz> That's one way of accessing this data (every update has owner attribute).
<lukasz> Due to usage of ForeignKey pointing to User model every instance of it got also update_set attribute which contains every update which is assigned to this user.
<lukasz> Clean way of getting all user updates is:
<lukasz> >>> admin.update_set.all()
<lukasz> [<Update: Update object>]
<lukasz> But we can also get to the same information from Update model:
<lukasz> >>> Update.objects.filter(owner=admin)
<lukasz> (btw, those are only examples, you don't have to type them)
<lukasz> Both of those will return the same data, but the first one is cleaner.
<lukasz> That's just a very simple example of getting data from the database.
<lukasz> Django's functionality in that regard is way more sophisticated, but we don't have time now to dive into that.
<lukasz> Now when we know how to get to necessary data we can send it to the browser by modifying home function: http://paste.ubuntu.com/575587/
<lukasz> Here we set the content type of the response to text/plain so we can see angle brackets in the output, without that, by default, browser would hide it.
<lukasz> Now, when we have data we can work on spicing it up a little. For that we'll use templates.
<lukasz> Templates in Django have it's own syntax, it's really simple as it was created for designers, people not used to programming languages.
<lukasz> We already have templates configured due to requirements of auth system, so it will be very easy to get started.
<ClassBot> hugohirsch asked: I'm too slow to follow .... get an error msg: TemplateDoesNotExist at /accounts/login/. Looking for a file in /home/hirsch/twitbuntu/templates/registration/login.html - how can I remove the registration thing?
<lukasz> hugohirsch: sorry for being too fast
<lukasz> basically you can't, that's hardcoded in the auth application itself
<lukasz> that's how the templates are looked up, usually they are specified as apptemplatedir/templatename.html
<lukasz> so registration templates are in registration/ directory
<lukasz> admin templates land in admin/ dir, etc
<lukasz> Any other problems?
<lukasz> I'll gladly help to resolve any issues
<ClassBot> There are 10 minutes remaining in the current session.
<lukasz> ok, continuing
<lukasz> Now we need a file for a template
<lukasz> create template/home.html and put following content in it: http://paste.ubuntu.com/575588/
<lukasz> Every tag in Django templates language is contained between {% %} elements and also ending of every opening thing is done by adding end(thing) to the end (like endfor in that case).
<lukasz> To output content of the variable we're using {{ }} syntax.
<lukasz> Also we can use something called filters by using | to pass value through the named filter. We're using that to format date to nice text description of time passed.
<lukasz> That's template, now let's write view code to use it.
<lukasz> There's very convenient function when using templates in views: render_to_response
<lukasz> add following line to the top of the view.py file
<lukasz> from django.shortcuts import render_to_response
<lukasz> This function takes two arguments: name of the template to render (usually it's file name) and dictionary of arguments to pass to template. Having this in mind our home view looks like that: http://paste.ubuntu.com/575589/
<ClassBot> There are 5 minutes remaining in the current session.
<lukasz> Now running $ ./manage.py runserver you can see that page in the browser has proper title
<lukasz> I guess we don't have enough time for the rest of the things I've planned
<lukasz> we'll stop here
<lukasz> Are there any questions?
<lukasz> ok, going forward, going fast
<lukasz> It would be really nice to be able to add status updates from the web page. For that we need a form. There are couple ways of doing that in Django, but we'll show a way which is most useful for forms which are used to create/modify instances of the models.
<lukasz> By convention form definitions goes to forms.py file in your app directory. Put following bits in there: http://paste.ubuntu.com/575590/
<lukasz> This is very simple form which has only one field in it.
<lukasz> Now in views.py we need to instantiate this form and pass it to the template. After modifications this file should look like this: http://paste.ubuntu.com/575591/
<lukasz> One thing which is new here, the RequestContext thing. This is connected to automatic CSRF (cross site request forgery) protection, which Django enables by default. Basically it provides templates with richer set of accessible data from which we'll going to use only csrf_token tag.
<lukasz> Last bit is to display this form in template. Add this bit just after <body> tag:
<lukasz> http://paste.ubuntu.com/575650/
<lukasz> Now when we have form properly displayed it would be useful to actually create updates based on the data entered by the user. That requires little bit of work inside our home view. Fortunately this is pretty straightforward to do: http://paste.ubuntu.com/575594/
<lukasz> First thing is to check weather we're processing POST or GET request, if POST that means that user pressed 'Update' button on our form and we can start processing submitted data.
<lukasz> All POST data is conveniently gathered by Django in a dictionary in request.POST. For this case it's not really critical to know what exactly is send, UpdateForm will handle that. Bit with instance= is to automatically set update owner, without that form would not be valid and nothing would be saved in the database.
<lukasz> Checking if form is valid is very simple, just invoke .is_valid() method on it. If True is returned then we're saving the form to the database, which returns Update instance. It's not really needed anywhere but I wanted to show you that you can do something with it.
<lukasz> Last bit is to create empty form, so that Status field will be clear, ready for next update.
<lukasz> If you try to send update without any content you'll see that there's an error message displayed 'This field is required'. All of that is automatically handled by forms machinery.
<lukasz> It's nice to be able to see our own status updates but currently it's only viewable by logged user.
<lukasz> but that's a homework
<lukasz> or a thing to look into existing code
<lukasz> thank you for your attention :)
<ClassBot> Logs for this session will be available at http://irclogs.ubuntu.com/2011/03/04/%23ubuntu-classroom.html following the conclusion of the session.
* ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - https://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Questions in #ubuntu-classroom-chat || Event: Ubuntu Developer Week - Current Session: Getting started with daily builds in Launchpad - Instructors: Quintasan
<Quintasan> Thanks lukasz!
<Quintasan> So, hi there people. My name is MichaÅ ZajÄc I am a Kubuntu Developer, MOTU and leader of (not famous yet :) Project Neon.
<Quintasan> and today I will be talking about Recipes (or Source Builds)  in Launchpad
<Quintasan> We are going to use pbuilder and Launchpad and you should already have those thing if you were at  "Getting Started with Development" by dholbach
<Quintasan> I think most people have an idea what {daily,weekly,montly} builds are, if not then here's a quick explanation: we grab code from code repository the project uses, build it and release it as packages
<Quintasan> You probably get the idea that doing that manually every day would be a little annoying at least so our ingenious Launchpad developers introduced the Recipes feature so we can focus more on testing that on writing complicated scripts or doing the builds by hand
<Quintasan> Why should you bother with setting up source builds? Well, testing bleeding edge software goes faster because the packages are very quickly available
<Quintasan> Getting testers is easier too because they just add a PPA instead of compiling the whole source themselves
<Quintasan> Any questions so far?
<Quintasan> Okay, so let's get proceed.
<Quintasan> What do you need to do, to set up your daily builds on Launchpad?
<Quintasan> 1. You need to have your source code on Launchpad (either use code.launchpad.net for developing or request a source import)
<Quintasan> 2. Write a recipe
<Quintasan> 3. Test build it locally (we don't want to stuff Launchpad with failing builds, do we?)
<Quintasan> 4. Upload and trigger the recipe
<Quintasan> Well, I forgot, you also need to have a working packaging for that certain software, that is very important
<Quintasan> So now we're going through steps 2 and 3 beacuse they are essential and setting up a recipe is really easy so I will show that later
<Quintasan> So, go to you working directory and do
<Quintasan> bzr branch lp:~neon/project-neon/kdewebdev-ubuntu
<Quintasan> That's our packaging branch for kdewebdev module, and it's responsible for getting our code compiled and put into packages
<Quintasan> and if you go to
<Quintasan> https://code.launchpad.net/~neon/kdewebdev/trunk
<Quintasan> You can see the already imported code from KDE to Launchpad which we are going to use to get a source build of kdewebdev
<Quintasan> Now we are going to write a recipe, so fire up your favorite text editor
<Quintasan> and paste in the following
<Quintasan> # bzr-builder format 0.2 deb-version 2+svn{date}+r{revno}-{revno:packaging}
<Quintasan> lp:~neon/kdewebdev/trunk
<Quintasan> nest packaging lp:~neon/project-neon/kdewebdev-ubuntu debian
<Quintasan> The first line tells bzr builder how is the versioning of the package going to look
<Quintasan> the stuff between { and } is going to expand to
<Quintasan> {date} to date - like 20110301
<Quintasan> {revno} to revision number of the source so it's also going to be a number like 1677
<Quintasan> and {revno:packaging} will be substituted with the revno for the branch named packaging in the recipe.
<Quintasan> lp:~neon/kdewebdev/trunk <--- this tells the builder to grab the source from ~neon/kdewebdev/trunk branch
<Quintasan> abhinav: the recipe file can have any name, though I usually name it <project>.recipe
<Quintasan> nest packaging lp:~neon/project-neon/kdewebdev-ubuntu debian
<Quintasan> This line places our packaging in source directory in debian/
<Quintasan> Please note that the lp:~neon/project-neon/kdewebdev-ubuntu doesn't have debian folder but it's contents
<Quintasan> Otherwise the packaging would land under ./debian/debian and LP wouldn't be able to build it
<Quintasan> Now save the file and we are going to test build it
<Quintasan> Launch a terminal and go the the directory where you saved the recipe file
<Quintasan> make another directory called "build" for example
<Quintasan> hmm, we are actually going to need bzr-builder
<Quintasan> sudo apt-get install bzr-builder
<Quintasan> should install it
<Quintasan> Any questions so far?
<Quintasan> Well, moving on, assuming you have a working pbuilder we have to make a small change to sources.list inside it so we can build it as it pull project-neon libs. Be sure to revert the change after the session
<Quintasan> sudo pbuilder --login --save-after-login <--- that will login into you pbuilder chroot and save any changes you made after exiting
<Quintasan> you will have to add two entries to /etc/apt/sources.list inside your pbuilder
<Quintasan> so open it up for editing and paste
<Quintasan> deb http://ppa.launchpad.net/neon/ppa/ubuntu natty main
<Quintasan> deb-src http://ppa.launchpad.net/neon/ppa/ubuntu natty main
<Quintasan> substitue natty for maverick if you have a maverick pbuilder
<Quintasan> save the file and exit the pbuilder
<Quintasan> sorry, if you do not use pbuilder hooks then do "apt-get update" after adding the entries
<Quintasan> now, back to the recipe directory
<Quintasan> issue the following command
<Quintasan> bzr dailydeb <your recipe file> <build directory we created earlier>
<Quintasan> here it looks like: bzr dailydeb kdewebdev.recipe build
<Quintasan> What it is going to is to grab the source code, stuff the packaging inside it and create a dsc file which you can build with pbuilder
<Quintasan> after it finishes it work you can build it with pbuilder like this
<Quintasan> sudo pbuilder --build build/*.dsc
<Quintasan> I just finished building it and it should work for you too.
<Quintasan> now that we know the recipe is working we can put it up on Launchpad
<Quintasan> To be able to use Recipes you need to add your launchpad account into Recipe beta users team
<Quintasan> https://launchpad.net/~launchpad-recipe-beta
<Quintasan> It's an open team so anyone can join
<Quintasan> Now what we want to do is to go to the branch with the source code which we are going to use for daily building
<Quintasan> https://code.launchpad.net/~neon/kdewebdev/trunk
<Quintasan> in this case
<Quintasan> If you joined the recipe beta users team you should see "1 recipe using this branch."
<Quintasan> clicking the "1 recipe" link will redirect you to https://code.launchpad.net/~neon/+recipe/project-neon-kdewebdev
<Quintasan> You can see Latest builds section and Recipe contents which contains the exact recipe I gave you
<Quintasan> As you can see there are some successful build
<Quintasan> +s
<Quintasan> Now if you were setting a new daily build then you would click the "Create packaging recipe" button on https://code.launchpad.net/~neon/kdewebdev/trunk
<ClassBot> There are 10 minutes remaining in the current session.
<Quintasan> Set the description and Name fields to you liking
<Quintasan> The Owner field says who can manage the recipe in Launchpad
<Quintasan> The Built daily field has a nice explanation under it: Automatically build each day, if the source has changed.
<Quintasan> And we have to select to which PPA we are going to push the packages
<Quintasan> You can use an existing one or create a new one
<Quintasan> Later you can set the series for which the package will be built, like natty, maverik, lucid and so on up to Dapper
<Quintasan> In the last field you paste the recipe you wrote and click Create Recipe
<Quintasan> You should be redirected to you recipe page where you can manually trigger the first build by pressing the Request build(s) link under Latest builds section
<ClassBot> There are 5 minutes remaining in the current session.
<Quintasan> If you did everything correctly then it should start building and place the resulting packages in selected PPA
<Quintasan> I'm done, you can find more information about Source Builds at Launchpad Help -> https://help.launchpad.net/Packaging/SourceBuilds
<Quintasan> You can also find me on #project-neon and #kubuntu-devel channels if you need more explanations
<Quintasan> Oh, and there is also a list (not full probably) of existing Daily Builds that are set up on Launchpad
<Quintasan> you can find it on -> https://wiki.ubuntu.com/DailyBuilds/AvailableDailyBuilds
<Quintasan> Well, we are almost out of time and I'm already done, if you have any questions then ask them in #ubuntu-classroom-chat or find me on the channels I mentioned
<Quintasan> Thanks for listening, hope to see some new builds after this session
<yofel> here's a more complete list: https://code.launchpad.net/+daily-builds which shows all existing daily build recipes
* ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - https://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Questions in #ubuntu-classroom-chat || Event: Ubuntu Developer Week - Current Session: Project Lightning Talks - Instructors: stgraber, UndiFineD, kirkland, AlanBell, mhall119, jderose, yofel, Quintasan
<ClassBot> Logs for this session will be available at http://irclogs.ubuntu.com/2011/03/04/%23ubuntu-classroom.html following the conclusion of the session.
<nigelb> ok, hello again!
<nigelb> This time we're having somethign special for Ubuntu Developer Week
<nigelb> We're going to close with project lightning talks
<nigelb> We have a few people going to come on and talk about their project for about 5 minutes
<nigelb> They will tell you all about it and how you can help them with the project
<nigelb> First up is stgraber!
 * stgraber waves
<nigelb> He'll talk to you abour arkrose
<nigelb> All yours stgraber :)
<stgraber> Hey everyone !
<stgraber> So I just wanted to quickly introduce you to a pet project of mine called arkose
<stgraber> Arkose's goal is to do sandboxing of desktop applications
<stgraber> with it you can easily start any binary in a sandbox and choose what kind of acces it has
<stgraber> this includes, forcing it to use an overlay file system (aufs), block network access or block the possibility to access the X server
<stgraber> the project itself can be found at https://launchpad.net/arkose
<stgraber> I also blogged about it here: http://www.stgraber.org/category/arkose/
<stgraber> it's in the archive for natty
<stgraber> and is included by default in Edubuntu
<stgraber> it's made of 3 different packages
<stgraber>  - arkose (command line tool)
<stgraber>  - arkose-gui (similar to the Run dialog in gnome except it starts everything in a container)
<stgraber>  - arkose-nautilis (lets you start any binary in a sandbox)
<stgraber> the sandboxing itself is done using some new flags of the clone() command, similar to what lxc (https://lxc.sf.net) does (except lxc does it for a full system)
<ClassBot> chadadavis asked: Can you restrict what libraries and what versions it has access too?
<stgraber> by default it just uses an aufs overlay so it has the exact same packages as your system, though you can call dpkg in the sandbox to install/remove/upgrade/downgrade packages
<stgraber> it's ideal when you want to run some untrusted binary (game or similar)
<stgraber> ok, I guess I'm done ;) next !
<UndiFineD> :)
<nigelb> w00t w00t
<nigelb> thanks stgraber
<nigelb> Next we have UndiFineD!
<nigelb> Stage's yours UndiFineD :)
<UndiFineD> Hello everyone,
<UndiFineD> I welcome you all for this short introduction to SpeechControl.
<UndiFineD> If you have questions, please wait a while, I will be brief, thank you.
<UndiFineD> This project started in November 2010 with a vision from wiki.ubuntu.com/hajour. I am Keimpe de Jong, better known as wiki.ubuntu.com/UndiFineD and her partner. We have 4 girls with either a form of AD(H)D, Dyslexia or poor sight.
<UndiFineD> SpeechControl is an accessibility project. wiki.ubuntu.com/SpeechControl It aims to make controlling your computer easier. In the distant future we hope to reach Star Trek like capabilities.
<UndiFineD> How it began ...
<UndiFineD> We began by writing capable people in this area, explaining hajour her vision and asked if they would be willing to contribute to it. Then we asked to be placed under the accessibility team and ubuntu beginners team flags.
<UndiFineD> Ubuntu Accessibility
<UndiFineD> Ubuntu Beginners Team
<UndiFineD> And the roundup of currently capable developers with an interest amazed us. We are grateful for all our team members that help us and we welcome new ones with open arms.
<UndiFineD> Key features:
<UndiFineD> Speech recognition: Using the available tools at our disposal, SpeechControl will be able to comprehend your spoken word.
<UndiFineD> Preconfigured Command Execution: knowing what to do what you ordered it to.
<UndiFineD> Virtual Assistant: Repetitive task guidance improve for faster and smoother process execution.
<UndiFineD> Speech Synthesis: More commonly known at TTS (Text-To-Speech), the voice that communicates with the end-user will be as natural and inviting as technology permits.
<UndiFineD> So how is this done ?
<UndiFineD> After some research we found Simon to currently be the best capable open source software capable in controlling a computer. www.Simon-Listens.org
<UndiFineD> Simon is / was not in the Debian repositories, due to licensing issues. We believe that is cleared up by now and Debian can take on Simon, as it uses the same license type as SSH.
<UndiFineD> So what is left to be done ?
<UndiFineD> Well there are several disabilities, and we wish to make it good for everyone. In order to do that we need to:
<UndiFineD> extend Simon (API work),
<UndiFineD> talk to all the system busses (dbus, at-spi2, ...),
<UndiFineD> analyse Speech-to-text and make some context (Wintermute),
<UndiFineD> execute commands based upon input given,
<UndiFineD> help to reduce repeating work,
<UndiFineD> communicate back to the user (via Text-to-Speech).
<UndiFineD> Blueprints:
<UndiFineD> A lot of blueprints need work, we would love to gather all your input and make things better.
<UndiFineD> Request come in for simple but related tasks, like remind a user to take their medicine, or read out an e-book.
<UndiFineD> Besides this, it bothered us we could not properly have an accessible meeting. So there is work being done on a Speech capable chatcliÃ«nt plugin.
<UndiFineD> The possibilities are open and endless, and would make using your computer so much easier. To prevent a wild bloom of small projects, our team currently focuses on specifying blueprints and defining the path to take. Our initial goal is a proof of concept and optimize later on.
<UndiFineD> Progress:
<UndiFineD> In a few months good work has been done;
<UndiFineD> the team is slowly growing and could use extra help writing specifications. After that we will develop all the libraries and applications.
<UndiFineD> If you would like to learn more feel free to come and visit us on #SpeechControl read more about us
<UndiFineD> on wiki.ubuntu.com/SpeechControl our team is located here: launchpad.net/~speechcontrolteam
<UndiFineD> I would like to thank everyone in our team, for the great work they have done so far.
<UndiFineD> If you have questions feel free to ask them now, but for the sake of the sessions I recommend longer talks to be held in #SpeechControl.
<nigelb> Thanks UndiFineD for the wonderful talk
<nigelb> That was loaded with information
<nigelb> Next up, we have AlanBell.  He's going to talk about a bot he's written
<AlanBell> yay
<AlanBell> Ubuntu project communication happens in meetings, lots of them
<AlanBell> mostly in the #ubuntu-meeting channel and there is a bot in there which kinda records meetings a bit
<AlanBell> however normally someone ends up writing up a summary minutes and emailing it out or adding to the wiki
<AlanBell> taking minutes is a dull and menial task, and rather an undignified thing to expect a human to do
<AlanBell> I believe that the post-meeting procedure should be copy-paste-done
<AlanBell> the bot should make nicely formatted minutes
* lindbohm.freenode.net changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - https://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Questions in #ubuntu-classroom-chat || Event: Ubuntu Developer Week - Current Session: Getting started with daily builds in Launchpad - Instructors: Quintasan
<AlanBell> so, I wrote a little extension to the existing mootbot
<AlanBell> which is available in some channels as mootbot-UK
<AlanBell> and then I rewrote the thing based on a debian fork which is a python supybot bot
<AlanBell> which is here now
<AlanBell> #startmeeting
<meetingology> Meeting started Fri Mar  4 20:17:25 2011 UTC.  The chair is AlanBell. Information about MeetBot at http://wiki.ubuntu.com/AlanBell.
<meetingology> Useful Commands: #topic #action #link #idea #voters #vote #chair #action #agreed #help #info #endmeeting.
<MootBot> Meeting started at 14:17. The chair is AlanBell.
<MootBot> Commands Available: [TOPIC], [IDEA], [ACTION], [AGREED], [LINK], [VOTE]
<AlanBell> do feel free to talk here, the channel has been unmuted
<maco> do the mootbot versus mootbot-uk changes include en_US versus en_GB?
<AlanBell> #topic do the mootbot versus mootbot-uk changes include en_US versus en_GB
<meetingology> TOPIC: do the mootbot versus mootbot-uk changes include en_US versus en_GB
<AlanBell> interesting question maco, there has been some translation activity done on mootbot, I think there is a hebrew port of it now
<AlanBell> I don't think I mentioned programmes or colours in the messages it says anywhere
<AlanBell> you can do funky stuff with this like multiple chairs
<AlanBell> #chair maco
<meetingology> Current chairs: AlanBell maco
<AlanBell> you can use [topic] syntax or #topic it doesn't matter
<maco> should make use of that in meetings where the chair has to leave before discussion eneds
<AlanBell> yup
<AlanBell> there is an awesome new feature in votes too
<nigelb> oh, I like the chair functionality
<AlanBell> #voters AlanBell maco nigelb
<meetingology> Current voters: AlanBell maco nigelb
<nigelb> that helps a lot for the council meetings
<AlanBell> #vote this house declares cake to be the food of the gods
<meetingology> Please vote on: this house declares cake to be the food of the gods
<meetingology> Public votes can be registered by saying +1, +0 or -1 in channel, (private votes don't work yet, but when they do it will be by messaging the channel followed by +1/-1/+0 to me)
<AlanBell> +1
<meetingology> +1 received from AlanBell
<nigelb> -1 chocolate!
<Quintasan> +1
<nigelb> -1
<meetingology> -1 received from nigelb
<AlanBell> nigelb: you just found a bug!
<nigelb> I did!
<AlanBell> someone else try to vote please
<Quintasan> +1
<nigelb> he isn't a voter
<mhall119> -0
<AlanBell> oh Quintasan sucks to be you, your vote doesn't count!
<maco> neat!
<Quintasan> :<
<AlanBell> #endvote
<meetingology> Voting ended on: this house declares cake to be the food of the gods
<meetingology> Votes for:1 Votes against:1 Abstentions:0
<meetingology> Deadlock
 * maco will need to remember that for RMB meetings
<nigelb> but do we use it in -meeting yet?
<AlanBell> so this is a supybot plugin, the idea is that it could be incorporated into the regular channel bots which run on the same framework
<AlanBell> so every channel just grows meeting facilities
<nigelb> w00t, that rocks
<AlanBell> and it could replace the bot in -meeting
<mhall119> when will it integrate with loco-directory meetings?
<AlanBell> I need some help
<AlanBell> mhall119: patches welcome!
<mhall119> :)
<AlanBell> and yes, I need to get back into hacking it further
<nigelb> there ya go, so if anyone wants to help AlanBell, help integrate it with LD \o/
 * mhall119 recommends nigelb 
<AlanBell> code is here https://code.launchpad.net/~ubuntu-bots/ubuntu-bots/meetingology
<nigelb> I knew you'd do that.  I'll probably take a look ;)
<AlanBell> and I am quite approachable, come poke me if you want to have a play with it
<AlanBell> #endmeeting
<meetingology> Meeting ended Fri Mar  4 20:23:51 2011 UTC.  Information about MeetBot at http://wiki.ubuntu.com/AlanBell . (v 0.1.4)
<meetingology> Minutes:        http://mootbot.libertus.co.uk/ubuntu-classroom/2011/ubuntu-classroom.2011-03-04-20.17.moin.txt
<nigelb> and there is the log feature which I loove!
<AlanBell> thanks for your time everyone, the minutes of this meeting are at https://wiki.ubuntu.com/AlanBell/mointesting
<Quintasan> cool
<AlanBell> post meeting procedure completed!
<nigelb> That was fun playing with the bot AlanBell
<nigelb> Thank you for it.
<nigelb> Next up is mhall119! He's going to talk about XDG Launcher \o/
<nigelb> All yours mhall119 :)
<mhall119> yay!
<mhall119> XDG Launcher is very simple, you give is a menu path, and it gives you a panel full of launchers from that menu
<mhall119> you can see it running against /Games here: http://img718.imageshack.us/i/xdglauncher.png/
<mhall119> as far as panels go, it's about as simple as they come, there's no transparency, no auto-hide, no gradients
<mhall119> xdg-launcher was developed for the Qimo linux desktop (which I also made)
<mhall119> http://qimo4kids.com/
<mhall119> as you can see from it's screenshots, it has has a very similar bottom panel http://qimo4kids.com/post/Qimo-20-is-now-available!.aspx
<mhall119> but previously, that panel was static, if you added a new game, you had to manually add it to the panel
<mhall119> that's why I made xdg-launcher, so that when someone adds a game through software center, and that game adds a menu entry, it'll automatically show up in the bottom panel
<mhall119> xdg-launcher is hosted on launchpad: https://launchpad.net/xdg-launcher
<mhall119> and will be part of the Qimo 3.0 release sometime in May
<ClassBot> nigelb asked: What language is it written in?
<mhall119> it's written in Python, and uses GTK and GMenu
<mhall119> it is as light weight and simple as I could make it
<mhall119> Qimo is also developed on launchpad: https://code.launchpad.net/qimo
<mhall119> that's it!
<mhall119> nigelb: next!
<nigelb> mhall119: you have a question!
<mhall119> xdg-launcher isn't in teh repos yet
<mhall119> in fact, it won't be in the repos at all under than name, as I was informed by a MOTU that the xdg- prefix implied that it comes from the XDG project
<mhall119> so future development on it will likely fall under the name qimo-launcher
<mhall119> in fact, there's already a branch by that name under the qimo LP project
<nigelb> thanks mhall119!
<nigelb> next up i jderose
<jderose> okay...
<jderose> dmedia == Distributed Media Library
<jderose> dmedia is the foundation of the Novacut distributed video editor, and the Novacut player
<jderose> But dmedia is an independent component designed to work with any app, for both content creation and content consumption
<jderose> A big goal is getting this important user data out of application-specific silos, into a common freedesktop service
<jderose> Early on I started talking to the Shotwell and PiTiVi developers... they will likely be some of the first dmedia enabled apps (along with the Novacut apps, of course)
<jderose> In a nutshell, dmedia is a simple distributed filesystem
<jderose> The metadata (small) for your *entire* library is stored in CouchDB and synced between *all* your devices
<jderose> dmedia uses desktopcouch (which is awesome, use it for all your apps!), so you get slick UbuntuOne sync, say:
<jderose> Tablet <=> UbuntuOne <=> Workstation
<jderose> However, the files (big) for your entire library certainly wont fit on a device with limited storage, like a phone
<jderose> Or similarly, the files generated by a pro TV or movie production probably wont fit on any single device, not even a big file server
<jderose> And this is where dmedia gets awesome... a given device can contain any arbitrary *subset* of the files (including no files at all)
<jderose> Files are loaded from peers or the cloud as needed
<jderose> Yet as the metadata is always available locally, you can still browse through a huge library as if all those files were actually there
<jderose> Each file has a document in CouchDB, which among other things tracks all the places the file is stored
<jderose> Your personal media files (photos, videos, etc) are treated specially, and dmedia will strive to maintain a configurable level of durability for all your personal files
<jderose> So dmedia knows when it should copy the new videos you shot from your laptop to your workstation, or upload them to the cloud
<jderose> And dmedia also knows when it can safely delete files on a given device to free up space for files currently needed
<jderose> This month's release (dmedia 0.5) will probably be the first that is complete enough to be useful to the end user... so it's an exciting time to join in on the development
<jderose> The dmedia backend is written in Python... currently 6,193 lines of code and docstrings, 6,719 lines of unit tests (I really like unit tests)
<jderose> And the UI is done with HTML5 and JavaScript, talking directly to CouchDB using XMLHttpRequest
<jderose> The project is coordinated on Launchpad - https://launchpad.net/dmedia
<jderose> To learn more, please stop by #novacut on irc.freenode.net!
<jderose> questions?  :)
<jderose> (01:38:15 PM) nigelb: QUESTION: How can we help?
<ClassBot> nigelb asked: How can we help?
<jderose> oops :)
<nigelb> heh
<jderose> well, if your a Python dev, lots of fun stuff there.... and probably the most exciting stuff is for people who a fluent with HTML5/JavaScript...
<jderose> because that what the user sees :)
<jderose> and i think things are getting to the point where you can do really cool things without much work... ui stuff that is
<jderose> and if you know/like CouchDB... you'll fall in love with dmedia pretty quick, i think :)
<jderose> we do monthly releases, so your code will be in users hands quickly
<nigelb> ok, thanks jderose
<nigelb> Great to hear about dmedia
<nigelb> And thanks for making it here today :)
<nigelb> Next up yofel and Quintasan are back again!
<jderose> hehe.. .np... thank you everyone for listening in :)
<nigelb> Over to you guys :)
<Quintasan> Sup, it's me and yofel again
 * yofel waves
<Quintasan> So we are going to talk about Project Neon I mentioned in my Source Builds session, so yofel, what is Project Neon?
<yofel> Project Neon provides Daily Builds of the KDE trunk using the launchpad recipes that Quintasan presented earlier
<Quintasan> Yeah, so basically we grab KDE bleeding edge source code and compile it and put into a PPA so you can experience the awesomeness without compiling it yourslef
<Quintasan> yourself even
<Quintasan> Our technical home is -> https://wiki.kubuntu.org/Kubuntu/ProjectNeon
<Quintasan> If you want to know where to send the beer -> https://launchpad.net/~neon
<Quintasan> The magic used is available at -> https://code.launchpad.net/~neon
<Quintasan> and here are the results -> https://launchpad.net/~neon/+archive/ppa
<Quintasan> We support natty and maverick for now.
<Quintasan> Installing those packages will not break you KDE settings (if you have any) and can peacefully coexist with distro's default KDE version
<Quintasan> It can be used for testing, screencasting, bug fixing, development and so on
<Quintasan> We compiled it with ALL dependencies which we could get so users will get EVERY available feature to test (and probably break their computers ;)
<Quintasan> So, if you ever wanted to give latest KDE a test-drive and you didn't want to compile the whole stuff yourself you can use our packages
<Quintasan> Be sure to drop us a line at #project-neon how did it work
<Quintasan> It's still a work in progress as we are working on daily builds of Amarok
<ClassBot> gmargo2 asked: "peacefullyl coexist"... how do you do that?  A different KDM option?
<Quintasan> Yeah
<yofel> A different KDM option and we install our files in /opt/project-neon
<Quintasan> gmargo: We use an separate X session entry, separate envinronemnt config
<Quintasan> and ofc install stuff to other /opt/project-neon as yofel said
<ClassBot> monish005 asked: which development language?
<Quintasan> monish005: There is no language used, we use Launchpad Daily Builds feature to build the packages
<yofel> if anything we have a few bash utilities, other than that only debian packaging and the recipes
<ClassBot> There are 10 minutes remaining in the current session.
<Quintasan> So, I think we are done, questions and requests welcome at #project-neon
<nigelb> Thank you Quintasan and yofel!
<nigelb> Unfortunately, our last host kirkland couldn't make it
<yofel> when you want to use Project Neon visit our usage instructions on http://techbase.kde.org/Getting_Started/Using_Project_Neon_to_contribute_to_KDE - thanks!
<nigelb> Dustin Kirkland was to talk about project bikeshed
<nigelb> I'll link you to the project
<nigelb> https://launchpad.net/bikeshed
<nigelb> The project is about a bunch of scripts which are helpful, but no one is sure which package they go into
<nigelb> The name of the project is inspired by the very famous color of the bikeshed mail thread
<nigelb> I'll leave you all to explore the package
<nigelb> And with that our project lighting talks come to an end
<nigelb> Thank you stgraber, UndiFineD, AlanBell, mhall119, jderose, yofel, and Quintasan for making this a grand success
<nigelb> We loved listening to your projects and lets all continue to build cool stuff :)
<UndiFineD> thanks for being a good host
<nigelb> :)
<Quintasan> \o/
<ClassBot> There are 5 minutes remaining in the current session.
<nigelb> and, this means... ANOTHER UBUNTU DEVELOPER WEEK HAS COME TO A CLOSE \O/
<jderose> thanks again nigelb, you're one rockin host :)
<yofel> :D
<Quintasan> nigelb++
<ClassBot> Logs for this session will be available at http://irclogs.ubuntu.com/2011/03/04/%23ubuntu-classroom.html
* ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - https://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Questions in #ubuntu-classroom-chat ||
<nigelb> and its over...
<darkdevil666> :(
<nigelb> a few more weeks and we have app developer week and then we'd have open week again
<darkdevil666> :D
<darkdevil666> its not been put up on the schedule list
<darkdevil666> where do i get the schedule?
<darkdevil666> @all: where can i get the next "event week" schedule?
<meetingology> darkdevil666: Error: "all:" is not a valid command.
<Mkaysi> http://is.gd/8rtIi ?
<darkdevil666> thanks Mkaysi. but it dsnt show schedules for app developer week n open week
#ubuntu-classroom 2011-03-05
<AlanBell> nigelb: you are full of awesome
<nigelb> AlanBell: :)
<BigMac> does anyone know when firefox 3.6.15 will be available in the repositories?
<Mkaysi> MichealH:
<Mkaysi> ?lobotomy add #omg!ubuntu!
<Mkaysi> The operation succeeded.
<Mkaysi> MichealH: Is this OK. now?
<em>  /query Mkaysi
<akshatj> Mkaysi, its not funny to impersonate your bot
<Mkaysi> akshatj: Sorry, wrong channel. That just disabled it at #omg!ubuntu!. It's already disabled from ubuntu-* channels.
#ubuntu-classroom 2011-03-06
<jigsaw050488_> is anybody there?
<jmarsden> There is no class now.  See: Upcoming Schedule: http://is.gd/8rtIi
<hyxin> hello,everybody
#ubuntu-classroom 2012-02-28
<mani990> join #ilugc-in
#ubuntu-classroom 2012-02-29
<MiS> hello, could someone indicate if there is an appropriate channel for ubuntu package makers/maintainers?
<pleia2> you want #ubuntu-motu
<MiS> pleia2, thanks
#ubuntu-classroom 2012-03-01
<sompatelli8475> hey guys
<notomalkes> Hi, folks! In what time is the next tutorial scheduled? :)
<notomalkes> Found the schedule, sry for bothering.
<lgw_> hi
#ubuntu-classroom 2013-02-26
<ketan985> Hi lyz , Where can I talk with you on system administration ?
<pleia2> ketan985: you're probably better off asking questions in #ubuntu-server than asking me directly (I'm quite busy this month)
<ketan985> pleia2,  Thanks a lot...
<akpk> How can I use chmod 777 to my newly formated drives ??
#ubuntu-classroom 2013-03-01
<brucegu> ?
#ubuntu-classroom 2013-03-02
* ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - https://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Questions in #ubuntu-classroom-chat || Current Session: Lernid Test Session - Instructors: JoseeAntonioR - Slides: http://is.gd/DIvYE9
<jsjgruber-x> This is a remark--it should be bold
<JoseeAntonioR> wait
<jsjgruber-x> This is a remark--it should be bold
<JoseeAntonioR> nope, it's not
<JoseeAntonioR> like, it's the same as if I would've written it
<JoseeAntonioR> oh, yes, in fact it is
<jsjgruber-x> your message is bold here--I see--you are on the calendar and I think I'm not.
<JoseeAntonioR> your messages are too
<jsjgruber-x> how am I mentioned in the calendar entry>
<jsjgruber-x> >>
<jsjgruber-x> ?
<JoseeAntonioR> helper
<jsjgruber-x> are we both helpers?
<JoseeAntonioR> I am instructor
<JoseeAntonioR> you are helper
<JoseeAntonioR> but both of us are highlighted
<jsjgruber-x> got it, that's good.
<jsjgruber-x> explains everything
<jsjgruber-x> Let me ask a question.
<ClassBot> jsjgruber-l99-p asked: This is a question without a real query
<JoseeAntonioR> great, shows the question in italics
<jsjgruber-x> here it is in italic and bolded, which is the change coalwater contributed
<JoseeAntonioR> hmm nope, here it's only in italics, but not bolded
<jsjgruber-x> right, if you want to see what it looks like you would need to disconnect and connect again with a non faculty non helper userid and then ask a question that I ask classbot to send to the classroom
<JoseeAntonioR> actually, JoseAntonioR is not set as instructor or helper
<jsjgruber-x> ok, then please ask a question and I'll have classbot send it to the classroom
<ClassBot> JoseeAntonioR asked: what's ubuntu
<JoseeAntonioR> nope, still only bolded
<JoseeAntonioR> http://imgur.com/48qyZpy
<jsjgruber-x> not italics and bold?
<jsjgruber-x>  JoseeAntonioR seems to be listed as instructor in the calendar entry (I just looked) do you want to use
<jsjgruber-x>  JoseAntonioR?
<JoseeAntonioR> wait
<JoseeAntonioR> you're asking me to ask from lernid or from my IRC client?
<jsjgruber-x> from lernid using JoseAntonioR, if you don't mind
<ClassBot> JoseAntonioR asked: I am not set as an instructor
<JoseeAntonioR> ok, works now
<jsjgruber-x> bold and italic both?
<jsjgruber-x> coalwater's idea was that you would better see your own question and its owner if it were both bold and italic
<JoseeAntonioR> yep!
<jsjgruber-x> great. now something truely strange
<JoseeAntonioR> go for it
<jsjgruber-x> please--in a terminal:
<jsjgruber-x> touch empty.pdf
<jsjgruber-x> Then please give me the complete name of the file. After I issue the slidefile
<jsjgruber-x> command you should see some error messages, but no traceback.
<JoseeAntonioR> empty.pdf, path to it is /home/joseeantonior/empty.pdf
<jsjgruber-x> [slidefile /home/joseeantonior/empty.pdf]
<JoseeAntonioR> I do get traceback
<jsjgruber-x> Oh dear. What does it say?
<JoseeAntonioR> http://paste.ubuntu.com/5580386/
<jsjgruber-x> Oh, good, that's what you should see. A traceback would say [Traceback] followed by  info on where in the program it failed. It was a zero divide error if the file was empty. That looks good, it's just that there is nothing in the file and those messages are expected. A real traceback give a a scary apport dialog box annd we don't want to scare people using lernid because the instructor made a mistake.
<jsjgruber-x> Should I go on?
<JoseeAntonioR> oh, ok
<JoseeAntonioR> yep
<jsjgruber-x> Could you check the Event menu for "Publicize with Gwibber"?
<JoseeAntonioR> sure
<JoseeAntonioR> nothing happens when I click the button
<JoseeAntonioR> oh, something actually happens
<jsjgruber-x> I'm not sure you should see anything, I think it tweets, etc., an automatic message
<JoseeAntonioR> it actually tweets
<jsjgruber-x> good
<JoseeAntonioR> but doesn't display any confirmation message or whatsoever
<jsjgruber-x> yep.
<JoseeAntonioR> should I file a bug against that? a user who doesn't know what it does may be surprised by having random tweets
<jsjgruber-x> Sure.
<jsjgruber-x> Anything else you want to try in the classroom? if not please disconnect and choose ubuntu-on-air from the connect dialog.
<JoseeAntonioR> nope, let's go for it
<ClassBot> There are 10 minutes remaining in the current session.
<ClassBot> There are 5 minutes remaining in the current session.
<ClassBot> Logs for this session will be available at http://irclogs.ubuntu.com/2013/03/02/%23ubuntu-classroom.html
* ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - https://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Questions in #ubuntu-classroom-chat || No Sessions Currently in Progress
#ubuntu-classroom 2013-03-03
<grantw> what is an good project a beginner developer can start fixing bugs for?
<FlowRiser> grantw, what is your area of expertise ?
<grantw> i've got a bit of experience with Java, but mostly been a C# asp.net/SQL developer for the last 4 years, I've been using Linux for a few years, it is my main desktop at home
<grantw> so i make a living as a developer, but would like to contribute to Linux
<grantw> i went to an Ubuntu jam yesterday to see what it is all about, and have been searching for bugs in Launchpad, just trying to find small bugs to get started with
<grantw> i should probably pick a specific project and get to know that
<FlowRiser> grantw, well, that is mostly windows stuff ... But if you have sql knowledge, just pick a project!
<FlowRiser> grantw, if you want you can even try your hand at some html5 apps for Ubuntu 13.04
<grantw> ok, so just search launchpad for web apps?
<FlowRiser> grantw, that's the idea :D
<FlowRiser> grantw, but really you can even work on all kinds of apps involving databases
#ubuntu-classroom 2014-02-27
<MangledBlue> hello hello - might I get some assist on install here - my MD5 is good - but cannot install - any thoughts?
<MangledBlue> c7f439e864d28d9e5ca2aa885c4ec4cb *ubuntu-12.04.4-desktop-amd64.iso
<MangledBlue> checks out
<MangledBlue> anybody.....?
<MangledBlue> anybody??/
#ubuntu-classroom 2014-02-28
<pleia2> bug 12345
<ubot2`> Launchpad bug 12345 in isdnutils (Ubuntu) "isdn does not work, fritz avm (pnp?)" [Medium,Fix released] https://launchpad.net/bugs/12345
<pleia2> don't mind me, just prepping for doc session on sunday :)
#ubuntu-classroom 2014-03-02
* ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - https://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Questions in #ubuntu-classroom-chat || Event: Ubuntu Documentation Day - Current Session: Introduction to Docs - Instructors: pleia2
 * pleia2 waves
<pleia2> hello everyone :) bright and early here in California
<pleia2> (actually, not so bright, it's raining)
<pleia2> welcome to Ubuntu Documentation Day! We'll have 6.5 hours of sessions here in the Classroom about Ubuntu Documentation
<pleia2> if you're not already, you may join #ubuntu-classroom-chat as well to ask questions and chat with other attendees
<pleia2> questions should be in the form of:
<pleia2> QUESTION: Do you like Ubuntu?
<pleia2> so the ClassBot can pick them up :)
<pleia2> anyone want to give it a try?
<ClassBot> knome asked: Is Xubuntu the best flavor?
<pleia2> haha, it depends on who you ask :)
<ClassBot> belkinsa asked: What favor of Ubuntu is the best?
<pleia2> they're all wonderful!
<pleia2> alright, so that's questions
<pleia2> the schedule today is as follows:
<pleia2> 17:00 UTC Getting started contributing to Desktop docs with godbyk
<pleia2> 18:00 UTC Getting started contributing to Server docs with dsmythies
<pleia2> 19:00 UTC Getting started contributing to the Wiki docs with belkinsa
<pleia2> 20:00 UTC Getting started contributing to Manual with godbyk (again! busy guy)
<pleia2> 21:00 UTC Ubuntu Manual versions explained with tacorwin and patrickdickey
<pleia2> the full schedule is here, along with time zone conversions from UTC: https://wiki.ubuntu.com/DocumentationTeam/Classroom
<pleia2> now, this session is an introduction to docs, which shall serve as sort of a quick start to everything else that folks will be exploring today
<pleia2> I'll go through each of them quickly, syncing up with where they land on the schedule
<pleia2> feel free to ask questions, but anything complicated is probably best left for the person giving the session about that particular topic, since they're the experts :)
<pleia2> first up, Desktop docs!
<pleia2> the Desktop docs are shipped on every Ubuntu Desktop install
<pleia2> they're also published to help.ubuntu.com, so the latest official desktop docs can be found here: https://help.ubuntu.com/13.10/ubuntu-help/index.html
<pleia2> this makes them pretty important to get right, and since everyone who works on documentation in Ubuntu is an unpaid volunteer, we could always use the help with all aspects
<pleia2> the team commits to updating this documentation every cycle
<pleia2> on the technical side, the documentation is written in a markup language called "Mallard" (the same as what GNOME uses) and it lives at lp:ubuntu-docs which can be accessed via the revision control system bazaar (bzr)
<pleia2> godbyk will be giving the full tour in about 38 minutes
<pleia2> next up we have server documentation
<pleia2> this documentation is specific to servers running Ubuntu and is separate from the desktop documentation
<pleia2> just like desktop docs, the team is committed to releasing this every cycle
<ClassBot> knome asked: Do flavors ship documentation, are they published online and do they also use Mallard and BZR?
<pleia2> many flavors do ship documentation, but they select the tools they use to write and publish, I'll get to that toward the end :)
<pleia2> unlike desktop docs, server docs are not shipped with installed versions of Ubuntu server and instead are just published on help.ubuntu.com
<pleia2> they're available there as html and pdf as you can see in the latest release here: https://help.ubuntu.com/13.10/index.html
<pleia2> these docs are written in DocBook, and are also available via bzr at lp:serverguide
<pleia2> DocBook is a pretty standard tool for writing documentation in open source projects, so many folks are already familiar with it
<pleia2> now, beyond these "official" documentation types in the core Docuemtation team, we also have docuementation that's maintained on the wiki
<pleia2> everything under /community at help.ubuntu.com is actually a wiki
<pleia2> starting here: https://help.ubuntu.com/community
<pleia2> this can be edited by anyone in the community, at any time, and there are no set deadlines or freezes for when it should be completed
<pleia2> as such, it's a much more "living" document that the community maintains, and while there is a team to keep an eye on things, it's not strictly updated every cycle
<pleia2> it's also not shipped with Ubuntu or anything, so it's more of an online reference
<pleia2> to get started working with this, all you need is a web browser and a launchpad account :) see here for getting started: https://wiki.ubuntu.com/DocumentationTeam/Wiki
<pleia2> wiki syntax is easier to learn than DocBook or Mallard, so a lot of folks enjoy starting here
<pleia2> ah, should clarify, a launchpad account linked to Ubuntu One account (if you sign up for launchpad today it's automatic, but if you have an older account it might not be), see: https://help.ubuntu.com/community/WikiGuide/Registration
<pleia2> the wiki also allows you to create new articles for things that aren't documented, and improve existing documents when you find errors, so it's a low barrier way to get involved
<pleia2> there's also the Ubuntu Manual project
<pleia2> the work the Ubuntu Manual does is to present a low-cost (or free pdf) printable Ubuntu book for users, their site is at http://ubuntu-manual.org/
<pleia2> it's structured differently than the official desktop documentation because it's in book form, but the manual covers similar topics
<pleia2> the manual team has also been committed to releasing every cycle
<pleia2> the Manual is written in LaTeX and then exported to pdf and to online book print shops in whatever format they require
<pleia2> they also use bzr to track revisions
<pleia2> one of the things this team did early on was work to make it as easy as possible for contributors can help out, as you can see from their nice, clean get involved page: http://ubuntu-manual.org/getinvolved
<pleia2> so that's all the documentation that's focused on Ubuntu specifically - it's a lot! and we have a pretty small team for all of these
<pleia2> beyond that, some of the flavors of Ubuntu maintain their own documentation too
<pleia2> Xubuntu, for instance, has documentation that's written in DocBook and also lives on launchpad
<ClassBot> ahoneybun asked: are other flavors of ubuntu going to talk?
<pleia2> unfortunately not! but from my experience xubuntu and kubuntu (the two that maintain docs) are friendly folks and can point you in the right direction
<pleia2> we'll work to get some flavor representatives in for our next Doc day :)
<pleia2> these documentation teams run pretty independently from Ubuntu, so they can choose their tools and publishing mechanisms
<pleia2> for Xubuntu the documentation is published on http://docs.xubuntu.org/ and shipped with each release
<pleia2> oh and xubuntu docs live on lp at lp:xubuntu-docs
<pleia2> and since we don't have a specific session for flavors, ahoneybun is here to give us some info about kubuntu documentation :)
<ahoneybun> Hello all I am here for the Kubuntu Docs Team
<ahoneybun> 'Docs" = Documentation
<ahoneybun> Currently we have moved out docs over to http://userbase.kde.org/Kubuntu where you would need to log in here https://userbase.kde.org/index.php?title=Special:OpenIDLogin&returnto=Kubuntu
<ahoneybun> It is based on MediaWiki vs MoinMoin that wiki.ubuntu.com uses
<ahoneybun> Once we get the docs nice, perfect for release we export it into HTML then to DocBook for the khelpcenter to import
<ahoneybun> we do use launchpad for a few things but not as much as say xubuntu at lp:kubuntu-docs
<ahoneybun> and we have a docs website at http://docs.kubuntu.org/Kubuntu/KubuntuDocs.html but we are working on getting a way to create a snapshot at each release to push to that site
<ahoneybun> Right now at http://userbase.kde.org/Kubuntu we need translators to make the docs the best and most available to everyone :)
<pleia2> thanks ahoneybun
<ahoneybun> no problem :)
<pleia2> other flavors tend to either rely upon upstream, or have minimal documentation for specific tasks either on the wiki or on their website, like Edubuntu: https://edubuntu.org/documentation
<pleia2> so participating in upstream documentation is highly recommended as well :)
<pleia2> upstream == from projects that the distribution uses, like lxde or gnome
<pleia2> they also rely heavily (or exclusvely) on volunteers, so documentation everywhere always needs help from the community
<pleia2> finally, I also want to mention that the Ubuntu community also has wiki.ubuntu.com - which is not for user documentation, this tends to be confusing for a lot of people, it's actually a teams wiki that should be used by community members for project coordination and how-tos related to getting involved with their projects
<pleia2> and that's all I have for this whirlwind tour of documentation :) in 10 minutes or so we'll have godbyk give you a more in depth tour of the desktop docs, and again the full schedule is here: https://wiki.ubuntu.com/DocumentationTeam/Classroom
<pleia2> I was asked by dsmythies that if you are attending the server session later, that you install some packages with:
<pleia2> sudo apt-get install bzr docbook docbook-xsl xsltproc libxml2-utils yelp-tools yelp-xsl fop gnome-doc-utils make
<ClassBot> There are 10 minutes remaining in the current session.
<pleia2> this will pull in what you need to contribute to server docs, and pulls in a bunch of dependencies so it'll take a few minutes
<ClassBot> There are 5 minutes remaining in the current session.
<ClassBot> gulundin asked: is some deadline set on the official documentation for the Trusty Tahr release?
<pleia2> great question, and there is!
<pleia2> grabbing the link for our release schedule
<pleia2> https://wiki.ubuntu.com/DocumentationTeam/ReleaseSchedule
<pleia2> DocumentationStringFreeze is coming up quick, on March 20th, so it needs to be done by then
* ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - https://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Questions in #ubuntu-classroom-chat || Event: Ubuntu Documentation Day - Current Session: Getting started contributing to Desktop docs - Instructors: godbyk
<ClassBot> Logs for this session will be available at http://irclogs.ubuntu.com/2014/03/02/%23ubuntu-classroom.html following the conclusion of the session.
<godbyk> Hello, everyone, and welcome to the classroom session for Ubuntu desktop documentation.
<godbyk> If you have any questions during this session, please ask in #ubuntu-classroom-chat. Don't forget to prefix your question with "QUESTION:"
<godbyk> The upcoming sessions are:
<godbyk> 18:00 UTC Getting started contributing to Server docs with dsmythies
<godbyk> 19:00 UTC Getting started contributing to the Wiki docs with belkinsa
<godbyk> 20:00 UTC Getting started contributing to Manual with godbyk
<godbyk> 21:00 UTC Ubuntu Manual versions explained with tacorwin and patrickdickey
<godbyk> As pleia2 mentioned in the previous session, the Ubuntu desktop docs are published each cycle along with Ubuntu.
<godbyk> They are present in two places:
<godbyk> 1. On your desktop (just search for 'help' in the Dash), and
<godbyk> 2. Online at https://help.ubuntu.com/13.10/ubuntu-help/index.html.
<godbyk> In this session, I'll give you a brief overview of how you can help contribute to the desktop documentation.
<godbyk> For those of you who are eager to dive right in (and not wait on my slow typing!), you can follow our getting started guide at https://wiki.ubuntu.com/DocumentationTeam/SystemDocumentation/UbuntuDesktopGuide.
<godbyk> To start working with the desktop documentation, you should first join our contributors team: https://launchpad.net/~ubuntu-doc-contributors
<godbyk> And subscribe to our mailing list.
<godbyk> You can help us by reviewing the current documentation online at https://help.ubuntu.com/13.10/ubuntu-help/index.html.
<godbyk> If you find an errorâincorrect information or typosâthere are a few ways of correcting it:
<godbyk> 1. Email the list. This is probably the easiest way as others will do most of the work. Just notifying us of these errors helps us enormously!
<godbyk> 2. File a bug on Launchpad. You can file a bug against the ubuntu-docs project at https://bugs.launchpad.net/ubuntu/+source/ubuntu-docs/+filebug.
<godbyk> Be sure to include a link to the page you found the bug in and be specific about what the error is.
<godbyk> 3. Create a patch and file a merge proposal.
<godbyk> If you're feeling adventurous (and we hope you are!), you can download the documentation code yourself, fix the error, and submit a patch.
<godbyk> After you've contributed to the project for a while, you can apply to become a "committer".
<godbyk> Committers can commit code directly to the main bzr repository without having to create a merge proposal.
<godbyk> They also help review and approve merge proposals from contributors.
<godbyk> The Ubuntu desktop documentation is written in a markup language called Mallard.
<godbyk> Mallard is designed specifically for topic-based documentation (as opposed to say, books or lengthier publications).
<godbyk> En example Mallard document looks like this: http://bazaar.launchpad.net/~ubuntu-core-doc/ubuntu-docs/trusty/view/head:/ubuntu-help/C/unity-launcher-intro.page
<godbyk> When we convert this Mallard document to HTML, it looks like this: https://help.ubuntu.com/13.10/ubuntu-help/unity-launcher-intro.html
<godbyk> If you search the Dash for 'help', it will bring up an offline viewer known as Yelp.
<godbyk> Yelp can read and display Mallard pages directly without converting them to HTML first.
<godbyk> Next, I'd like to walk you through the process of downloading our documentation source code. This process will also give you a head start on any server guide work you'd like to do.
<godbyk> But first, are there any questions so far?
<godbyk> Okay, let's dive in!  If you have questions along the way, feel free to ask them in #ubuntu-classroom-chat. Don't forget to prefix your question with "QUESTION:".
<godbyk> We've written a short guide to getting started with the desktop docs at <https://wiki.ubuntu.com/DocumentationTeam/SystemDocumentation/UbuntuDesktopGuide>.
<godbyk> I'll be walking you through this process.
<godbyk> !q
<godbyk> jose: You can find out all about Mallard at http://projectmallard.org/.
<ClassBot> jose asked: where can I learn Mallard?
<godbyk> jose: We may not have time to cover much of Mallard in this sessions, but if there's interest, we could hold a future classroom session about it.
<godbyk> Okay, for the first step, you'll need to install a few packages:
<godbyk> $ sudo apt-get install bzr xsltproc libxml2-utils yelp-tools yelp-xsl
<ClassBot> ahoneybun asked: how well does mallard handles translations?
<godbyk> ahoneybun: Mallard handles translations pretty well. When we're finished updating the docs, we generate a translation template file and upload it to Launchpad.
<godbyk> ahoneybun: Translators can then translate the documentation. The docs team will periodically upload the translations to the help.ubuntu.com website.
<godbyk> Next, we'll need to generate an SSH key.
<godbyk> First, check to see if you already have an SSH key:
<godbyk> Open a terminal, and type:
<godbyk> $ ls ~/.ssh/id_rsa.pub
<godbyk> If it lists the file, then you already have an ssh key and can skip the next step.
<godbyk> If you don't already have a key (it says "No such file or directory"), then we'll create one with the following command:
<godbyk> $ ssh-keygen -t rsa
<godbyk> It's easiest to just press Enter to accept the defaults to all of the questions.
<godbyk> You may enter a password for additional security if you like, but it's not required.
<ClassBot> jose asked: how do I open a terminal?
<godbyk> jose: You can open a terminal by searching the Dash for 'Terminal' or by pressing Ctrl+Alt+T on your keyboard.
<ClassBot> belkinsa asked: Is there a way to copy and paste those commands in the terminal for the ese?
<godbyk> belkinsa: You can copy and paste these commands from the chat window or from our web page at https://wiki.ubuntu.com/DocumentationTeam/SystemDocumentation/UbuntuDesktopGuide.
<godbyk> belkinsa: In your terminal, press Ctrl+Shift+V to paste the text.
<godbyk> belkinsa: Be sure to leave out the initial $. That's just showing the prompt.
<godbyk> Next, we'll need to upload the SSH key to Launchpad.
<godbyk> Open your favorite web browser and head to https://launchpad.net/~/+editsshkeys
<godbyk> If you don't yet have a Launchpad account, create one and then revisit the URL.
<godbyk> If you already have a Launchpad account, log in.
<godbyk> Scroll down to the bottom of the page and you'll see a large text box below the "Add an SSH key" heading.
<godbyk> We'll need to paste the SSH key we just created into this box.
<godbyk> In your terminal, run:
<godbyk> $ gedit ~/.ssh/id_rsa.pub
<godbyk> Copy the entire contents of this file and paste them into the textbox on the Launchpad page. Click the Import Public Key button.
<godbyk> This SSH key allows us to communicate securely with Launchpad.
<godbyk> Next, we'll set up bzr.
<godbyk> bzr (Bazaar) is the version control system that Ubuntu uses for its projects.
<godbyk> bzr maintains a history of all the changes we make to the documentation.
<godbyk> This allows us to roll back any accidental changes and to see our progress as we update the documentation.
<godbyk> First, we'll need to tell bzr who we are.
<godbyk> We'll tell bzr which name and email address we'd like it to show when we submit code to Launchpad.
<godbyk> Run the following command:
<godbyk> $ bzr whoami "Kevin Godby <kevin@godby.org"
<godbyk> Replace 'Kevin Godby' with your full name and 'kevin@godby.org' with your own email address.
<godbyk> Don't forget the quotation marks.
<godbyk> And don't forget to put your email address in < and > (like I failed to).
<godbyk> $ bzr whoami "Kevin Godby <kevin@godby.org>"
<godbyk> Next, we'll need to tell bzr what our Launchpad username is:
<godbyk> $ bzr launchpad-login godbyk
<godbyk> If you've forgotten your Launchpad username, you can find it by visiting https://launchpad.net/~ in your web browser.
<godbyk> Launchpad will redirect you to your Launchpad account page. The part of the address after the tilde (~) is your username.
<godbyk> Finally, we can download a copy of the documentation using bzr.
<godbyk> This step can take a little bit of time because we're downloading the entire history of all of the changes made to the documentation over the years.
<godbyk> In your terminal, run the following command:
<godbyk> $ bzr branch lp:ubuntu-docs
<godbyk> Are there any questions so far?
<godbyk> Since it will take a little while to download the documentation, we'll explore the files online.
<godbyk> If you visit http://bazaar.launchpad.net/~ubuntu-core-doc/ubuntu-docs/trusty/files with your web browser, you can see a list of all of the files and directories in the bzr repository.
<godbyk> These are the files that are being downloaded by bzr.
<godbyk> The Mallard files that we write for the desktop documentation live in the ubuntu-help/C/ subdirectory.
<godbyk> Click on ubuntu-help and then C to find .page files.
<godbyk> The .page files contain the Mallard markup for the documentation.
<godbyk> Let's take another look at the example Mallard file I showed you earlier: http://bazaar.launchpad.net/~ubuntu-core-doc/ubuntu-docs/trusty/view/head:/ubuntu-help/C/unity-launcher-intro.page
<godbyk> Once bzr has finished downloading all the files, you can open this file on your computer by running the following command in your terminal:
<godbyk> $ gedit ubuntu-docs/ubuntu-help/C/unity-launcher-intro.page
<godbyk> If you spot an error in this file, you have a few options for correcting it:
<godbyk> 1. Email the ubuntu-docs mailing list about it and someone there will fix it.
<godbyk> 2. File a bug report at https://bugs.launchpad.net/ubuntu/+source/ubuntu-docs/+filebug and someone there will fix it.
<godbyk> 3. Make the changes yourself.
<godbyk> The first two options are fairly self-explanatory, so let's explore the third option.
<godbyk> You can open the offending .page file in gedit, make the desired changes, and save the file.
<godbyk> Now you have the corrected .page file on your own computer.
<godbyk> The next step is to get your changes back to Launchpad so they can be incorporated into the main documentation repository.
<godbyk> First, you'll need to commit your changes to the bzr repository.
<godbyk> Run the following command:
<godbyk> $ cd ~/ubuntu-docs
<godbyk> $ bzr commit -m 'A brief description of your changes goes here'
<godbyk> The 'bzr commit' command will commit your changes. The text between the apostrophes should be a short description of the changes you've made.
<godbyk> Next, you'll need to upload your changes to Launchpad.
<godbyk> Run the following command:
<godbyk> $ bzr push lp:~username/ubuntu/trusty/ubuntu-doc/my-first-change
<godbyk> where you've replaced 'username' with your own username and 'my-first-change' with a couple words describing your change (no spaces allowed).
<ClassBot> There are 10 minutes remaining in the current session.
<godbyk> Finally, you'll need to create a 'merge proposal' to alert the ubuntu-docs team of your proposed changes so they can be reviewed.
<godbyk> Run:
<godbyk> $ bzr lp-propose
<godbyk> This command will open your web browser to the merge proposal page on Launchpad. Provide a brief description of your proposed changes and submit the merge proposal.
<godbyk> The ubuntu-docs team will be notified of your merge proposal.
<godbyk> They will review your proposed changes and either accept them or discuss them with you.
<godbyk> We've only had a short time to get an overview of the Ubuntu desktop documentation and how you can join the team.
<godbyk> If you'd like more information, feel free to email us on our mailing list at ubuntu-doc@lists.ubuntu.com or chat with us in our IRC channel at #ubuntu-doc.
<godbyk> We hope to hear from you soon!
<godbyk> We have a few minutes for some questions.
<godbyk> In our next session, dsmythies will discuss the server documentation.
<ClassBot> There are 5 minutes remaining in the current session.
<dsmythies> to help save time in the sererguide session please do this (if you didn't already), as it might take over 15 minutes:
<dsmythies> $ sudo apt-get install bzr docbook docbook-xsl xsltproc libxml2-utils yelp-tools yelp-xsl fop gnome-doc-utils make
* ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - https://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Questions in #ubuntu-classroom-chat || Event: Ubuntu Documentation Day - Current Session: Getting started contributing to Server docs - Instructors: dsmythies
<ClassBot> Logs for this session will be available at http://irclogs.ubuntu.com/2014/03/02/%23ubuntu-classroom.html following the conclusion of the session.
<dsmythies> Hello everyone, my name is Doug Smythies and this is the "Getting Started Contributing to the Serverguide" session.
<dsmythies> Over the next hour, and for the Ubuntu Serverguide, we will learn: How to setup a working environment; How to build and verify the HTML and PDF versions; How to create and submit a merge proposal.
<dsmythies> Note that I am IRC challenged, and have asked for help from invisbile to you classroom volunteers, whom I would like to thank now, because I will forget at the end.
<dsmythies> Could everybody participating please comment in #ubuntu-classroom-chat. And please say if you intend to "participate" or just follow along but not actually "do", as the numbers will dictate how I deliever the material.
<dsmythies> Questions are O.K. during this session, but I might not see them right away. Please ask in #ubuntu-classroom-chat. Be sure to prefix it with 'QUESTION:' to ensure that it gets noticed by the classroom robot.
<dsmythies> Prerequisites: You should already have a launchpad account, with an uploaded ssh key for the computer you will be using. You should already have bzr installed and setup. Is this O.K or is it a problem for anyone?
<dsmythies> Hmmm....
<dsmythies> I guess I'll move along then...
<dsmythies> We will work on 3 real bug reports, but don't worry they are simple typo bug reports. At this stage we are here to learn about the process and not get lost in some detailed overhaul of a chapter or section.
<dsmythies> While what we are covering shouldn't take too long, there might be download delays and such which could result in time pressures for the hour.
<dsmythies> First and foremost, we should always have the serverguide "quick how to" page open somewhere on our desktop and as our main reference.
<dsmythies> Please open: https://wiki.ubuntu.com/DocumentationTeam/SystemDocumentation/UbuntuServerGuide
<dsmythies> and go to the kickstart section.
<dsmythies> Second, things are done via the command line, so we always need some sort of terminal window or session open. Go ahead and make a terminal window or open an ssh session now.
<dsmythies> Cut and paste the install the software line (even if you think you already have everything installed, there is no harm in checking):
<dsmythies> Note: Lyz asked you to do this earlier and I asked awhile ago also.
<dsmythies> $ sudo apt-get install bzr docbook docbook-xsl xsltproc libxml2-utils yelp-tools yelp-xsl fop gnome-doc-utils make
<dsmythies> This step might take 15 minutes or more, if you do not already have anything installed.
<dsmythies> (I am hoping you have done this already, as pleia2 mentioned the command at the end of her session. Although I know some of you might not have been here then.)
<dsmythies> O.K.? comment on #ubuntu-classroom-chat as to progress. And note that even if you took Kevin's session just prior to this one, there are an extra couple of packages needed for Serverguide.
<dsmythies> Now we are ready to get a local copy of the master files for the Ubuntu Servverguide:
<dsmythies> 1.) make a working directory and change to it:
<dsmythies> $ mkdir sguide-1404
<dsmythies> $ cd squide-1404
<dsmythies> 2.) make a local copy (branch) of the master Serverguide files: (put it in the subdirectory called "classroom")(this will take at least 4 minutes.)
<dsmythies> $ bzr branch lp:serverguide classroom
<dsmythies> If it is your first bzr/launchpad interaction, you will see:
<dsmythies> The authenticity of host 'bazaar.launchpad.net (91.189.95.84)' can't be established.
<dsmythies> RSA key fingerprint is bla bla bla.
<dsmythies> Are you sure you want to continue connecting (yes/no)?
<dsmythies> enter "yes"
<dsmythies> This step might take 4 minutes or more.
<dsmythies> O.K.? comment on #ubuntu-classroom-chat as to progress.
<dsmythies> 3.) Now, before we make any changes, check to make sure everything is O.K..That the code builds and that the code validates:
<dsmythies> $ cd classroom
<dsmythies> $ scripts/validate.sh serverguide/C/serverguide.xml
<dsmythies> $ make serverguide-html
<dsmythies> $ make serverguide-pdf
<dsmythies> While we have worked hard to get rid of exranious messages during compile, there are still a few.
<dsmythies> Now have a look at the compiled serverguide. How you actually do this will depend on your setup. I do things on a server and have the drive shared with my Laptop via Samba. If you are using a desktop computer you can use it directly.
<dsmythies> The built serverguide will be in the build/serverguide/C sub-directory. Navegate there and open the index.html file. Similarly for the serverguide.pdf file. In both the HTML and the PDF, browse to the Zyntal section.
<dsmythies> Note: in the new (Red) theme, sometimes it is not obvious where stuff is in the HTML. With the old (Brown) theme it was easier. (It is under "Remote administration")
<dsmythies> If you are just following along and not actually building on your local machine, then go to https://help.ubuntu.com/13.10/index.html and proceed from there.
<dsmythies> TIP: Sometimes it is easier to find stuff in the .PDF because you can search the whole document, and then you know where to look in the HTML.
<dsmythies> Once we have determined that the unaltered code validates and compiles, we are ready to start making changes.
<dsmythies> Let's look at the first bug report we intend to tackle: Please all open a new broswer page and go to bug 1278146
<dsmythies> https://bugs.launchpad.net/serverguide/+bug/1278146
<dsmythies> O.K.? comment on #ubuntu-classroom-chat that you have opened and read the bug report.
<dsmythies> I'll set the bug report status to "In progress". I already assigned myself so as to hold the bug report for this class, but typically you would assign yourself, or maybe you were previously assigned.
<dsmythies> I want everybody to click and add themselves to get every e-mail about this bug report (over on the right about 4 or 5 groups down).
<dsmythies> First we check our compiled HTML and PDF, so we can verify before and after we fix it. Search for "a serie of"
<dsmythies> Now, we have the context of the bug report. This will be useful later.
<dsmythies> Close the PDF Serverguide, because (at least on my computer) we can not rebuild it while it is open. Keep the HTML open.
<dsmythies> Now we have to figure out where the referenced error is in the source code. (ignoring for the moment, that I already did that and made an entry in the bug report.):
<dsmythies> $ cd serverguide
<dsmythies> $ cd C
<dsmythies> $ grep -n "a serie of" *.xml
<dsmythies> you should get this:
<dsmythies> remote-administration.xml:451:      <application>Zentyal</application> consists of a serie of packages
<dsmythies> So you know line 451 of remote-administration.xml is the line to fix.
<dsmythies> O.K.? Was everyone able to identify the issue in the source code?
<dsmythies> TIP: Sometimes our grep search fails. Why? Because sometimes there are line breaks in the source code that interfere with the search pattern. If that happens, just move the search pattern a little.
<dsmythies> TIP: Notice that in the HTML "Zyntal" is in italics. That likley means that it is surrounded by docbook tags in the source code, and we should not include it in the grep search pattern.
<dsmythies> We are ready to make a change to the source code. Use your preferred editor to open remote-administration.xml and go to line 451, make the required change and save the file. I use nano.
<dsmythies> O.K.? We'll wait for everybody. (I'm dropping the "comment on #ubuntu-classroom-chat" from here on, assuming you know to. (nobody seems to be doing this anyhow))
<dsmythies> moving on...
<dsmythies> Always, always validate:
<dsmythies> $ cd ..
<dsmythies> $ cd ..
<dsmythies> $ scripts/validate.sh serverguide/C/serverguide.xml
<dsmythies> $ make serverguide-html
<dsmythies> $ make serverguide-pdf
<dsmythies> And refresh your browser and observe the fixed code. Open the serverguide.pdf file, and observe there also.
<dsmythies> Let's do some bzr checks:
<dsmythies> $ bzr status
<dsmythies> $ bzr diff
<dsmythies> aghhh... I see that someone did add themselves to the bug report. Great.
<dsmythies> So onto the second bug, one submitted by a translator. bug 1272984 . Flaipe always submits very nice typo bugs with a reference to the source file and line. However, often reports from translators only contain the string reference, and you'll have to figure it out for yourself.
<dsmythies> https://bugs.launchpad.net/serverguide/+bug/1272984
<dsmythies> The process is the same as the last one. Add your names to be notified about changes to this bug report.
<dsmythies> Find the typo in the HTML and PDF documents.
<dsmythies> (Hint try the TIP from earlier and find it in the PDF first.)
<dsmythies> Ugh Oh.... I have a confusing note in my script. What on earth was I thinking? ....
<dsmythies> $ grep -n repostory serverguide/C/*.xml
<dsmythies> $ serverguide/C/vcs.xml:199:            <para>Or add the server's project as a remote for an existing git repostory:</para>
<dsmythies> $ nano serverguide/C/vcs.xml   (you use whatever editor you prefer)
<dsmythies> Always, always validate:
<dsmythies> $ scripts/validate.sh serverguide/C/serverguide.xml
<dsmythies> $ make serverguide-html
<dsmythies> $ make serverguide-pdf
<dsmythies> And refresh your browser and observe the fixed code. Open the serverguide.pdf file, and observe there also.
<dsmythies> Again, let's do some bzr checks:
<dsmythies> $ bzr status
<dsmythies> $ bzr diff
<dsmythies> One more, another one from Flaipe: bug 1272064
<dsmythies> https://bugs.launchpad.net/serverguide/+bug/1272064
<dsmythies> Go ahead and do this one yoursleves, without any input from me. (However note that when I sreached the PDF for "the the", I found some other occurances. Normally we would stop and fix those also, but we don't have time right now.)
<dsmythies> ... I am doing it also ...
<dsmythies> O.K.? Is everybody done?
<dsmythies> Did everyone do the bzr checks as the last step? and does everyone get this: http://paste.ubuntu.com/7023049/
<dsmythies> Now it is time to wrap this up and put our branch into launchpad. Starting with a commit line. Use the wiki page as a reference. (and use your name and your launchpad account name):
<ClassBot> There are 10 minutes remaining in the current session.
<dsmythies> $ bzr commit --fixes lp:1278146 --fixes lp:1272984 --fixes lp:1272064 -m 'simple typos; LP: #1278146; LP: #1272984; LP: #1272064; by Doug Smythies'
<dsmythies> $ bzr push lp:~dsmythies/serverguide/classroom
<dsmythies> this is taking ahile and I might run out of time...
<dsmythies> You should also be getting e-mails from the bug reports saying that branches are linked to them.
<dsmythies> Now go to your launchpad account under the "code tab" and you should see your code there. Click on it to go there.
<dsmythies> You should see the bug reports under "Related bugs" with links to them.
<dsmythies> Under recent revisions you should see your just uploaded revision. Click on the revision number, 188.
<dsmythies> ... my upload is taking awhile... I'll add my remaining notes here and we'll come back to this is there is time.
<ClassBot> There are 5 minutes remaining in the current session.
<dsmythies> Click on each of the modified files listed to expand the color differences. Do they make sense? (they should).
<dsmythies> Go back to branch summary, either via the link in the top left corner or via the browser back button.
<dsmythies> Under "Branch merges" clcik on "Propose for merging"
<dsmythies> Enter a description. "Simple typos" will do in this case
<dsmythies> Leave blank the spots where it says "optional", they will autofill with the correct information.
<dsmythies> Click on the "Propose Merge" radio button at the bottom of the page.
<dsmythies> After a short delay you should see a Merge Proposal page with a MP number.
<dsmythies> I'll add a comment and "approve" and then also set the status to "approve"
<dsmythies> I go to my up to date working branch, and merge in the MP:
<dsmythies> $ bzr merge lp:~jdoe/serverguide/classroom
<dsmythies> $ bzr commit --fixes lp:1278146 --fixes lp:1272984 --fixes lp:1272064 -m 'simple typos per MP: #XXXXXX; LP: #1278146; LP: #1272984; LP: #1272064; by Jane Doe'
<dsmythies> $ bzr push lp:serverguide
<dsmythies> Notice the MP automatically got set to a status of "merged"
<dsmythies> ( or woul dhave if we actually did this part)
<dsmythies> We should also now set the bug reports status' to "fix committed". (which I will complete after the class.)
<dsmythies> ... my upload continues... I shdould have done one before and had it ready. Sorry.
* ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - https://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Questions in #ubuntu-classroom-chat || Event: Ubuntu Documentation Day - Current Session: Getting started contributing to the Wiki docs - Instructors: belkinsa
<belkinsa> Thank you, dsmythies, for your session.  I hope that helps everyone who wants to help out.
<dsmythies> The class will switch over in a moment. Thanks.
<ClassBot> Logs for this session will be available at http://irclogs.ubuntu.com/2014/03/02/%23ubuntu-classroom.html following the conclusion of the session.
<belkinsa> Hey all from snowy Southwest Ohio, welcome to the, "Getting started contributing to the Wiki docs", session.  My name is Svetlana Belkin (A.K.A. belkinsa) and I'm your instructor.
<belkinsa> If you have any questions during this session, please ask in #ubuntu-classroom-chat. Don't forget to prefix your question with "QUESTION:"
<belkinsa> The upcoming sessions are:
<belkinsa> 20:00 UTC Getting started contributing to Manual with godbyk
<belkinsa> 21:00 UTC Ubuntu Manual versions explained with tacorwin and patrickdickey
<belkinsa> Before I start with my lesson: If you'd like more information, feel free to email us on our mailing list at ubuntu-doc@lists.ubuntu.com or chat with us in our IRC channel at #ubuntu-doc.  Please use the prefixes: [Desktop],[Server], and [Wiki] when you mail the list.  Each of them are for the three types of docs that we have.
<belkinsa> Like what pleia2 said about the Wiki.  We have two types of wikis: the wiki.ubuntu.com where our teams hold pages, and for you the ones who are active and wish to seek the Ubuntu Membership.  The Community Help Wiki contains all of the support pages that don't go into our guides that we have.
<belkinsa> The link to the Community Help Wiki is: https://help.ubuntu.com/community
<belkinsa> The great thing about the Community Help Wiki is that anyone with a LaunchPad account can edit pages and there is no fear of doing anything wrong since we have wiki admins that approve the changes and the rollback feature.
<belkinsa> How to get a Launchpad Account?  Here is how:  https://help.ubuntu.com/community/WikiGuide/Registration
<belkinsa> Any questions?
<belkinsa> Okay, our example that will be used is that you all (those who wants to learn how to wiki edit) will be creating your every own Userpage that you can use to show when you apply to the Ubuntu Membership.
<belkinsa> To do this, first you need to log into the wiki by going to wiki.ubuntu.com.
<belkinsa> You should see a Ubuntu logo banner and below it, a menu bar that says "Log in" or "edit", if you are logged in.
<belkinsa> If you are not logged in, please click that "Log in" and proceeded to log in with your LaunchPad account.
<ClassBot> jose asked: Do both wikis use moinmoin?
<belkinsa> Yes, both do.
<belkinsa> MoinMoin is a wiki syntax that both wikis use and it's easy to learn.
<belkinsa> This link has the syntaxes: https://help.ubuntu.com/community/WikiGuide/Formatting
<belkinsa> Okay, once you are logged in.  Go to this page: https://wiki.ubuntu.com/MembershipTemplate
<belkinsa> This page contains the template that we will use.
<belkinsa> There are two ways to copy and paste this template into a new page.
<belkinsa> The first one is to "Edit" the page.  You do this by hitting "edit" on the menu bar under the Ubuntu banner and it should take you to a text editor with the text for the template.  Copy that.
<belkinsa> Or you can go to the drop down menu and select "copy".  This should take you a page that says where to copy the page.
<belkinsa> I think the first method is the easiest.
<belkinsa> Because you need to know where to copy the page.
<belkinsa> In the address bar: type in https://wiki.ubuntu.com/<username>.  <useraname> is your username that you use in LaunchPad.
<belkinsa> Thanks, jose. Don't use edit to view the source, use the drop down and select 'view raw'
<belkinsa> This is for the first method.  ^^^
<belkinsa> Once you are at your page, you should see a dialogue telling you that it is not created yet.  Click "create a new page".  This should take you to the editor.
<belkinsa> At the editor, paste the template.  There is a menu above the editor.  Select "preview" and it will show you what you have done or you can select "Save" and the page will be saved and you should see a normal looking page without the editor.
<belkinsa> Any questions?
<belkinsa> Oh, as an example: https://wiki.ubuntu.com/belkinsa This is my page, please use "view raw" to see what I have done.
<belkinsa> You can write anything about yourself.  ;)
<belkinsa> Okay, now you have the basics of the syntax and how to edit a page.
<belkinsa> Now, when you find a page to work on, you can do it right on that page or you can use a page called a "sandbox" page.
<belkinsa> These sandboxes are used to play around with pages with out effecting the main one.
<belkinsa> To create one, the easiest way to https://wiki.ubuntu.com/<username>/sandbox ( <useraname> is your username that you use in LaunchPad).  Follow the directions as for your userpage to create a blank page to fill.
<belkinsa> You can add more pages after the first one by https://wiki.ubuntu.com/<username>/sandbox/<newpage>.
<belkinsa> As with all pages, don't forget to save when you are done and preview to extend the lock period.
<belkinsa> Any questions so far?
<belkinsa> There is a way to see what other users did to the pages and these are called "revisions".
<belkinsa> These allow rollbacking to older versions of pages.
<belkinsa> Log in which is under the âUbuntu Wikiâ banner. Under the âUbuntu Wikiâ, you should see a menu bar that starts with âEditâ
<belkinsa> Next to the 'Editâ, you should see a âInfoâ button- this will take you to a page called Revision History
<belkinsa> Here you can see:
<belkinsa> Revision Number (#) - which shows how many revisions the page gone through
<belkinsa> Date â which shows when the revision was made
<belkinsa> Size â which shows how large the page and/or if there is attachments to the page
<belkinsa> Duff - which allows to compare two versions of the same page
<belkinsa> Editor â which allows to see who done the last edit
<belkinsa> Comment â which allows to see what the editor did, if there is a comment
<belkinsa> Action â which allows to view the page without the diff
<belkinsa> Clicking on âViewâ will allow to enter the revision.
<belkinsa> If you want to rollback:
<belkinsa> Go back to the menu bar under the Ubuntu Wiki banner and find the drop down that is labeled, âMore Actions:â.
<belkinsa> Scroll down to âRevert to this revisionâ.
<belkinsa> Another page will pop up after section
<belkinsa> You can comment on why you doing this
<belkinsa> And select âRevertâ if you are sure on the choice
<belkinsa> Any questions on revisions?
<belkinsa> Before I forget about creating new pages: https://help.ubuntu.com/community/WikiGuide/PageCreation.  This page contains a temple if you want to create a new page: https://help.ubuntu.com/community/DocumentationTemplate
<belkinsa> If you don't have any expertise on any subject, the Doc team has small tasks for people to do.  These range from proofreading to tagging pages.
<belkinsa> https://wiki.ubuntu.com/DocumentationTeam/Wiki/Tasks
<belkinsa> Has the tasks.
<belkinsa> We also have a tagging system to tag pages: , https://help.ubuntu.com/community/Tag These tags help us to figure out what needs to be deleted or needs fixing.
<belkinsa> We might have a Global Jam session(s) for this this year, if we have people wanting to help to clean up the wiki.
<belkinsa> Any questions before I move on?
<belkinsa> Okay.
<belkinsa> The wiki has a way to categorize pages in order for the pages of the same subject mater to stay together.
<belkinsa> he format is CategoryCategory where the second is the name of the category
<belkinsa> The*
<belkinsa> This must be placed on the bottom of the page with â----â before it in one line.
<belkinsa>  iii. https://help.ubuntu.com/community/CategoryCategory has more information
<belkinsa> minus iii.
<belkinsa> This could be a focus for someone who has expertise on a subject matter so they can review many pages in one place.
<belkinsa> Any questions?
<belkinsa> My final topic for my lesson is the other projects that people can do with us.
<belkinsa> The first is the importing "How To Do" guides from the Ubuntu Forums: https://wiki.ubuntu.com/DocumentationTeam/Wiki/Tasks/Forum
<belkinsa> The Ubuntu Forums have a wealth of information available. It is important to ensure that the wiki documentation (and ultimately the documentation which is included in the Ubuntu system) benefits from that information.
<belkinsa> Same rules for these pages created apply.
<belkinsa> The other project is the PopularDocs project.
<belkinsa> https://launchpad.net/~newdocs
<belkinsa> This project is now under the Doc Team and we aim to index the most used pages in order for users to find what they need faster.
<belkinsa> We == as in the team.  I'm a part of it.
<belkinsa> Any questions for my final section?
<ClassBot> There are 10 minutes remaining in the current session.
<belkinsa> As I said before, the wiki is a great place to start with the Doc team since it has less of a barrier and it's easier to understand.
<belkinsa> As always:
<belkinsa> If you'd like more information, feel free to email us on our mailing list at ubuntu-doc@lists.ubuntu.com or chat with us in our IRC channel at #ubuntu-doc.  Please use the prefixes: [Desktop],[Server], and [Wiki] when you mail the list.  Each of them are for the three types of docs that we have.
<belkinsa> I would like to thank everyone who came and did the example as I was teaching it.  Hopefully this can help you leap into wiki editing and hopefully get you to help us to have a useful wiki for all.
<belkinsa> I would like to also thank pleia2 and the rest for planning this Classroom session/Doc Day event.
<belkinsa> It was fun teaching this session.
<pleia2> thanks belkinsa!
<belkinsa> In five (5) minutes, godbyk will be teaching his "Getting started contributing to Manual" lesson.
<ClassBot> There are 5 minutes remaining in the current session.
<ClassBot> knome asked: Should I be worried about messing something up in the wiki?
<belkinsa> knome, no, because of the rollback feature and the wiki admins are aways there.
<belkinsa> The wiki admins are users with more power than the normal user.
<belkinsa> They can delete and rename pages.
* ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - https://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Questions in #ubuntu-classroom-chat || Event: Ubuntu Documentation Day - Current Session: Getting started contributing to Manual - Instructors: godbyk
<ClassBot> Logs for this session will be available at http://irclogs.ubuntu.com/2014/03/02/%23ubuntu-classroom.html following the conclusion of the session.
<godbyk> Welcome to the Ubuntu Manual classroom session.
<godbyk> The Ubuntu Manual Project publishes "Getting Started with Ubuntu" every six months.
<godbyk> "Getting Started with Ubuntu" is a beginner's guide for Ubuntu. It's aimed at helping those who are new to Ubuntu become familiar with it.
<godbyk> You can download a free PDF of the book from our website at http://ubuntu-manual.org/.
<godbyk> You can also purchase a printed and bound copy through CreateSpace.com or Amazon.com.
<godbyk> If you have any questions during this session, feel free to ask them in #ubuntu-classroom-chat. Don't forget to prefix your question with "QUESTION:".
<godbyk> The Ubuntu manual covers a lot of material that's helpful for new users.
<godbyk> It walks the reader through installing Ubuntu, introduces the Ubuntu desktop, instructs on how to install software, explains how to set up common applications, and provides some troubleshooting information.
<godbyk> The manual is written and edited by a team of volunteers.
<godbyk> We're always looking for more authors and editors to help us out.
<godbyk> This session will explain how you can start contributing to the Ubuntu manual.
<godbyk> There are a number of ways you can help create the next Ubuntu manual:
<godbyk> * You can become an author.
<godbyk> Authors help write new material to cover new Ubuntu applications and features.
<godbyk> They also update the existing text when Ubuntu changes with each release.
<godbyk> * You can become an editor.
<godbyk> Editors review what the authors have written.
<godbyk> The editors proofread the text for grammatical and spelling errors. They also ensure the information is accurate and up to date.
<godbyk> * You can become a translator.
<godbyk> We would like to publish the manual in as many languages as we can.
<godbyk> The manual is currently available in English, Spanish, German, Dutch, Greek, Lithuanian, and Slovenian.
<godbyk> If you'd like to get involved in the Ubuntu Manual Project, you can find more information on our website at http://ubuntu-manual.org/getinvolved.
<godbyk> In this session, I'll briefly walk you through part of the process of becoming and author/editor and a translator.
<godbyk> 1. Becoming an author or editor
<godbyk> The complete instructions and process for becoming an author or editor are outlined online at http://ubuntu-manual.org/getinvolved/authors
<godbyk> The first step is to create a Launchpad account and join our team.
<godbyk> If you don't already have a Launchpad account, you can create one for free at https://launchpad.net/
<godbyk> Once you've registered an account, you can join our team by visiting https://launchpad.net/~ubuntu-manual/ and clicking "Join this team".
<godbyk> While you're there, subscribe to our mailing list.
<godbyk> As an author or editor, you'll be working directly with our documentation files.
<godbyk> We write our documentation using a markup language called LaTeX.
<godbyk> We'll explore the LaTeX markup language a bit later in this session.
<godbyk> Now that you have a Launchpad account and you've joined our team, you can download our documentation files.
<godbyk> If you haven't already done so, you'll need to generate an SSH key and share it with Launchpad before you can download the files.
<godbyk> To create an SSH key, open a terminal (by searching for 'Terminal' in the Dash or pressing Ctrl+Alt+T on your keyboard), and type the following commands (ignoring the $):
<godbyk> $ sudo apt-get install openssh-client
<godbyk> $ ssh-keygen -t rsa
<godbyk> You can just press Enter to accept the default answers to all of the questions that ssh-keygen asks you.
<godbyk> You may specify a password if you like, but it's not necessary.
<godbyk> ssh-keygen will create a file named id_rsa.pub in the .ssh/ subdirectory of your home directory.
<godbyk> We'll need to upload the the contents of this file to Launchpad.
<godbyk> Visit your SSH keys page at https://launchpad.net/people/+me/+editsshkeys
<godbyk> Open your key file by running the following command in a terminal:
<godbyk> $ gedit ~/.ssh/id_rsa.pub
<godbyk> Copy the contents of that file to your clipboard and paste it into the text box at the bottom of the Launchpad page. Click the "Import public key" button to continue.
<godbyk> Now we can start downloading the documentation files.
<godbyk> Install Bazaar by running the following command:
<godbyk> $ sudo apt-get install bzr
<godbyk> Tell bzr who you are:
<godbyk> $ bzr whoami "Your name <email@domain.com>"
<godbyk> Change 'Your name' to your own full name and 'email@domain.com' to your email address. Don't forget to include the quotation marks and the angle brackets.
<godbyk> Give bzr your Launchpad username:
<godbyk> $ bzr launchpad-login myusername
<godbyk> You can find your username by visiting http://launchpad.net/~
<godbyk> Launchpad will display your username after the tilde (~) in the address bar.
<godbyk> Finally, we can start downloading the documentation files:
<godbyk> $ bzr branch lp:ubuntu-manual
<godbyk> This may take a few minutes depending on the speed of your Internet connection.
<godbyk> Once you've finished downloading the documentation files, you can start taking a look at them.
<godbyk> For this session, we'll explore the files online.
<godbyk> Due to time constraints, I've omitted some of the steps required for you to build the manual PDF yourself. For full instructions, please visit http://ubuntu-manual.org/getinvolved/authors
<godbyk> Inside the ubuntu-manual directory, you'll see a number of subdirectories and files. You can view these online at http://bazaar.launchpad.net/~ubuntu-manual/ubuntu-manual/trusty/files
<godbyk> Each chapter of the manual is stored in its own subdirectory (e.g., installation, ubuntu-desktop, learning-more).
<godbyk> Let's take a look at the installation chapter.
<godbyk> Inside the installation/ subdirectory, you'll find an installation.tex file.
<godbyk> The .tex files are the LaTeX source files for our manual.
<godbyk> You can view the installation.tex file online at http://bazaar.launchpad.net/~ubuntu-manual/ubuntu-manual/trusty/view/head:/installation/installation.tex
<godbyk> While the LaTeX markup may appear daunting at first, it's fairly simple to read and use once you get accustomed to it.
<godbyk> We won't have time in this session to explore the LaTeX markup language, but you can find more information about how we use LaTeX in our style guide.
<godbyk> Our style guide is available online at http://files.ubuntu-manual.org/style-guide.pdf
<godbyk> The style guide covers most of what you'll need to know to participate in the Ubuntu Manual Project:
<godbyk> * how to become a member of the project
<godbyk> * the setup instructions we're coving in this session (and more)
<godbyk> * how we use bzr
<godbyk> * how we use the LaTeX markup language
<godbyk> * information for translators
<godbyk> * usage notes on terminology used in the manual
<godbyk> Back to the installation.tex file (http://bazaar.launchpad.net/~ubuntu-manual/ubuntu-manual/trusty/view/head:/installation/installation.tex)
<godbyk> If you compare the contents of that file to the contents of the Installation chapter in the PDF of our manual (available at http://ubuntu-manual.org//download/13.10/en_US/screen),
<godbyk> you'll see how the markup language handles all of the formatting for us.
<godbyk> For example, we just specify a section heading and LaTeX will decide how to style it (font size, bold, etc.).
<godbyk> Are there any questions about anything we've covered so far?
<godbyk> If you decide you'd like to become an author or editor, please send an email to our mailing list at ubuntu-manual@lists.launchpad.net and we'll help you get started.
<godbyk> You'll be able to choose which section of the manual you'd like to work on.
<godbyk> Okay, next, we'll see how our manual is translated into various languages.
<godbyk> As I mentioned before, our manual is translated into a number of languages.
<godbyk> If you'd like to help with one of the existing languages or translate the manual into a new language, just let us know!
<godbyk> Instructions for translators are available online at http://ubuntu-manual.org/getinvolved/translators and in our style guide (available at http://files.ubuntu-manual.org/style-guide.pdf).
<godbyk> Becoming a translator is pretty easy.
<godbyk> The first step is to create a Launchpad account if you don't already have one.
<godbyk> We covered that in detail earlier.
<godbyk> Once you've created an account, go to your page: launchpad.net/~
<godbyk> Click on the yellow 'edit' icon next to the Languages header and add all the language you speak.
<godbyk> Some translation teams require you join their team before you can translate text into that language.
<godbyk> For those teams, you'll need to visit their team page on Launchpad and sign up to join their team. Each team may have its own requirements for joining.
<godbyk> Finally, you can visit our translations page at http://translations.launchpad.net/ubuntu-manual.
<godbyk> You should see your preferred languages listed. Click on the language you'd like to translate to and start translating the text.
<godbyk> As a translator, you will need to learn a bit about the LaTeX markup language to know what parts of the text you should and shouldn't translate.
<godbyk> You can find all the details of this in chapter 7 of our style (again, available at http://files.ubuntu-manual.org/style-guide.pdf).
<godbyk> If you have any questions about translating that aren't answered by our style guide, feel free to ask on the ubuntu-manual mailing list or in the #ubuntu-manual channel here on IRC.
<godbyk> Are there any questions about translating the Ubuntu manual?
<godbyk> All right, if there are any other questions about the Ubuntu Manual project or any of the other Ubuntu docs projects, feel free to ask them in #ubuntu-classroom-chat.
<godbyk> Don't forget to prefix your question with "QUESTION:".
<ClassBot> benonsoftware asked: Is the Ubuntu Manual in the Ubuntu archive?
<godbyk> benonsoftware: The manual isn't currently available in the Ubuntu archive or the Software Center.
<godbyk> You can download a PDF of the manual for free from our website at http://ubuntu-manual.org/downloads
<godbyk> Or you can purchase printed-and-bound copies of the book online at http://ubuntu-manual.org/buy/gswu1310/en_US or through Amazon.com.
<ClassBot> belkinsa asked: Wouldn't be better to use the content from Ubuntu Desktop guide in the Ubuntu Manual?
<godbyk> belkinsa: The manual covers many of the same topics as the desktop docs do, but it's in a different form.
<godbyk> The desktop docs are written in a topic-based way. They're designed to answer an immediate 'how do I...?' question.
<godbyk> The manual is designed to be something that you could sit down and read through as you learn Ubuntu.
<godbyk> The manual is also useful if you don't have access to the Internet or haven't yet installed Ubuntu to be able to access the desktop docs.
<ClassBot> There are 10 minutes remaining in the current session.
<godbyk> By the way, if you don't want to commit to becoming an author, editor, or translator, you can still help improve the Ubuntu manual by emailing feedback@ubuntu-manual.org with suggestions for how we can improve the manual.
<godbyk> If you found a typo, incorrect or outdated information, or have a suggestion for a topic we should write about, feel free to email us.
<ClassBot> jsjgruber-l101-p asked: Does the printed manual come with an Ubuntu CD?
<godbyk> jsjgruber-l101-p: The printed manual doesn't come with an Ubuntu CD at this time.
<godbyk> It's a good idea, though, and something we'd love to be able to do in the future!
<godbyk> Are there any other questions about the Ubuntu manual or any of the other Ubuntu docs projects?
<godbyk> In a few minutes, the next session will start: Ubuntu Manual versions explained by tacorwin.
<ClassBot> There are 5 minutes remaining in the current session.
* ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - https://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Questions in #ubuntu-classroom-chat || Event: Ubuntu Documentation Day - Current Session: Ubuntu Manual versions explained - Instructors: tacorwin, patrickdickey
<ClassBot> Logs for this session will be available at http://irclogs.ubuntu.com/2014/03/02/%23ubuntu-classroom.html following the conclusion of the session.
<tacorwin> Hello everyone! Before we start, I'd like to mention that there will be three sections in this session: The Ubuntu Manual, the Lubuntu Manual, and a proposed project, the Wine on Ubuntu Manual project.
<tacorwin> Please save all questions until the end of each section, respectively.
<tacorwin> Since godbyk has explained the Ubuntu Manual, I won't go in depth, but rather skim the topic.
<tacorwin> The Ubuntu Manual project was created in 2009 by Benjamin Humphrey to provide up-to-date information for new users of the Ubuntu OS.
<tacorwin> We try to make every ounce of information educational an simple to understand to lower the Linux barrier for new users.
<tacorwin> There are many ways to contribute to the manual: Becoming an author, editor, translator, designer, etc.
<tacorwin> I will be skipping the "how to contribute" portion, as it was previously explained.
<tacorwin> As I said, this was brief.
<tacorwin> Any questions pertaining to the Ubuntu Manual?
<tacorwin> Okay. The next topic is the Lubuntu Manual Project.
<tacorwin> The Lubuntu Manual was just created last year to provide the same form of documentation for the Lubuntu variant.
<tacorwin> The contribution types are the same (Author, Editor, etc.), but things are a bit shaky at the moment, as they are trying to start the actual work of the first manual release.
<tacorwin> To contribute, follow this link. https://wiki.ubuntu.com/Lubuntu/DocumentationTeam/Manual
<tacorwin> There is a Launchpad project for the Lubuntu Manual as well, that you should add to become part of the team.
<tacorwin> You can simply join Lubuntu Wiki and Docs Team and after the administrator of the team approve your request, please send an introduction email to the list and make yourself known.
<tacorwin> This will ensure that your efforts are known to all members.
<tacorwin> You should also add your name to the list on the page (referring to the last link).
<tacorwin> There really aren't a whole lot of details I can give at this point about the LMP, because they have recently started up, and haven't entirely started releasing a manual.
<tacorwin> If there are any specific questions about this manual, you can ask now.
<tacorwin> We have one more topic to cover, the Wine on Ubuntu Manual Project.
<tacorwin> I can give more information on this manual, unlike the others because I have proposed it and have (slowly) started the production of it.
<tacorwin> In a nutshell, the WOUMP (abbr.) is an attempt to lower the Linux barrier even more by explaining how to run a lot of Windows programs on a Linux OS (Ubuntu) using WINE (Wine Is Not an Emulator)
<tacorwin> This manual was proposed about 6 months ago, by myself, and will hopefully be adapted as an official Ubuntu Manual Project affiliate.
<ClassBot> There are 10 minutes remaining in the current session.
<tacorwin> Right now, contributors are needed to start the project in the right direction, but I will explain what will be contained.
<tacorwin> Installation, configuration, usage, and uninstallation are just a few of the topics planned to be in the manual.
<tacorwin> For a list of plausible sections, go to: https://docs.google.com/spreadsheet/ccc?key=0ApexI9z0UYtGdERqWHpEZmpXVUgwZV9CeExFdlNBT0E&usp=docslist_api
<tacorwin> This is a spreadsheet containing the old authors and editors list I was going to uses
<tacorwin> I will use the last few minutes to answer specific questions about this manual, as well as any others mentioned previously.
<ClassBot> There are 5 minutes remaining in the current session.
<ClassBot> belkinsa asked: How many are in the WINE Manual team at the moment?
<tacorwin> One, unfortunately.
<tacorwin> I'm currently trying to find other contributors.
<tacorwin> belkinsa: forgot to put your name. :P
<ClassBot> belkinsa asked: Have you done anything to promote it?
<tacorwin> belkinsa: not exactly. I wanted to further organize it before I began a full-scale team.
<tacorwin> Any other questions? :)
<ClassBot> Logs for this session will be available at http://irclogs.ubuntu.com/2014/03/02/%23ubuntu-classroom.html
<pleia2> thanks tacorwin!
<tacorwin> This was the last session for today's Documentation Day. Thank you all for attending.
* ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - https://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Questions in #ubuntu-classroom-chat || No Sessions Currently in Progress
<tacorwin> :) anytime pleia2
