<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Martin Pitt &#187; development</title>
	<atom:link href="http://www.piware.de/tag/development/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.piware.de</link>
	<description>addicted to Ubuntu development</description>
	<lastBuildDate>Fri, 03 Feb 2012 07:03:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.5</generator>
		<item>
		<title>PackageKit/aptdaemon &#8220;what-provides&#8221; plugin support</title>
		<link>http://www.piware.de/2012/02/packagekitaptdaemon-what-provides-plugin-support/</link>
		<comments>http://www.piware.de/2012/02/packagekitaptdaemon-what-provides-plugin-support/#comments</comments>
		<pubDate>Fri, 03 Feb 2012 07:03:48 +0000</pubDate>
		<dc:creator>pitti</dc:creator>
				<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[announcement]]></category>
		<category><![CDATA[apt]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[packagekit]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://www.piware.de/?p=586</guid>
		<description><![CDATA[PackageKit has a &#8220;WhatProvides&#8221; API for mapping distribution independent concepts to particular package names. For example, you could ask &#8220;which packages provide a decoder for AC3 audio files? $ pkcon what-provides "gstreamer0.10(decoder-audio/ac3)" [...] Installed gstreamer0.10-plugins-good-0.10.30.2-2ubuntu2.amd64 GStreamer plugins from the "good" set Available gstreamer0.10-plugins-ugly-0.10.18-3ubuntu4.amd64 GStreamer plugins from the "ugly" set This is the kind of question [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.packagekit.org/">PackageKit</a> has a &#8220;WhatProvides&#8221; API for mapping distribution independent concepts to particular package names. For example, you could ask &#8220;which packages provide a decoder for AC3 audio files?</p>
<pre>
$ pkcon what-provides  "gstreamer0.10(decoder-audio/ac3)"
[...]
Installed   	gstreamer0.10-plugins-good-0.10.30.2-2ubuntu2.amd64	GStreamer plugins from the "good" set
Available  	gstreamer0.10-plugins-ugly-0.10.18-3ubuntu4.amd64	GStreamer plugins from the "ugly" set
</pre>
<p>This is the kind of question your video player would ask the system if it encounters a video it cannot play. In reality they of course use the D-BUS or the library API, but it&#8217;s easier to demonstrate with the PackageKit command line client.</p>
<p>PackageKit <a href="https://gitorious.org/packagekit/packagekit/blobs/master/docs/provides-component-naming.txt">provides a fair number of those concepts</a>; I recently added <a href="https://gitorious.org/packagekit/packagekit/commit/0c6db3f2118dbb723529b24af11a136d19900244">LANGUAGE_SUPPORT</a> for packages which provide dictionaries, spell checkers, and other language support for a given language or locale code.</p>
<p>However, PackageKit&#8217;s apt backend does not actually implement a lot of these (only CODEC and MODALIAS), and aptdaemons&#8217;s PackageKit compatibility API does not implement any. That might be because their upstreams do not know enough how to do the mapping for a particular distro/backend, because doing so involves distro specific code which should not go into upstreams, or simply because of the usual chicken-egg problem of app developers rather doing their own thing instead of using generic APIs.</p>
<p>So this got discussed between Sebastian Heinlein and me, and voila, <a href="https://gitorious.org/packagekit/packagekit/commit/b516f18e28c708d31f0a85b35ca3ec47fb3bd16c">there it is</a>: it is now very easy to provide Python plugins for &#8220;what-provides&#8221; to implement any of the existing types. For example, <a href="https://launchpad.net/ubuntu/+source/language-selector/+changelog">language-selector</a> now ships a plugin which implements LANGUAGE_SUPPORT, so you can ask &#8220;which packages do I need for Chinese in China&#8221; (i. e. simplified Chinese)?</p>
<pre>
$ pkcon what-provides "locale(zh_CN)"
[...]
Available   	firefox-locale-zh-hans-10.0+build1-0ubuntu1.all	Simplified Chinese language pack for Firefox
Available   	ibus-sunpinyin-2.0.3-2.amd64            	sunpinyin engine for ibus
Available   	language-pack-gnome-zh-hans-1:12.04+20120130.all	GNOME translation updates for language Simplified Chinese
Available   	ttf-arphic-ukai-0.2.20080216.1-1.all    	"AR PL UKai" Chinese Unicode TrueType font collection Kaiti style
[...]
</pre>
<p><a href="http://blogs.gnome.org/rodrigo/">Rodrigo Moya</a> is currently working on implementing the <a href="https://live.gnome.org/Design/SystemSettings/RegionAndLanguage">control-center region panel redesign</a> in a <a href="http://git.gnome.org/browse/gnome-control-center/log/?h=wip/install-languages">branch</a>. This uses exactly this feature.</p>
<p>In Ubuntu we usually do not use PackageKit itself, but aptdaemon and its PackageKit API compatibility shim <code>python-aptdaemon.pkcompat</code>. So I <a href="http://bazaar.launchpad.net/~aptdaemon-developers/aptdaemon/main/revision/769">ported that plugin support</a> for aptdaemon-pkcompat as well, so plugins work with either now. Ubuntu Precise got the new aptdaemon (0.43+bzr769-0ubuntu1) and language-selector (0.63) versions today, so you can start playing around with this now.</p>
<p>So how can you write your own plugins? This is a trivial, although rather nonsense example:</p>
<pre>
from packagekit import enums

def my_what_provides(apt_cache, provides_type, search):
    if provides_type in (enums.PROVIDES_CODEC, enums.PROVIDES_ANY):
        return [apt_cache["gstreamer-moo"]]
    else:
        raise NotImplementedError('cannot handle type ' + str(provides_type))
</pre>
<p>The function gets an <code>apt.Cache</code> object, one of <code>enums.PROVIDES_*</code> and the actual search type as described <a href="https://gitorious.org/packagekit/packagekit/blobs/master/docs/provides-component-naming.txt">in the documentation</a> (above dummy example does not actually use it). It then decides whether it can handle the request and return a list of <code>apt.package.Package</code> objects (i. e. values in an <code>apt.Cache</code> map), or raise a <code>NotImplementedError</code> otherwise.</p>
<p>You register the plugin through Python pkg-resources in your setup.py (this needs setuptools):</p>
<pre>
   setup(
       [....]

       entry_points="""[packagekit.apt.plugins]
what_provides=my_plugin_module_name:my_what_provides
""",
       [...])
</pre>
<p>You can register arbitrarily many plugins, they will be all called and their resulting package lists joined.</p>
<p>All this will hopefully help a bit to push distro specifics to the lowest possible levels, and use upstream friendly and distribution agnostic APIs in your applications.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.piware.de/2012/02/packagekitaptdaemon-what-provides-plugin-support/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>libxklavier is now introspectable</title>
		<link>http://www.piware.de/2012/01/libxklavier-is-now-introspectable/</link>
		<comments>http://www.piware.de/2012/01/libxklavier-is-now-introspectable/#comments</comments>
		<pubDate>Wed, 11 Jan 2012 21:07:34 +0000</pubDate>
		<dc:creator>pitti</dc:creator>
				<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[announcement]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[gobject-introspection]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://www.piware.de/?p=577</guid>
		<description><![CDATA[On my 8 hour train ride to Budapest last Sunday I finally worked on making libxklavier introspectable. Thanks to Sergey&#8217;s fast review the code now landed in trunk. I sent a couple of refinements to the bug report still, but those are mostly just icing on the cake, the main functionality of getting and setting [...]]]></description>
			<content:encoded><![CDATA[<p>On my 8 hour train ride to Budapest last Sunday I finally worked on making <a href="http://freedesktop.org/wiki/Software/LibXklavier">libxklavier</a> <a href="https://live.gnome.org/GObjectIntrospection">introspectable</a>. Thanks to Sergey&#8217;s fast review the code now <a href="http://cgit.freedesktop.org/libxklavier/">landed in trunk</a>. I sent a couple of refinements to the <a href="https://bugs.freedesktop.org/show_bug.cgi?id=44581">bug report</a> still, but those are mostly just icing on the cake, the main functionality of getting and setting keyboard layouts is working nicely now (see the <a href="http://cgit.freedesktop.org/libxklavier/tree/tests/test_gi.py">example script</a>).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.piware.de/2012/01/libxklavier-is-now-introspectable/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Riding the Pangolin</title>
		<link>http://www.piware.de/2011/11/riding-the-pangolin/</link>
		<comments>http://www.piware.de/2011/11/riding-the-pangolin/#comments</comments>
		<pubDate>Fri, 04 Nov 2011 15:31:12 +0000</pubDate>
		<dc:creator>pitti</dc:creator>
				<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[testing]]></category>
		<category><![CDATA[uds]]></category>

		<guid isPermaLink="false">http://www.piware.de/?p=545</guid>
		<description><![CDATA[Just took the plunge, using the excellent bandwidth and local mirror at UDS: $ lsb_release -irc Distributor ID: Ubuntu Release: 12.04 Codename: precise Nothing blew up in my face, so it seems today is a good day to die^Wupgrade.]]></description>
			<content:encoded><![CDATA[<p>Just took the plunge, using the excellent bandwidth and local mirror at UDS:<br />
<code><br />
$ lsb_release -irc<br />
Distributor ID:	Ubuntu<br />
Release:	12.04<br />
Codename:	precise<br />
</code></p>
<p>Nothing blew up in my face, so it seems today is a good day to die^Wupgrade.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.piware.de/2011/11/riding-the-pangolin/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Apport: debug symbol retrieval now in GUI</title>
		<link>http://www.piware.de/2011/10/apport-debug-symbol-retrieval-now-in-gui/</link>
		<comments>http://www.piware.de/2011/10/apport-debug-symbol-retrieval-now-in-gui/#comments</comments>
		<pubDate>Sun, 30 Oct 2011 11:18:49 +0000</pubDate>
		<dc:creator>pitti</dc:creator>
				<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[announcement]]></category>
		<category><![CDATA[Apport]]></category>
		<category><![CDATA[bugs]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[QA]]></category>
		<category><![CDATA[symbolic stack trace]]></category>

		<guid isPermaLink="false">http://www.piware.de/?p=534</guid>
		<description><![CDATA[On a rather calm ten-hour flight to Orlando I once again did some pygobject, udisks, and Apport hacking (It&#8217;s scary how productive one can be when not constantly being interrupted by IRC, email, etc). One more visible change amongst these was finally fixing a five year old five-digit bug to integrate apport-retrace into the GUI, [...]]]></description>
			<content:encoded><![CDATA[<p>On a rather calm ten-hour flight to Orlando I once again did some pygobject, udisks, and Apport hacking (It&#8217;s scary how productive one can be when not constantly being interrupted by IRC, email, etc). One more visible change amongst these was finally fixing a <a href="https://launchpad.net/bugs/75901">five year old five-digit bug</a> to integrate <a href="manpages.ubuntu.com/apport-retrace">apport-retrace</a> into the GUI, now that it <a href="http://www.piware.de/2011/08/apport-retrace-made-useful/">does not potentially wreck your installation any more</a>.</p>
<p>If the <code>apport-retrace</code> package is installed, the crash detail dialog will show a new &#8220;Examine locally&#8221; button:</p>
<p><img src="http://piware.de/wp-uploads/2011/10/crash-details.png" alt="Apport crash detail dialog" title="Apport crash detail dialog" /></p>
<p>After clicking this, you can choose what do do exactly:</p>
<p><img src="http://piware.de/wp-uploads/2011/10/retrace-dialog.png" alt="Retrace action dialog" title="Retrace action dialog"  /></p>
<p>I know this dialog is not a beauty, as it&#8217;s implemented using the <code>ui_question_choice()</code> API which is used by package hooks. That makes it work for all available UIs (GTK, KDE, CLI), though, and can easily be extended to have more actions. And if you get this far and want to stack traces, you are used to looking at eye-bleeding gibberish anyway..</p>
<p>Presumably the most useful (and default) action is to download all the debug symbols, open a Terminal, and put you into a GDB session with all these, and the core dump loaded, so that you can poke around the crashed program state with all symbols available.</p>
<p>But you can also run gdb without downloading debug symbols, or just update the .crash report file with a fully symbolic stack trace.</p>
<p>This works just as well in <code>apport-cli</code>, but not yet in the KDE version: Someone needs to implement the equivalent of <a href="http://bazaar.launchpad.net/~apport-hackers/apport/trunk/revision/2007">the apport-gtk implementation</a> to <code>apport-kde</code> and <code>kde/bugreport.ui</code>, i. e. show an &#8220;Examine locally&#8221; button if <code>self.can_examine_locally()</code> is true, and add an appropriate <code>ui_run_terminal()</code> method (which should be fairly similar to the GTK one, just with Qt/KDEish terminal emulators). But as Kubuntu does not currently use Apport (and also because I didn&#8217;t have all the dependencies installed on my laptop) I did not yet do this. Please catch me on IRC/mail/merge proposal if you want to work on this. If you look at above commit, the changes to the GtkBuilder file look huge, but that&#8217;s only because I haven&#8217;t touched it for ages and the current Glade shuffled the elements quite a bit; it just adds the button to the dialog.</p>
<p>For now this is all sitting in trunk, I&#8217;ll do a new upstream release and Ubuntu precise upload soon.</p>
<p>Happy debugging!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.piware.de/2011/10/apport-debug-symbol-retrieval-now-in-gui/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>apport-retrace made useful</title>
		<link>http://www.piware.de/2011/08/apport-retrace-made-useful/</link>
		<comments>http://www.piware.de/2011/08/apport-retrace-made-useful/#comments</comments>
		<pubDate>Fri, 26 Aug 2011 15:20:58 +0000</pubDate>
		<dc:creator>pitti</dc:creator>
				<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[announcement]]></category>
		<category><![CDATA[Apport]]></category>
		<category><![CDATA[bugs]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[QA]]></category>
		<category><![CDATA[stacktrace]]></category>

		<guid isPermaLink="false">http://www.piware.de/?p=508</guid>
		<description><![CDATA[The tool to reprocess an Apport crash report to produce a symbolic stack trace, apport-retrace, has been pretty hard to use on a developer system so far: It either installed the packages from the crash report, plus its debug symbol packages (&#8220;ddebs&#8221;) into the running system (which frequently caused problems like broken dependencies), or it [...]]]></description>
			<content:encoded><![CDATA[<p>The tool to reprocess an Apport crash report to produce a symbolic stack trace, <a href="http://manpages.ubuntu.com/apport-retrace">apport-retrace</a>, has been pretty hard to use on a developer system so far: It either installed the packages from the crash report, plus its debug symbol packages (&#8220;ddebs&#8221;) into the running system (which frequently caused problems like broken dependencies), or it required setting up a chroot and using apport-chroot with fakechroot and fakeroot.</p>
<p>I&#8217;m happy to announce that with Apport 1.22, which landed in Oneiric yesterday, this has now become much easier: In the default mode it just calls gdb on the report&#8217;s coredump, i. e. expects that all the necessary packages are already installed and will complain about the missing ones. But with the new <code>--sandbox</code>/<code>-S</code>mode, it will just create a temporary directory, download and unpack packages there, and run gdb with some magic options to consider that directory a &#8220;virtual root&#8221;. These options haven&#8217;t been available back when this stuff was written the first time, which is why it used to be so complicated with fakechroots, etc. Now this does not need any root privileges, <code>chroot()</code> calls, etc.</p>
<p>As it only downloads and installs the bare minimum, and does not involve any of the dpkg/apt overhead (maintainer scripts, etc.), it has also become quite a lot faster. That&#8217;s how the apport retracers were able to dig through a backlog of about a thousand bugs in just a couple of hours.</p>
<p>So now, if you locally want to retrace or investigate a crash, you can do</p>
<pre>
   $ apport-retrace -s -S system /var/crash/_usr_bin_gedit.1000.crash
</pre>
<p>to get the stack traces on stdout, or</p>
<pre>
   $ apport-retrace -g -S system /var/crash/_usr_bin_gedit.1000.crash
</pre>
<p>to be put into a gdb session.</p>
<p>If you do this regularly, it&#8217;s highly recommended to use a permanent cache dir, where apt can store its indexes and downloaded packages: Use <code>-C ~/.cache/apport-retrace</code> for this (or the long version <code>--cache</code>).</p>
<p>You can also use this to reprocess crashes for a different release than the one you are currently running, by creating a config directory with an appropriate apt <code>sources.list</code>.</p>
<p>The <a href="http://manpages.ubuntu.com/apport-retrace">manpage</a> has all the details. (Note that at the time of this writing, manpages.ubuntu.com still has the old version &#8212; use the local one instead.)</p>
<p>Enjoy, and let me know how this works for you!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.piware.de/2011/08/apport-retrace-made-useful/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Top ideas on Ubuntu Brainstorm (March 2011)</title>
		<link>http://www.piware.de/2011/04/top-ideas-on-ubuntu-brainstorm-march-2011/</link>
		<comments>http://www.piware.de/2011/04/top-ideas-on-ubuntu-brainstorm-march-2011/#comments</comments>
		<pubDate>Thu, 21 Apr 2011 10:52:35 +0000</pubDate>
		<dc:creator>pitti</dc:creator>
				<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[announcement]]></category>
		<category><![CDATA[brainstorm]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[technical-board]]></category>

		<guid isPermaLink="false">http://www.piware.de/?p=473</guid>
		<description><![CDATA[Update at 13:06 UTC: Corrected NetworkManager description, thanks Mathieu for pointing out. A few months ago, Matt Zimmerman kicked offa new tradition of a quarterly review of the most popular Ubuntu Brainstorm ideas. He did the December review, now it was my turn to coordinate the March review. 7zip desktop support (#26504) The 7zip compression [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Update at 13:06 UTC:</strong> Corrected NetworkManager description, thanks Mathieu for pointing out.</p>
<p>A few months ago, Matt Zimmerman <a href="http://mdzlog.alcor.net/2010/11/03/weathering-the-ubuntu-brainstorm/">kicked off</a>a new tradition of a quarterly review of the most popular <a href="http://brainstorm.ubuntu.com/">Ubuntu Brainstorm</a> ideas. He did the <a href="http://mdzlog.alcor.net/2010/12/10/ubuntu-brainstorm-top-10-for-december-2010/">December review</a>, now it was my turn to coordinate the March review.</p>
<h3>7zip desktop support (<a href="http://brainstorm.ubuntu.com/idea/26504/">#26504</a>)</h3>
<p>The <a href="http://www.7-zip.org/">7zip compression format</a> becomes increasingly more popular these days; Ubuntu releases up to 10.10 did not support it on the desktop support as well as older formats like zip or bzip2.</p>
<p>Ubuntu developer Sebastien Bacher responds:</p>
<blockquote><p>The 7z format has in fact been supported by file-roller for quite some time but it does require the installation of the command lines utilities to work. The issue is pretty much addressed in Ubuntu 11.04 (Natty) though since file-roller [...] will ask you if you want to install &#8220;p7zip&#8221; when you try open an archive using that format.</p></blockquote>
<p>The other part of the brainstorm request is to also add support for it to gvfs, i. e. that you can browse a 7zip archive as a virtual storage device.This <a href="http://code.google.com/p/libarchive/issues/detail?id=41">can&#8217;t be supported</a>, as the library which is used for this (<code>libarchive</code>) only supports streamable format for efficiency. 7zip is not streamable, and thus would provide a very poor performance.</p>
<h3>Empty directories in the Nautilus file manager (<a href="http://brainstorm.ubuntu.com/idea/26335/">#26335</a>)</h3>
<p>In tree view mode, nautilus currently displays an expander symbol even if a directory is empty. This looks slightly confusing and makes it harder to see which directories actually have content.</p>
<p>This is indeed <a href="https://bugzilla.gnome.org/show_bug.cgi?id=44304 ">a long-standing known problem</a> (the upstream bug is almost ten years old!). Rodrigo Moya, one of the GNOME maintainers in the Ubuntu desktop team, explains why fixing this is actually a lot harder than it might seem initially: Checking each folder to see if it&#8217;s got children or not might be time and CPU consuming when displaying lots of subfolders; it gets worse if you are browsing a directory on a remote or slow virtual file system like gphoto cameras or compressed tarballs.</p>
<p>One possible improvement would be to do the test asynchronously and display/hide the expander arrow as the subfolders are checked, and possibly restrict this to local file systems with a maximum number of directory entries. This would create an inconsistency, though.</p>
<p>So unfortunately it is not very realistic to see this being addressed soon.</p>
<h3>Login screen (gdm) improvements (<a href="http://brainstorm.ubuntu.com/idea/26482/">#26482</a>)</h3>
<p>This item suggests adding features to gdm which make it more useful, such as adding a clock, widgets, or a guest session without requiring an already existing running user session.</p>
<p>Ubuntu and GNOME developer Robert Ancell has a lot of experience with both gdm as well as his own <a href="https://launchpad.net/lightdm">LightDM</a> project.</p>
<p>He points out that in GNOME 3 a clock was added to the login screen and <a href="https://live.gnome.org/GnomeShell/Design/Whiteboards/LoginScreen">looks similar</a> to the proposed design. So we will get that in Ubuntu 11.10. Other changes to gdm should be discussed and proposed <a href="https://bugzilla.gnome.org/browse.cgi?product=gdm ">in the upstream bug tracker</a>.</p>
<p>For 11.10 there is an existing proposal to <a href="https://blueprints.launchpad.net/ubuntu/+spec/packageselection-desktop-n-display-manager">use LightDM by default</a>. LightDM offers a a lot more and easier possibilities for customization and theming, so any contributions for writing widgets or other improvements will be welcome.</p>
<h3>Easy side-by-side window arrangement (<a href="http://brainstorm.ubuntu.com/idea/26152/">#26152</a>)</h3>
<p>With nowaday&#8217;s modern big screens it often is too wasteful or even impractical to run applications fullscreen. A common case is to arrange two applications (such as a web browser and a document editor) side by side. This hasn&#8217;t had any particular support up to Ubuntu 10.10, aside from moving and resizing windows manually to fit.</p>
<p>John Lea of the Canonical Design Team explains how the main use case has been implemented in Ubuntu 11.04:</p>
<blockquote><p>Windows can be opened into semi-maximised state where they occupy 50% of the screen width simply by dragging the window to the left or right border of the screen. A preview shadow informs the user that if they drop the window in this location the window will be resized. This interaction provides a simple, clean solution to the problem without introducing any additional window chrome.</p></blockquote>
<p>Note that the remaining part of the request, resizing two adjacent windows at the same time, is not currently provided. It is quite a complex interaction which can also trigger false positives, and probably also requires some deeper design studies to get the user experience and definition of &#8220;adjacent&#8221; right. There are currently no plans to implement this.</p>
<h3><code>man</code> usability (<a href="http://brainstorm.ubuntu.com/idea/25975/">#25975</a>)</h3>
<p>First-time users of the <code>man</code> utility often wonder how to quit the program again after they are done reading. Neither the manpage itself nor &#8211;help explain that, or other keys for navigation.</p>
<p>Colin Watson is one of the man-db upstream developers. He responds:</p>
<blockquote><p>I&#8217;ve made a change upstream for man-db 2.6.0 which will address this, by adding &#8220;(press h for help or q to quit)&#8221; to the default prompt string which is displayed on the bottom line of the screen when reading manual pages. I think this is a reasonable balance between providing guidance and taking up too much screen space, and people who get fed up of seeing it can always follow the documentation in man(1) for customising the prompt.</p>
<p>[...] It will definitely be in Ubuntu 11.10.</p></blockquote>
<h3>Naming of Ethernet connections in the UI (<a href="http://brainstorm.ubuntu.com/idea/27250/">#27250</a>)</h3>
<p>When connecting to a wired network, it automatically gets assigned a name like &#8220;Auto eth0&#8243;. Many people will not know what this is, or even if they do, distinguishing between one or another is difficult.</p>
<p>Our NetworkManager maintainer Mathieu Trudel-Lapierre adopted this problem, and wrote a detailled blog entry about <a href="http://blog.cyphermox.net/2011/03/idea-27250-auto-eth0-isnt-very-user.html">how connection naming will be done in Ubuntu 11.10</a>. In particular, network-manager will make the meaning of the default profiles clearer, and notifications will contain &#8220;Wired network&#8221; in addition to &#8220;eth0&#8243;. We still need to keep the actual interface name for more experienced users who want to customize their network configuration.</p>
<p>For the case of telling apart multiple ethernet adapters, Ubuntu 11.04 already layed the foundation for <a href="https://blueprints.launchpad.net/ubuntu/+spec/packageselection-n-network-stack">integrating biosdevname</a>, which will provide more meaningful names to Ethernet ports than just enumerating them in an arbitrary order, provided that the BIOS provides names for these. It is not enabled by default yet, but might be in 11.10.</p>
<h3>Save dialogs should have the three most recently used folders (<a href="http://brainstorm.ubuntu.com/idea/26471/">#26471</a>)</h3>
<p>When saving files you often choose the same couple of folders to store your data. Sadly, the drop down menu for the save-as-dialog box only shows the last folder where you have saved a file. Another common use case is to save a document in e. g. Firefox somewhere, and wanting to open it in another application again.</p>
<p>The desktop world is moving towards better tracking of what the user did most recently, so we asked the <a href="https://launchpad.net/zeitgeist">Zeitgeist</a> developers about the feasibility of this. Manish Sinha discussed the idea within the project and also with the GTK developers, and summarized <a href="https://lists.ubuntu.com/archives/technical-board/2011-April/000785.html">the possible options</a> in an email to the technical board list.</p>
<p>We don&#8217;t currently know about any developer who wants to work on this. GTK developer Federico Mena Quintero said that it is not too difficult to do, and that he would be happy to guide someone who wants to pick this up. So if this interests you, please give him a ping.</p>
<h3>Configure auto-mounting of internal drives (<a href="http://brainstorm.ubuntu.com/idea/26946/">#26946</a>)</h3>
<p>Ubuntu (and GNOME in general) does not automount internal hard drive partitions in general, as this might cause unwanted data disruption on e. g. Windows system partitions, and also has a performance impact. However, in some use cases it would actually be practical to do so for selected partitions.</p>
<p>David Zeuten and Martin Pitt, the current udisks upstream maintainers, discussed options how this should be integrated and found an agreement (see the response in brainstorm for details). In short, the gnome-disk-utility program will grow some options which allow you to configure individual partitions similar to this:</p>
<p><code><br />
  Automatically mount this drive:<br />
  ( ) Never<br />
  (X) When I log in<br />
  ( ) On computer startup<br />
</code></p>
<p>(note that this is in no way a finished design or even user fiendly strings).</p>
<p>The current timeline for this is to implement this for GNOME 3.4, which would be in time for Ubuntu 12.04.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.piware.de/2011/04/top-ideas-on-ubuntu-brainstorm-march-2011/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Improved PyGI documentation</title>
		<link>http://www.piware.de/2011/04/improved-pygi-documentation/</link>
		<comments>http://www.piware.de/2011/04/improved-pygi-documentation/#comments</comments>
		<pubDate>Tue, 12 Apr 2011 18:16:26 +0000</pubDate>
		<dc:creator>pitti</dc:creator>
				<category><![CDATA[debian]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[announcement]]></category>
		<category><![CDATA[application-developers]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[documentation]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[gobject-introspection]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[pygobject]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://www.piware.de/?p=463</guid>
		<description><![CDATA[As a followup action to my recent Talk about PyGI I now re-used my notes to provide some real wiki documentation. It would be great if you could add package name info for Fedora/SUSE/etc., and perhaps add more example links for porting different kinds of software! Please also let me know if you have suggestions [...]]]></description>
			<content:encoded><![CDATA[<p>As a followup action to my recent <a href="http://www.piware.de/2011/04/pygtk-is-dead-long-live-pygi-app-developer-week-talk/">Talk about PyGI</a> I now re-used my notes to provide some real <a href="https://live.gnome.org/PyGObject/IntrospectionPorting">wiki documentation</a>. </p>
<p>It would be great if you could add package name info for Fedora/SUSE/etc., and perhaps add more example links for porting different kinds of software! Please also let me know if you have suggestions how to improve the structure of the page.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.piware.de/2011/04/improved-pygi-documentation/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>PyGTK is dead, long live PyGI! &#8211; App Developer Week Talk</title>
		<link>http://www.piware.de/2011/04/pygtk-is-dead-long-live-pygi-app-developer-week-talk/</link>
		<comments>http://www.piware.de/2011/04/pygtk-is-dead-long-live-pygi-app-developer-week-talk/#comments</comments>
		<pubDate>Fri, 08 Apr 2011 14:08:15 +0000</pubDate>
		<dc:creator>pitti</dc:creator>
				<category><![CDATA[debian]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[announcement]]></category>
		<category><![CDATA[application-developers]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[gobject-introspection]]></category>
		<category><![CDATA[presentation]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://www.piware.de/?p=456</guid>
		<description><![CDATA[On next Monday this cycle&#8217;s Ubuntu Application Developer Week classes will start. The topic that kept me busy most in this cycle was Python gobject-introspection, and porting pygtk2 apps to PyGI (see my initial steps and my report from the PyGI hackfest.) To spread the love, there will be two talks about this next week: [...]]]></description>
			<content:encoded><![CDATA[<p>On next Monday this cycle&#8217;s <a href="https://wiki.ubuntu.com/UbuntuAppDeveloperWeek">Ubuntu Application Developer Week</a> classes will start.</p>
<p>The topic that kept me busy most in this cycle was Python <a href="http://live.gnome.org/GObjectIntrospection">gobject-introspection</a>, and porting pygtk2 apps to PyGI (see <a href="http://www.piware.de/2010/11/gtk-3-0gir-application-porting-successes-and-problems/">my initial steps</a> and <a href="http://www.piware.de/2011/01/na-zdravi-pygi/">my report from the PyGI hackfest</a>.)</p>
<p>To spread the love, there will be two talks about this next week: On Monday 17:00 UTC the very Tomeu Vizoso himself will explain what gobject-introspection (&#8220;GI&#8221;) is, why we need it, and how library developers use it to ship a good and useful GI binding (&#8220;typelib&#8221;) for application developers. I will then follow up on Tuesday 16:00 UTC about the app developer side, in particular how to use the GI typelibs in Python, and how to port PyGTK2 applications to PyGI.</p>
<p>For the most part these sessions are distribution neutral (we don&#8217;t have any special sauce for this in Debian/Ubuntu, it all happened right upstream <img src='http://www.piware.de/wp/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> ); only a very small fraction of it (where I explain package names, etc.) will be specific to Debian/Ubuntu, but shouldn&#8217;t be hard to apply to other distributions as well.</p>
<p>So please feel invited to join, and bombard us with questions!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.piware.de/2011/04/pygtk-is-dead-long-live-pygi-app-developer-week-talk/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>New Apport feature: custom bug duplicate identification</title>
		<link>http://www.piware.de/2011/03/new-apport-feature-custom-bug-duplicate-identification/</link>
		<comments>http://www.piware.de/2011/03/new-apport-feature-custom-bug-duplicate-identification/#comments</comments>
		<pubDate>Sat, 19 Mar 2011 15:23:54 +0000</pubDate>
		<dc:creator>pitti</dc:creator>
				<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[announcement]]></category>
		<category><![CDATA[Apport]]></category>
		<category><![CDATA[bugs]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[QA]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://www.piware.de/?p=447</guid>
		<description><![CDATA[Apport has provided built-in support for automatically identifying and marking duplicate bug reports for normal signal as well as Python crashes. However, we have more kinds of bug reports submitted through Apport which could benefit from automatic duplication: X.org GPU freezes, package installation failures, kernel oopses, or gcc internal compiler errors, i. e. pretty much [...]]]></description>
			<content:encoded><![CDATA[<p><a href="https://launchpad.net/apport">Apport</a> has provided built-in support for automatically identifying and marking duplicate bug reports for normal signal as well as Python crashes. However, we have more kinds of bug reports submitted through Apport which could benefit from automatic duplication: X.org GPU freezes, package installation failures, kernel oopses, or gcc internal compiler errors, i. e. pretty much everything that gets reported automatically these days.</p>
<p>The latest Apport 1.20 (which also just hit current Ubuntu Natty) now allows <a href="http://bazaar.launchpad.net/~apport-hackers/apport/trunk/view/head:/doc/package-hooks.txt">package hooks</a> to set a special field <code>DuplicateSignature</code>, which abstracts the concept for other kinds of bug reports where Apport doesn&#8217;t do automatic duplication. This field should both uniquely identify the problem class (e. g. &#8220;XorgGPUFreeze&#8221;) as well as the particular problem, i. e. variables which tell this instance apart from different problems. Aside from these requirements, the value can be any free-form string, Apport only treats it as an opaque value. It doesn&#8217;t even need to be ASCII only or only be one line, but for better human inspection I recommend this.</p>
<p>So your report could do something like</p>
<pre>
   report['DuplicateSignature'] = 'XorgGPUFreeze: instruction %s regs:%s:%s:%s' % (
                     current_instruction, regs[0], regs[1], regs[2])
</pre>
<p>or</p>
<pre>
    report['DuplicateSignature'] = 'PackageFailure: ' + log.splitlines()[-1]
</pre>
<p>This is integrated into Apport&#8217;s already existing <a href="http://bazaar.launchpad.net/~apport-hackers/apport/trunk/view/head:/apport/crashdb.py">CrashDatabase</a> class, which maintains a signature →master bug mapping in a SQLite database. So far these contained the crash signatures (built from executable name, signal number, and the topmost 5 stack trace names). As usual, if an incoming report defines a duplicate signature (from the crash stack trace or from <code>DuplicateSignature</code>), the first one will become the master bug, and all subsequent reports will automatically get closed as a duplicate in Launchpad.</p>
<p>Thanks to Bryce Harrington, who already came up with using this in the latest <a href="https://launchpad.net/ubuntu/+source/xserver-xorg-video-intel/2:2.14.0-4ubuntu4">Intel X.org graphics driver</a> for GPU hangs!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.piware.de/2011/03/new-apport-feature-custom-bug-duplicate-identification/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Na zdraví PyGI!</title>
		<link>http://www.piware.de/2011/01/na-zdravi-pygi/</link>
		<comments>http://www.piware.de/2011/01/na-zdravi-pygi/#comments</comments>
		<pubDate>Mon, 24 Jan 2011 10:44:20 +0000</pubDate>
		<dc:creator>pitti</dc:creator>
				<category><![CDATA[debian]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[brmlab]]></category>
		<category><![CDATA[conference]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[gobject-introspection]]></category>
		<category><![CDATA[gtk]]></category>
		<category><![CDATA[hackfest]]></category>
		<category><![CDATA[prague]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[pygobject]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://www.piware.de/?p=435</guid>
		<description><![CDATA[(Update: Link to Tomeu&#8217;s blog post, repost for planet.gnome.org) Last week I was in Prague to attend the GNOME/Python 2011 Hackfest for gobject-introspection, to which Tomeu Vizoso kindly invited me after I started working with PyGI some months ago. It happened at a place called brmlab which was quite the right environment for a bunch [...]]]></description>
			<content:encoded><![CDATA[<p>(<strong>Update:</strong> Link to Tomeu&#8217;s blog post, repost for <a href="http://planet.gnome.org/">planet.gnome.org</a>)</p>
<p>Last week I was in Prague to attend the <a href="http://live.gnome.org/Hackfests/Python2011">GNOME/Python 2011 Hackfest for gobject-introspection</a>, to which Tomeu Vizoso kindly invited me after I <a href="http://www.piware.de/2010/11/gtk-3-0gir-application-porting-successes-and-problems/">started working with PyGI some months ago</a>. It happened at a place called <a href="http://brmlab.cz/place">brmlab</a> which was quite the right environment for a bunch of 9 hackers: Some comfy couches and chairs, soldering irons, lots of old TV tubes, chips, and other electronics, a big Pirate flag, really good Wifi, plenty of Club Mate and Coke supplies, and not putting unnecessary effort into mundane things like wallpapers.</p>
<p>It was really nice to get to know the upstream experts John (J5) Palmieri and Tomeu Vizoso (check out <a href="http://blog.tomeuvizoso.net/2011/01/wrap-up-python-gnome-hackfest-2011.html">Tomeu&#8217;s blog post</a> for his summary and some really nice photos). When sitting together in a room, fully focussing on this area for a full week, it&#8217;s so much easier to just ask them about something and getting things done and into upstream than on IRC or bugzilla, where you don&#8217;t know each other personally. I certainly learned a lot this week (and not only how great Czech beer tastes <img src='http://www.piware.de/wp/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  )!</p>
<p>So what did I do?</p>
<h3>Application porting</h3>
<p>After already having ported four Ubuntu PyGTK applications to GI before (<a href="https://launchpad.net/apport">apport</a>, <a href="https://launchpad.net/jockey">jockey</a>, <a href="https://launchpad.net/aptdaemon">aptdaemon</a>, and <a href="https://launchpad.net/language-selector">language-selector</a>),<br />
my main goal and occupation during this week was to start porting a bigger PyGTK application. I picked <a href="http://cyberelk.net/tim/software/system-config-printer/">system-config-printer</a>, as it&#8217;s two magnitudes bigger than the previous projects, exercises quite a lot more of the GTK GI bindings, and thus also exposes a lot more GTK annotation and pygobject bugs. This resulted in a new <a href="http://git.fedorahosted.org/git/?p=system-config-printer.git;a=shortlog;h=refs/heads/pygi">pygi s-c-p branch</a> which has the first 100 rounds of &#8220;test, break, fix&#8221; iterations. It now at least starts, and you can do a number of things with it, but a lot of functionality is still broken.</p>
<p>As a kind of &#8220;finger exercise&#8221; and also to check for how well pygi-convert works for small projects now, I also <a href="https://code.launchpad.net/~pitti/computer-janitor/pygi/+merge/46779">ported computer-janitor</a>. This went really well (I had it working after about 30 minutes), and also led me to finally <a href="http://git.gnome.org/browse/pygobject/commit/?id=7a0548dbfbdfe481f75315b6bc7824a9f1a8a87b">fixing</a> the unicode vs. str mess for GtkTreeView that you got so far with Python 2.x.</p>
<h3>pygobject and GTK fixes</h3>
<p>Porting system-config-printer and computer-janitor uncovered a lot of opportunities to <a href="http://git.gnome.org/browse/pygobject/log/pygi-convert.sh?qt=author&amp;q=martin.pitt">improve pygi-convert.sh</a>, a big &#8220;perl -e&#8221; kind of script to do the mechanical grunt work of the porting process. It doesn&#8217;t fix up changed signatures (such as adding missing arguments which were default arguments in PyGTK, or the ubiquitous &#8220;user_data&#8221; argument for signal handlers), but at least it gets a lot of namespaces, method, and constant names right.</p>
<p>I also fixed three <a href="http://git.gnome.org/browse/gtk+/log/?qt=author&amp;q=martin.pitt">annotation fixes in GTK+</a>. We also collaboratively reviewed and tested <a href="http://git.gnome.org/browse/gtk+/log/?qt=author&amp;q=Pavel+Holejsovsky">Pavel&#8217;s annotation branch</a> which helped to fix tons of problems, especially after Steve Frécinaux&#8217;s excellent <a href="http://git.gnome.org/browse/pygobject/commit/?id=f0a0b6c2eda89622de2b1e5ebb6a48103ad72a42">reference leak fix</a>, so if you play around with current pygobject git head, you really also have to use the current GTK+ git head.</p>
<p>Speaking of which, if you want to port applications and always stay on top of the pygobject/GTK development without having to clutter your package system with &#8220;make install&#8221;s of those, it works very well to have this in your ~/.bashrc:</p>
<pre>export GI_TYPELIB_PATH=$HOME/projects/gtk/gtk:$HOME/projects/gtk/gdk
export PYTHONPATH=$HOME/projects/pygobject</pre>
<h3>Better GVariant/GDBus support</h3>
<p>The GNOME world is moving from the old dbus-glib python bindings to GDBus, which is integrated into GLib. However, dbus-python exposed a really nice and convenient way of doing D-Bus calls, while using GDBus from Python was hideously complicated, especially for <a href="https://bugzilla.gnome.org/show_bug.cgi?id=639939">nontrivial arguments</a> with empty or nested arrays:</p>
<pre>from gi.repository import Gio, GLib
from gi._gi import variant_type_from_string

d = Gio.bus_get_sync(Gio.BusType.SESSION, None)
notify = Gio.DBusProxy.new_sync(d, 0, None, 'org.freedesktop.Notifications',
    '/org/freedesktop/Notifications', 'org.freedesktop.Notifications', None)

vb = GLib.VariantBuilder()
vb.init(variant_type_from_string('r'))
vb.add_value(GLib.Variant('s', 'test'))
vb.add_value(GLib.Variant('u', 1))
vb.add_value(GLib.Variant('s', 'gtk-ok'))
vb.add_value(GLib.Variant('s', 'Hello World!'))
vb.add_value(GLib.Variant('s', 'Subtext'))
# add an empty array
eavb = GLib.VariantBuilder()
eavb.init(variant_type_from_string('as'))
vb.add_value(eavb.end())
# add an empty dict
eavb = GLib.VariantBuilder()
eavb.init(variant_type_from_string('a{sv}'))
vb.add_value(eavb.end())
vb.add_value(GLib.Variant('i', 10000))
args = vb.end()

result = notify.call_sync('Notify', args, 0, -1, None)
id = result.get_child_value(0).get_uint32()
print id</pre>
<p>So I went to making the GLib.Variant constructor work properly with <a href="http://git.gnome.org/browse/pygobject/commit/?id=6d8ff4d5bdda5480089543869535cc3ee83da2f5">nested types</a> and <a href="http://git.gnome.org/browse/pygobject/commit/?id=e97e28048efb966ecc1a03277d36cbaa81b8db7d">boxed variants</a>, adding <a href="http://git.gnome.org/browse/pygobject/commit/?id=b1a98083cdc50653e1d7bfb809bdf089f833df3d">Pythonic GVariant iterators and indexing</a> (so that you can treat GVariant dictionaries/arrays/tuples just like their Python equivalents), and finally a <a href="http://git.gnome.org/browse/pygobject/commit/?id=ecb9f824c503c529d43e585b4cdb4c1c9ab14593">Variant.unpack()</a> method for converting the return value of a D-Bus call back into a native Python data type. This looks a lot friendlier now:</p>
<pre>from gi.repository import Gio, GLib

d = Gio.bus_get_sync(Gio.BusType.SESSION, None)
notify = Gio.DBusProxy.new_sync(d, 0, None, 'org.freedesktop.Notifications',
    '/org/freedesktop/Notifications', 'org.freedesktop.Notifications', None)

args = GLib.Variant('(susssasa{sv}i)', ('test', 1, 'gtk-ok', 'Hello World!',
    'Subtext', [], {}, 10000))
result = notify.call_sync('Notify', args, 0, -1, None)
id = result.unpack()[0]
print id</pre>
<p>I also prepared another patch in <a href="https://bugzilla.gnome.org/show_bug.cgi?id=640181">GNOME#640181</a> which will provide the icing on the cake, i. e. handle the variant building/unpacking transparently and make the explicit call_sync() unnecessary:</p>
<pre>from gi.repository import Gio, GLib

d = Gio.bus_get_sync(Gio.BusType.SESSION, None)
notify = Gio.DBusProxy.new_sync(d, 0, None, 'org.freedesktop.Notifications',
    '/org/freedesktop/Notifications', 'org.freedesktop.Notifications', None)

result = notify.Notify('(susssasa{sv}i)', 'test', 1, 'gtk-ok', 'Hello World!',
            'Subtext', [], {}, 10000)
print result[0]</pre>
<p>I hope that I can get this reviewed and land this soon.</p>
<p><img class="alignleft" src="http://live.gnome.org/Travel/Policy?action=AttachFile&amp;do=get&amp;target=sponsored-badge-shadow.png" alt="" width="138" height="138" /></p>
<h3>Thanks to our sponsors!</h3>
<p>Many thanks to the <a href="http://foundation.gnome.org/">GNOME Foundation</a> and <a href="http://www.collabora.co.uk">Collabora</a> for sponsoring this event!</p>
<p><img src="http://www.collabora.co.uk/logos/collabora-logo-big.png" width="25%" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.piware.de/2011/01/na-zdravi-pygi/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
	</channel>
</rss>

