GNOME.ORG

24 hours a day, 7 days a week, 365 days per year...

August 30, 2015

干净、美丽、闲适、优雅的海滨煤城Newcastle

<!–
小鱼说:

风景好吗?说说看海豚的事。

大狗说:
–>
(尚末完全写完,提前发布。)

最让人喜欢的不是风景,而是人。小鱼在店里端详礼品,退了几步,撞到一位老人。他说:“My life has changed! A lady in my arms!” 待到小鱼和我回过神来,听懂了老人的幽默,他已经信步走出门了。都铎街(Tudor)和娈峰街(Beaumout)交接的地方有蜗窄的小小市场,算是本地唯一每日运作的市场了,里面有七八个商家,一个小姑娘搭了个凉棚在里面弹唱,边上写着“请资助我游欧洲”。大凡有市场,就有人在边上弹唱,澳洲的日常市场就是这样。我买了一个印有美元票面的钱包,店家说,你去过美国吗?你看,这些商贩真是没话找话,这样算打开话题了,聊了十来分钟。店家是南非人,早年移民到美国,晚年在这里享受生活,走的时候我对他们家三代都很了解了。


August 28, 2015

Productivity, made better

Two months ago, GNOME To Do was introduced to the outside world. People got (unexpectedly, I must admit) excited about it, and said that the app looks promising. A month lated, another version was release with a bunch of new features.

Now that we’re reaching the 3.18 release, it’s time to settle things down and stop the heavy development phase (which, by the way, should have stopped 3 weeks ago!). Let’s see what changed.

The Icon

Yes, you read it correctly. GNOME To Do finally received an icon, and the best of all: from the amazing Jakub Steiner! Take a look:

gnome-todo

Selection Mode

The biggest highlight of this development cycle is the new selection mode. Following the GNOME selection pattern, it enables deleting & renaming tasks.

Selection mode

Some tasks are undeletable (something I couldn’t resolve reliably in time) and the Delete button gets insensitive for them.

Deleting a tasklist

Renaming tasklists is quite pleasant too:

Renaming tasklist

Error handling

Something that almost missed this release, To Do is now able to report errors that may happen. Error reporting, while it may sound too technical, is very important for the users to be able to share their issues without a major burden.

Error notification

Error report

Cleanups, cleanups, cleanups

Many fixed and cleanups were introduced. A whole class of annoyances was fixed, making GNOME To Do very pleasant and smooth to use. I sincerely hope that this small and simple application will help you organize yourselves and, at the very end, optimize your life and make you guys happier & healthier!

As always, a screencast of the cited features:

Update: don’t forget to check the brand new GNOME To Do page!

My thoughts of GUADEC 2015

So, GUADEC 2015 is over and I'm back to my country after 2 weeks exploring Europe in my "no extra penny must be spent, no souvenirs, no shopping!" mode, and I really enjoyed the whole experience, it was memorable and I think it marked a sort of inflection point in life.

I finally met my Viking friends: Mattias and Jonas, crew of an awesome långskepp: GNOME Maps. God, they are two memorable characters, hahaha. And also met lots of people there, from vastly different cultures and places, people really enthusiast, funny, especially smart (really smart), humble and people who really love what they are doing. I met new friends around the conference and the hostel, a really enjoyable people to spend your time, like Adri(e|a)n Plazas (sorry, I never going to spell your name correctly :(), Siska, Udayan (my roommate), Tuan, Julita and more!!

The only thing I maybe regret is to not have the english skills to being able to enjoy the full experience, it's hard (really hard) to me to speak and listen to english, particularly listen, maybe sometimes I understood the half of the things people were talking about and sometimes just think "Hey, they could be speaking Swedish and it would be the same to me!". So if you think I was a bit awkward during the conference, 15% of this awkwardness is because of this, I'm still trying to figure out the other 85% :) . Fortunately the people is always nice and understand this limitation, but you know, I prefer to have proper english skills instead.

Anyway, I really enjoyed GUADEC, the talks and the side activities, and I hope I can be there for the next year and enjoy it even more.

First Round of systemd.conf 2015 Sponsors

First Round of systemd.conf 2015 Sponsors

We are happy to announce the first round of systemd.conf 2015 sponsors!

Our first Silver sponsor is CoreOS!

CoreOS develops software for modern infrastructure that delivers a consistent operating environment for distributed applications. CoreOS's commercial offering, Tectonic, is an enterprise-ready platform that combines Kubernetes and the CoreOS stack to run Linux containers. In addition CoreOS is the creator and maintainer of open source projects such as CoreOS Linux, etcd, fleet, flannel and rkt. The strategies and architectures that influence CoreOS allow companies like Google, Facebook and Twitter to run their services at scale with high resilience. Learn more about CoreOS here https://coreos.com/, Tectonic here, https://tectonic.com/ or follow CoreOS on Twitter @coreoslinux.

A Bronze sponsor is Codethink:

Codethink is a software services consultancy, focusing on engineering reliable systems for long-term deployment with open source technologies.

A Bronze sponsor is Pantheon:

Pantheon is a platform for professional website development, testing, and deployment. Supporting Drupal and WordPress, Pantheon runs over 100,000 websites for the world's top brands, universities, and media organizations on top of over a million containers.

A Bronze sponsor is Pengutronix:

Pengutronix provides consulting, training and development services for Embedded Linux to customers from the industry. The Kernel Team ports Linux to customer hardware and has more than 3100 patches in the official mainline kernel. In addition to lowlevel ports, the Pengutronix Application Team is responsible for board support packages based on PTXdist or Yocto and deals with system integration (this is where systemd plays an important role). The Graphics Team works on accelerated multimedia tasks, based on the Linux kernel, GStreamer, Qt and web technologies.

We'd like to thank our sponsors for their support! Without sponsors our conference would not be possible!

We'll shortly announce our second round of sponsors, please stay tuned!

If you'd like to join the ranks of systemd.conf 2015 sponsors, please have a look at our Becoming a Sponsor page!

Reminder! The systemd.conf 2015 Call for Presentations ends on monday, August 31st! Please make sure to submit your proposals on the CfP page until then!

Also, don't forget to register for the conference! Only a limited number of registrations are available due to space constraints! Register here!.

For further details about systemd.conf consult the conference website.

systemd.conf 2015 Call for Presentations

REMINDER! systemd.conf 2015 Call for Presentations ends August 31st!

We'd like to remind you that the systemd.conf 2015 Call for Presentations ends on August 31st! Please submit your presentation proposals before that data on our website.

We are specifically interested in submissions from projects and vendors building today's and tomorrow's products, services and devices with systemd. We'd like to learn about the problems you encounter and the benefits you see! Hence, if you work for a company using systemd, please submit a presentation!

We are also specifically interested in submissions from downstream distribution maintainers of systemd! If you develop or maintain systemd packages in a distribution, please submit a presentation reporting about the state, future and the problems of systemd packaging so that we can improve downstream collaboration!

And of course, all talks regarding systemd usage in containers, in the cloud, on servers, on the desktop, in mobile and in embedded are highly welcome! Talks about systemd networking and kdbus IPC are very welcome too!

Please submit your presentations until August 31st!

And don't forget to register for the conference! Only a limited number of registrations are available due to space constraints! Register here!.

Also, limited travel and entry fee sponsorship is available for community contributors. Please contact us for details!

For further details about the CfP consult the CfP page.

For further details about systemd.conf consult the conference website.

GUADEC 2015

A week full of intense discussions, new faces and of course catching with many friends, GUADEC is awesome as usual. This possibly is my 10 or 11th GUADEC. Highlights are the keynotes on GNOME Builder and Defending the GNOME Trade Mark. And of course loved the summer weather.

I had a talk on Evolution for your Car, about the IVI prototype email solution, that I have been carrying on for the last couple of years. Part of couple of BOFs. Had a meeting with folks across India, about a possible summit in India (GNOME/Asia).

Its a little late and many said do this before you forget, but IMHO such good memories don’t fade.

August 27, 2015

GSoC 2015 summary

F-Spot timeline working.

It's sad to announce that F-Spot/gtk3 branch is not ready, but at least there are some advances due to this GSoC. I'm writing this post as a summary of that I've been able to achieve.

I've continued my last summer work by being able to fix the main image displaying, known in F-Spot as edit mode, getting F-Spot displaying photos again, to later add some other missing decorations.

Then I've faced problems with the gtk-sharp3 package that is included in current Ubuntu out of the box, basically lots of critical warnings which I've managed to suppress simply installing gtk-sharp development version —easy, but only after debugging, searching the web, and creating two little programs to see if the error was with F-Spot or with something between gtk-sharp or GLib itself.

By the way, more or less in a couple of weeks I'll be posting some instructions about installing F-Spot/gtk3 branch and gtk-sharp development version in an Ubuntu out of the box, since some steps are needed other that the classic ./autogen.sh && make && make install in order to get F-Spot working —not sure if that's fault of gtk-sharp or F-Spot itself... maybe that post could lead to fix it by someone, since I don't know a bit about Debian packaging.

That was June, but July was a more difficult month, having problems with photo thumbnails and the lack of Gnome.Thumbnail class, and fullscreen mode opacity and scrollbars.

I've reached August being able to solve a little problem about icon view mode —the mode where you see the photo thumbnails to manage them— that was annoying for a while: If you was in that mode and tried to resize the icon view area, dragging the separator between it and the sidebar, while resizing the icon view area would be blinking a lot. The reason was only one line of code that was making F-Spot process too much events. I've also restored the timeline —the thing you can see in the screenshot on top of this post above the icon view area.

August was inverted mostly walking in circles with the filmstrip, which is an area in edit more where you can still see the thumbnails to navigate while displaying a large photo. I've got blocked due to some null variable that almost got me crazy, since looking at the code it was supposed to never become null, so I've started wondering the problem and discarding things like multithreading, until I've figured out that it could be something related to C# binding problems again —but the glue-code of Pixbuf.CopyArea (the method natively complaining about the null) is really simple. I've started to loop trough the code until I've luckily decided to add some basic Console.WriteLine on gtk-sharp to debug that way, and it happened that I couldn't see those messages anywhere... A mystery until I've realized some *-sharp.dll files inside F-Spot's installation directory: Some kind of dirty F-Spot installation in my system. Deleting those files solved the mystery.

Sadly, the only thing I have now is a non-displaying filmstrip —you can click in the area where it is supposed to be and you would see the current photo changing, but nothing gets drawn in that filmstrip area and having it activated makes F-Spot/gtk3 even more unstable and slower.

But well, from my point of view —maybe not the F-Spot one— this have been another great Google Summer of Code learning about various components and way of doing this of the GNOME platform. Thanks a lot to Google, GNOME and Stephen Shaw —my mentor— for this (:

Flattr «GSoC 2015 summary»

State of TLS in Mono

This is an update on our efforts to upgrade the TLS stack in Mono.

You can skip to the summary at the end if you do not care about the sausage making details.

Currently, TLS is surfaced in a few places in the .NET APIs:

  • By the SslStream class, which is a general purpose class that can be used to turn any bidirectional stream into an TLS-powered stream. This class is what currently powers the web client in Mono.
  • By the HttpWebRequest class, which provides .NET's HTTP client. This in turn is the foundation for the modern HttpClient, both the WCF and WebServices stacks as well as the quick and dirty WebClient API.

HttpClient is in particular interesting, as it allows for different transports to be provided for it. The default implementation in .NET 4.5 and Mono today is to use an HttpWebRequest-based implementation. But on Windows 10, the implementation is replaced with one that uses WinRT's HTTP client.

Microsoft is encouraging developers to abandon HttpWebRequest and instead adopt HttpClient as it both async-friendly and can use the best available transport given on a specific platform. More on this in a second.

Mono's Managed TLS

Mono currently only supports TLS 1.0.

This is the stack that powers SslStream and HttpWebRequest.

Last year we started an effort to bring managed implementations of TLS 1.2 and TLS 1.1. Given how serious security has become and how many holes have been found in existing implementation, we built this with an extensive test suite to check for conformance and to avoid common exploits found in implementation mistakes of TLS. This effort is currently under development and you can see where it currently lives at mono-tls module.

This will give us complete TLS support for the entire stack, but this work is still going to take a few months to audit.

Platform Specific HttpClients

Most of the uses for TLS today is via the HTTP protocol, and not over custom TLS streams. This means that it is more important to get an HTTP client that supports a brand new TLS stack, than it is to provide the SslStream code.

We want to provide native HttpClient handlers for all of Mono's supported platforms: Android, iOS, Mac, Linux, BSD, Unix and Windows.

On iOS: Today Xamarin.iOS already ships a native handler, the CFNetworkHandler. This one is powered by Apple's CFNetwork stack. In recent years, Apple has improved their networking stack, and we now I strongly recommend using Paul Bett's fantastic ModernHttpClient which uses iOS' brand new NSUrlSession and uses OkHttp on Android.

On Android: in the short term, we recommend adopting ModernHttpClient from Paul Betts (bonus points: the same component works on iOS with no changes). In the long term, we will change the default handler to use the Android Java client.

In both cases, you end up with HTTP 2.0 capable clients for free.

But this still leaves Linux, Windows and other assorted operating systems without a regular transport.

For those platforms, we will be adopting the CoreFX handlers, which on Unix are powered by the libcurl library.

This still leaves HttpWebRequest and everything built on top of it running on top of our TLS stack.

Bringing Microsoft's SslStream and HttpWebRequest to Mono

While this is not really TLS related, we wanted to bring Microsoft's implementations of those two classes to Mono, as they would fix many odd corner cases in the API, and address limitations in our stack that do not exist in Microsoft's implementation.

But the code is tightly coupled to native Windows APIs which makes the adoption of this code difficult.

We have built an adaptation layer that will allow us to bring Microsoft's code and use Mono's Managed TLS implementation.

SslStream backends

Our original effort focused on a pure managed implementation of TLS because we want to ensure that the TLS stack would work on all available platforms in the same way. This also means that all of the .NET code that expects to control every knob of your secure connection to work (pinning certificates or validating your own chains for example).

That said, in many cases developers do not need this capabilities, and in fact, on Xamarin.iOS, we can not even provide the functionality, as the OS does not give users access to the certificate chains.

So we are going to be developing at least two separate SslStream implementations. For Apple systems, we will be implementing a version on top of Apple's SSL stack, and for other systems we will be developing an implementation on top of Amazon's new SSL library, or the popular OpenSSL variant of the day.

These have the advantage that we would not need to maintain the code, and we benefit from third parties doing all the hard security work and will be suitable for most uses.

For those rare uses that like to handle connections manually, you will have to wait for Mono's new TLS implementation to land.

In Summary

Android, Mac and iOS users can get the latest TLS for HTTP workloads using ModernHttpClient. Mac/iOS users can use the built-in CFNetworkHandler as well.

Soon: OpenSSL/AppleSSL based transports to be available in Mono (post Mono 4.2).

Soon: Advanced .NET SSL use case scenarios will be supported with Mono's new mono-tls stack

Soon: HttpWebRequest and SslStream stacks will be replaced in Mono with Microsoft's implementations.

Behave + dogtail tests for GNOME applications

Behave is behaviour-driven development, Python style.
behave uses tests written in a natural language style, backed up by Python code.
You can install behave using pip or yum.

$ pip install behave  

Detailed instructions to install behave can be found here.

Behave has three types of files:

1. Feature files:
You can add the test scenarios in it, it is written in Gherkin, a feature testing language.

2. Steps directory:
You can add steps for the scenarios written in feature files.

3. Environment files:
You can add before_all, after_step, after_scenario tasks in environment file.

Feature files:
You can have a general.feature file or feature file for a specific function, like shortcuts.feature, etc.

An example of a feature file is below:

 Feature: General
Scenario: Search for GNOME logs
* Make sure gnome-logs-behave-test is running
* Click on Search
Then search is focused and selection toolbar buttons are sensitive


Place general.feature file in tests directory. After creating the feature file, we have to describe the steps written in the feature file in tests/steps/general.py.

Background events can be descried in tests/common_steps.py, an example of this file can be as follows:


class App(object):
"""
This class does all basic events with the app
"""
def __init__(
self, appName, shortcut='<Control><Q>', a11yAppName=None,
forceKill=True, parameters='', recordVideo=False):
"""
Initialize object App
appName command to run the app
shortcut default quit shortcut
a11yAppName app's a11y name is different than binary
forceKill is the app supposed to be kill before/after test?
parameters has the app any params needed to start? (only for startViaCommand)
recordVideo start gnome-shell recording while running the app
"""
self.appCommand = appName
self.shortcut = shortcut
self.forceKill = forceKill
self.parameters = parameters
self.internCommand = self.appCommand.lower()
self.a11yAppName = a11yAppName
self.recordVideo = recordVideo
self.pid = None
# a way of overcoming overview autospawn when mouse in 1,1 from start
pressKey('Esc')
absoluteMotion(100, 100, 2)
# attempt to make a recording of the test
if self.recordVideo:
keyCombo('<Control><Alt><Shift>R')
def isRunning(self):
"""
Is the app running?
"""
if self.a11yAppName is None:
self.a11yAppName = self.internCommand
self.a11yAppName = 'gnome-logs'
# Trap weird bus errors
for attempt in xrange(0, 30):
sleep(1)
try:
return self.a11yAppName in [x.name for x in root.applications()]
except GLib.GError:
continue
raise Exception("10 at-spi errors, seems that bus is blocked")
def kill(self):
"""
Kill the app via 'killall'
"""
if self.recordVideo:
keyCombo('<Control><Alt><Shift>R')
try:
self.process.kill()
except:
# Fall back to killall
Popen("killall " + self.appCommand, shell=True).wait()
def startViaCommand(self):
"""
Start the app via command
"""
if self.forceKill and self.isRunning():
self.kill()
assert not self.isRunning(), "Application cannot be stopped"
#command = "%s %s" % (self.appCommand, self.parameters)
#self.pid = run(command, timeout=5)
self.process = Popen(self.appCommand.split() + self.parameters.split(),
stdout=PIPE, stderr=PIPE, bufsize=0)
self.pid = self.process.pid
assert self.isRunning(), "Application failed to start"
return root.application(self.a11yAppName)
def closeViaShortcut(self):
"""
Close the app via shortcut
"""
if not self.isRunning():
raise Exception("App is not running")
keyCombo(self.shortcut)
assert not self.isRunning(), "Application cannot be stopped"
@step(u'Make sure gnome-logs-behave-test is running')
def ensure_app_running(context):
context.app = context.app_class.startViaCommand()

Environment.py contains before/after tasks of a scenario/steps:

 def before_all(context):  
"""Setup logs stuff
Being executed once before any test
"""
try:
# Close running logs instances
os.system("./gnome-logs-behave-test --force-shutdown > /dev/null")
# Skip dogtail actions to print to stdout
config.logDebugToStdOut = False
config.typingDelay = 0.2
# Include assertion object
context.assertion = dummy()
# Cleanup existing data before any test
cleanup()
# Store scenario start time for session logs
context.log_start_time = strftime("%Y-%m-%d %H:%M:%S", localtime())
context.app_class = App('./gnome-logs-behave-test')
except Exception as e:
print("Error in before_all: %s" % e.message)
def after_step(context, step):
try:
if step.status == 'failed' and hasattr(context, "embed"):
# Embed screenshot if HTML report is used
os.system("dbus-send --print-reply --session --type=method_call " +
"--dest='org.gnome.Shell.Screenshot' " +
"'/org/gnome/Shell/Screenshot' " +
"org.gnome.Shell.Screenshot.Screenshot " +
"boolean:true boolean:false string:/tmp/screenshot.png")
context.embed('image/png', open("/tmp/screenshot.png", 'r').read())
except Exception as e:
print("Error in after_step: %s" % str(e))
def after_scenario(context, scenario):
"""Teardown for each scenario
Kill logs (in order to make this reliable we send sigkill)
"""
try:
context.app_class.kill()
# Make some pause after scenario
sleep(1)
except Exception as e:
# Stupid behave simply crashes in case exception has occ

In order to use an application directly, for example, gnome-logs, you can use,

context.app_class = App('gnome-logs') 

and in case you want to run the behave tests on a test binary, you can replace App('gnome-logs') with the binary name, but you will have to set its accessibility name to the app name.

context.app_class = App('./gnome-logs-behave-test') 

The given scenario steps can be defined in tests/steps/general.py file, as follows,

 @step(u'Click on search')  
def click_on_search(context):
context.app.child('Find').click()
@then(u'search is focused and selection toolbar buttons are sensitive')
def search_focused_selection_toolbar_buttons_sensitive(context):
assert context.app.child('Search').focused
assert context.app.child('Important').sensitive
assert context.app.child('All').sensitive
assert context.app.child('Applications').sensitive
assert context.app.child('System').sensitive
assert context.app.child('Security').sensitive
assert context.app.child('Hardware').sensitive
context.app.child('Search').typeText("test")
assert context.app.child('This is a test').sensitive

You can run the tests by running 'behave' from command line in the tests directory, the UI will be launched and it will perform actions specified by the feature files.

You can also run behave tests using gnome-desktop-testing-runner, you will have to install the application with --enable-installed-tests and install the test binary at /usr/local/share/installed-tests/<application>/ and do the following,

Place BEHAVE_INSTALLED_TESTS somewhere in configure.ac

Declare these variables in Makefile.am

INSTALLED_TESTS=list of tags for tests to install            INSTALLED_TESTS_TYPE=session-exclusive

And that's it, now your unit tests will be installed along with a .test metadata file into $(pkglibexecdir) if --enable-installed-tests is passed to your configure script, and will be run automatically by the continuous integration servers. To run,

 gnome-desktop-testing-runner gnome-logs  

August 26, 2015

2015-08-26 Wednesday.

  • Early up, team meeting, interview , mail; hacking; wrote up a spec. Sync'd with Niall before his holiday. Plugged away at vile non-rendering menu problem; turns out it is rendered, but we're missing a glFlush - fun, it seems GDI has a similar issue with a GdiFlush() call for similar purposes.

GUADEC 2015 was awesome!

I went to GUADEC 2015 which was help in Gothenburg between friday 08/07 and wednesday 08/12, here is what I did there.

Deserved thanks

First of all, I would like to sincerely thank the organizers of this GUADEC, they made an amazing job! =)

I also would like to thanks the GNOME Foundation, the GNOME Travel Committee and the persons volunteering to work for this committee as I wouldn't have been able to attend the conference without their sponsorship.

Volunteering

I volunteered to help during this GUADEC and it was a great experience. I only had few work to do as there was a ton of volunteers, all I did is to help cleaning the rooms and to be in charge of presenting the speaker, filming its talk and give him a gift for two talks on sunday.

Being able to see the Beamer theme I wrote used was quite pleasing too. =)

The core days

On Friday

  • Alexander Larsson's talk on xdg-app got me really excited about this big shift the Linux desktop is taking,
  • Emmanuele Bassi's talk on GSK showed us how it will be used as an intermediate layer between GTK+ and GDK,
  • Caolán McNamara taught me about the relation between LibreOffice and GTK+3,
  • Matthias Clasen showed some pretty interesting stuff that GTK+ can do,
  • Alexander Bokovoy's talk taught me a LOT of stuff I didn't now about like double factor identification, and how they are use by GNOME for enterprise desktops,
  • I gave a lightning talk on my work on Boxes this summer.

On Saturday

  • Frédéric Crozat talked about what have been done at SUSE to adapt GNOME to their enterprise customers,
  • Christian Hergert made me actually use Builder =),
  • Jan-Christoph Borchardt gave a engaging talk on how ownCloud and GNOME would have a tighter relationship.

On Sunday

  • Jonas Danielsson got me excited about the future of GNOME Maps =),
  • Pamela Chestek gave an awesome talk on how she helped GNOME to stay GNOME,
  • Jussi Pakkanen talked about the Meson build system,
  • I filmed Markus Mohrhard's talk on LibreOffice integration within GNOME Document, with an interesting first part by Pranav Kant who showed his summer work on LibreOffice and GTK+3,
  • I filmed David King's talk on logging and statistics,
  • The lightning talks were awesome: they features a troll and an helicopter pilot.

The BoF sessions

On Monday

  • I attended the informal GNOME Maps BoF, it was extremely interesting to get more information on the future of the project. I looked at the Mapbox GL C++/ vector tile library to check if it was interesting to bind it/port it to C/GObject.

On Tuesday and Wednesday

  • I hacked on Boxes with my mentor Zeeshan Ali, improving my patches for the new collection filter and the list view.

The faces

  • It was a great pleasure to see lots of known faces,
  • And obviously discovering lots of new ones was great too, =)
  • My face—name—nickname relationships got improved!

The places

  • The free ferry was great =),
  • The Slottsskogen park and its zoo were really cool to visit,
  • The city is full of interesting pubs,
  • Walking in Gothenburg is really enjoyable once you understood were are the bike lane and that you should never ever put a foot on one =p,
  • There are lots of vegetarian and vegan restaurants, and the ones which are not have good veg(etari)an offers, which is nice when you want to eat as a group,
  • Staying at the hostel was a nice experience as you never stop to be in the GNOME communitythis way!

The USB inhibitor

One more post about my work on the USB inhibitor.

The class, implemented in python works like this: I can block all the new connected USB devices or allow only some devices (like video devices, HID devices etc.) to connect.

In the demo I used one mouse and one stick.

The mouse

The stick

On the next videos you can see how usb-inhibitor works: blocking all devices and how we can enable some of them calling the inhibitor with specific parameters.

First one, all the devices are blocked:

Then allow only mass storage devices:

Allow only HID devices:

And in the last video allow HID and mass storage devices:

Also using the inhibitor class and a system D-bus, I’ve created a gnome-shell-extension that blocks all the the USB devices when is turned on. Also the extension runs even when the screen is blocked (then is turned automatically on to block new devices). You have to trust me that I really connect the devices while is turned on/off.

That was for now, see you in the next post :D

In real open source, you have the right to control your own destiny.” – Linus Torvalds


August 25, 2015

2015-08-25 Tuesday.

  • Early up, mail chew; hackery. Early meeting. Hacking. Lunch. E. frenetic cycling, fell off her bike but ok. Plugged away at bits of hackery and admin.

GSoC Wrapup Report

This is a GSoC wrap up report of everything I did this summer. Though, my official GSoC organization was LibreOffice, the work also involved GNOME directly, and Mozilla indirectly. Some of you, who are already familiar with my work might find this post repetitive since I would be repeating many of the things here that I have already talked about in my earlier posts.

Initial state of the widget

Before I started working on it as a summer of code project, the widget:

  • used to render all tiles in the loaded document
  • used to make calls to the LibreOffice core in the same UI thread
  • was not introspectable
  • was gtk2
  • and needed such minor fixes here and there

Tiled Rendering

I started with implementing tiled rendering in the widget. First plan was to reuse the Mozilla tiled rendering code. After analyzing this and discussing it, we scraped that plan as it was quite infeasible. Better approach was to understand how tiled rendering is implemented and write our own class that handles the tiles for you. We took ideas from Mozilla tiled rendering code, and GeglBuffer.

We started with a small TileBuffer class, and it gradually improved as widget started to demand more from it. There is still some scope of improvement in TileBuffer class which is already on my radar. At the moment it exposes enough API for the widget to work smoothly.

Only render visible tiles

Aforementioned, the widget used to render all of the tiles even if they are not visible on the screen. This was a huge bottleneck to the widget performance. Why render millions of tiles in a large document if most of them are not even visible to the user?

We changed this to demand-based model. Only render tiles when there is a demand for them, that is, when the user wants to see them. Also keep caching these tiles with the help of TileBuffer so that next time user asks for these tiles, it doesn’t have to render the tile again.

Free the main thread

All the LibreOffice operations, like, rendering new tiles, selecting a paragraph, bold the selected text etc. is a lot of work and if done in the main thread would not give a very smooth user experience. So, we decided to move all such heavy operations (all libreoffice calls) to a new dedicated worker thread whose job is to perform the libreoffice calls and return the result to the main thread. As a further optimization, we used a thread pool with a single thread so that we don’t have to create a new thread everytime. It is to be noted here that we used a thread pool of single thread because libreoffice is almost single-threaded, and it would be useless to create multiple worker threads calling to the same libreoffice core instance. Further, thread pool with a single thread would automatically queue the LibreOffice operations for us, and execute them when thread becomes free.

As of this writing, we have moved all LibreOffice calls but one to the worker thread. This has signficantly improved the widget performance.

GObject friendly/introspectable widget

One of the aim of this project was to integrate it with gnome-documents. GNOME Document is written in javascript, and the widget is in C++. GObject Introspection came to our rescue here. We started making this widget more GObject friendly, added necessary comments/annotations, and finally we were able to use this widget from any of the language bindings including javascript.

Gtk3 port

Since we wanted to integrate the widget with gnome-documents (gtk3), we modified the widget to use gtk3. This also gave a new look and feel to the widget.

Ship introspection files with LibreOffice

Installing the introspection files (.gir/.typelib) into their standard location on user’s computer is something that doesn’t fit well into the LibreOffice installation model. The current plan is to let the distributions execute a script (create_tree.sh) provided by LibreOffice that would generate and install the introspection files (.gir/.typelib) into their standard location. You would most likely see this script being used by distributions with LO 5.1

Integrating it with GNOME Documents

For few days, I used a sample javascript application that uses this widget to show and edit documents. This was useful for debugging. Gradually, I started to write code for gnome-documents to use this widget. I had to change the integration model a few times. Finally, I ended up writing a new class to handle the libreoffice widget, and the integration works quite well now.

If you are interested in trying this widget out, you can checkout my gnome-documents feature branch here. However to make this work, you have to generate the introspection files manually. I have created a (wiki page)[https://wiki.documentfoundation.org/Development/Integrating_LOKDocView_and_GNOME_Documents] that should help you in this regard.

ETA in GNOME Documents

All the work on the widget is already in LO master which will become LibreOffice 5.1 to be released around January 2016. This means we still got some time to make improvements in widget, if any, till LO 5.1 freeze in November 2015. My hope is that we should be able to see the widget integrated in gnome-documents in 3.20, if everything goes well.

Here is the screencast I made where gnome-documents is using the libreoffice widget to show open documents, while still using evince view to show the pdf documents.

Overall, this was the best project that I ever worked on till now. I learnt a lot this summer. I would like to thank my GSoC mentors - Michael Meeks, Miklos Vajna for their continous support and ideas throughout the summer. I would also like to thank Debarshi Ray and Cosimo Cecchi for their invaluable suggestions that helped me finally integrate the widget with GNOME Documents. Its still not in master, but it works well, and I hope to see it soon in master. Also thanks to Mozilla community for helping me with tiled rendering concepts.

GNOME Documents collections dialog redone

Few days ago the new collections dialog for GNOME Documents landed in master. Since the last post the dialog received some improvements:

An empty view

gnome-documentsempty-view

When there are no collections, instead of displaying an empty list we show a special view to add your first collection.

A more polished dialog

gnome-documents-full-view

The border of the list was removed giving more view to the list’s content. Suggested buttons are indicated, so that the theme can colour them differently to give a hint to the user. Spaces between elements have been changed according to the GNOME HIG and now they are in increments of 6 pixels.

Animations

When deleting a collection, the row now slides on the left to make room for the delete message with the undo button. If the undo button is clicked the collection row slides back.

When the undo button is showed a timer starts. If it is not clicked in time the collection is deleted and the row disappears.

My work on GNOME Documents as a Google Summer of Code student is over, but I have strong interest in continuing to contribute in this awesome community. I would like to thank again my mentor, Debarshi, for his guidance and help when things didn’t work; the GNOME design team for gave me a good mockup to work on; Lapo for the graphical tips he suggested me after the previous blog post and Emmanuele for his advice on GTK.


August 24, 2015

Notes from the GStreamer Summer Hackfest 2015



A week ago a dozen cool guys, who happen to be GStreamer developers, met at Montpellier for the GStreamer Summer Hackfest 2015. We got together to work for 3 days, over the weekend, without a fixed agenda. The hacking venue coworkin' Montpellier was provided by Edward Hervey (bilboed) and most meals were provided by GStreamer.

With the opportunity to work in the same room and enjoy the lovely city of Montpellier, developers speed up the patch reviews and fixes by being able to easily discuss them with colleagues through the high-bandwith low-latency face-to-face protocol. They also took the chance to discuss major features and try to settle on problems that have been waiting for design decisions for a long time in the community. This is a non-exhaustive list of work done in the event:

  • Performance improvement for Caps negotiations: Caps negotiation is part of the GStreamer applications startup and was vastly optimized. Initial tests show it is taking 49.6% less time to happen.


  • nvenc element: A new nvenc element for recent NVIDIA GPU's was made released. It currently implements h264.


  • 1.6 release: At the hackfest a few blocker issues were revisited to get the project ready for releasing version 1.6. This will be a stable release. The release candidate just took place right after the hackfest, the 1.5.90 version.


  • decodebin3 design proposal/discussion: A new version of the playback stack was proposed and discussed. It should maintain the same features of the current version but cover use cases needed by targets with restricted resources, such as embedded devices (TV, mobile, for example), and providing a stream selection API for applications to use. This is a very important feature for Tizen to support more hardware-enabled scenarios in its devices.


  • Moving to Phabricator: The community started experimenting with the recently created Phabricator instance for GSteamer's bug and code tracking. Tweaking of settings and scripts, before a full transition from Bugzilla can be made.


  • Improvements on GtkGLSink: The sink had flickering and scaling noise among some other problems. Most are now fixed.


  • libav decoders direct rendering: Direct rendering allows decoders to write their output directly on screen, increasing performance by reducing the number of memory copies done. The libav video decoders had their direct rendering redone for the new libav API as is now enabled again.


  • Others: improvements to RTP payloaders and depayloadres of different formats, discussions about how to provide more documentation, bug fixes and more.
    Without any major core design decision pending, this hackfest allowed the attendees to work on different areas they wanted to focus on and it was very productive in many fronts. With the GStreamer Conference being around the corner, people in the organizing committee discussed which talks should be accepted and other organizational details.


A huge gratitude note to our host, Edward Hervey (shown below). The venue was very comfortable, the fridge always stocked and the city a lot of fun!


Lively discussion about GST Streams and decodebin3


If you missed the notes from the previous Hackfest. Read them here

Self-generated metadata with LVFS

This weekend I finished the penultimate feature for the LVFS. Before today, when uploading firmware there was up to a 24h delay before the new firmware would appear in the metadata. This was because there was a cronjob on my home server downloading files every night from the LVFS site, running appstream-builder on them locally and then uploading the metadata back to the site. Not awesome at all.

Actually generating the metadata in the OpenShift instance was impossible, until today. Due to libgcab and libappstream-glib not being available on the RHEL 6.2 instance I’m using, I had to re-implement two things in Python:

  • Reading and writing Microsoft cabinet archives
  • Reading MetaInfo files and writing compressed AppStream XML

The two helper libraries (only really implementing the parts required, but patches welcome) are python-cabarchive and python-appstream. I’m not awesome at Python, so feedback (in the form of pull requests) welcome.

This means I’m nearly okay to be hit by a bus. Well, nearly; the final feature is to collect statistics about how many people are downloading each firmware file, and possibly collecting data on how many failures and successes there have been when actually applying the firmware. This is actually quite tricky to do without causing privacy issues and not doing double counting. I’ll do some more thinking and then write up a proposal, ideas welcome.

Improve boot selection menu of Gnome-Logs

The goal of fifth step is to make some UI change. You can find the design by Allan Day here. Previously, the boot selection menu looks like the pictures below:


And after the patch, the boot selection menu looks as the picture below shows:



There exist two main problems to solve during this step. The first one is what to be used as the header in the GtkHeaderBar. And the second one is how to implement the "check-button-like" menu.

At the every beginning, I think I can use title and subtitle as the title button, but I realized that it's not right. Because the title and subtitle of GtkHeaderBar cannot be clicked. Then I found that gedit and gnome-calculator have a very similar button to serve the same function. So I read the relevant source code of these two applications and came up with the final solution: use GtkMenuButton as a custom title, and use GtkGrid as a child of GtkMenuButton to arrange the layout of those two labels and the arrow icon. As for the "Logs" label and the boot time label, they should look exactly the same as the title and subtitle of GtkHeaderBar. I didn't know how to do it. But while talking with David, he told me I could try to install style classes on those widgets. Following his advice, I tried to install "title" and "subtitle" separately on those two widgets. And it worked like magic! :)

Afterwards, I began to think about how to implement the "check-button-like" menu. I had some ideas in my mind that time. But I proved that all of them are not right. I also discussed with someone on the IRC channel, but didn't really figure out something. But I got something useful during the chat. I knew that GtkModelButton could be something I need, and the tutorial about menu and action in the developer document is gonna be helpful. I took my hope and began another journey in the midnight. After several hours' investigation, I made it. Finally I implemented it! And at that time the sky was bright. It was 5 AM the second day!

The way you create the menu has no difference with the way you create a normal menu. Simply just add GMenuItem to GMenu, and set the GMenu as GtkMenuButton's menu model. But the key point is to use the same action for these menu items and each item with a state. The action cannot be stateless, because in that way, you'll get a normal menu, like the previous menu of Logs. You have to make the action stateful and have no target. By doing this, the menu item will become radio button automatically. Actually, the menu item is a GtkModelButton, you can use Inspector to check it out.

There is a article about this, link can be found here. But I couldn't quite understand it several days ago. :(

The commit can be found here. You can go there to check how I implement this.

Another small thing I want to mention is that after these two changes, the header bar of Logs became taller. David told me that probably it was because a button has a internal padding by default. By using GInspector, I found that the menu button has a default 6px top-padding and 5px bottom-padding(if I remember precisely). So I overwrite these two values as 0px in gl-style.css and applied these two values on the menu button. It worked very well.

I also want to thank David for the help on the accidental push after release freeze.

The fifth step is the last one for my work of GSoC 2015. I completed it half an hour before the deadline. Anyway, I finished it. I did a nick work this summer. Now it's final evaluation time. Hope every is fine! Good luck!

August 23, 2015

Add Export function to Gnome-Logs

PS: Because of release freeze, the patch hasn't been updated to master.

The fourth step of GSoC is to add an export feature to Logs. What I did is to export all the logs in the current GtkListBox to a specific file. Here I'd like to talk about how to GMemoryOutputStream to write some data into file.

I need export all the rows of GtkListBox, but every time I can only get the log I wanna export for a single row. So I use GMemoryOutputStream to store these data.

GOutputStream *stream;

stream = g_memory_output_stream_new_resizable ();

Once I get a string for a single row, I use the code below to write the string to GOutputStream

g_output_stream_write (stream, output_text, strlen (output_text), NULL, &error);

After accessing every row of GtkListBox, all the data we want has been put into the GOutputStream. What we need do next is to write these data to a file. What I thought is to get the pointer to the data from GOutputStream and then write these data to the file, which is GFileOutputStream. That means I choose g_memory_output_stream_get_data. When David saw my patch like this, he told me I'd better use GBytes. So, following his advice I use g_memory_output_stream_steal_as_bytes(GMemoryOutputStream *ostream) to get the data from GOutputStream as GBytes. Do remember ostream must be closed before calling this function.

Then we need write these data into a file. I used GtkFileChooserDialog to get the file where the data is gonna be written to. GtkFileChooserDialog is relatively easy, you can just refer to its API. There is some example codes in the description section of the document.

GFile *output_file;
GFileOutputStream *file_ostream;

output_file = gtk_file_chooser_get_file (file_chooser);
file_ostream = g_file_replace (output_file, NULL, TRUE, G_FILE_CREATE_NONE, NULL, &error);

And now we can write GBytes to file_ostream, which is done using the following codes:

g_output_stream_write_bytes (G_OUTPUT_STREAM (file_ostream), bytes, NULL, &error);

Remember to call g_bytes_unref() on GBytes and call g_object_unref() on file_ostream.

That's it for the short summary of fourth step of GSoC 2015.

August 21, 2015

Code has landed in Polari

Florian pushed a new release Polari not more than two days ago. This is Polari 3.17.90:
polari-3.90-thumb

Error Handling

Polari now indicates the status of each connection next to the connection’s name in the sidebar. If Polari encounters an error, an error icon is displayed. Clicking on the connection in the sidebar, will show a popover with error details and an action which can possibly solve it.

Paste service integration is back

Polari 3.17.90 brings back paste service integration with an improved user interface designed by Allan Day. If more than five lines of text are pasted to the chat, Polari will indicate that the text is going to be uploaded to a public paste service. Pressing enter confirms, Ctrl+Z, Delete, Backspace or Escape cancels.

Misc.
  • The sidebar now sports an improved look by Lapo Calamandrei.
  • The ‘New messages’ line has gotten a more clear design by Allan.
  • A good 16 bugs or so has been fixed since 3.17.3, improving stability and user experience.

GUADEC 2015

As most of you know, this month between 7 and 12, GUADEC 2015 took place in Gothenburg, Sweden. I was fortunate enough to attend the conference for my first time.

11351170_965119193510474_2702995457426774226_n

Luckily enough, my mentor, Michael Catanzaro, also attended the conference and I had the opportunity to talk to him, get feedback on my project, discuss things over lunch and work together a bit during the BoF days. Besides him, I also got to meet a lot of interesting people, most of whom he introduced me to, like Allan Day, who helped me up with mock-ups, design suggestions and a design review during the BoF days (thanks!), Gwang Yoon Hwang, who is all around a pretty nice guy, ChangSeok Oh, Taichi Kawabata (sorry if I mistaken your name), Udayan Tandon and many many others.

By attending most of the talks during the “Core Days” of the conference and taking part in the discussions that happened during breaks, lunches and BoF days, I managed to learn a lot about the GNOME community and the GNOME stack.

Being a Google Summer of Code student I had the opportunity to give a lightning talk about the work I did on my project during the summer. Even though the crowd made me hesitate at first, the talk and the positive feedback I received after it added up to a great experience.

Credits to Garrett LeSage

A big thank you to the GNOME Foundation for sponsoring my travel to GUADEC 2015 and a big thank you to the GNOME community for being so helpful and awesome!


Other Locations on Nautilus (GSoC final report)

Did you see what just happened with Nautilus? In case you didn’t, here’s what happened:

Other Locations on Nautilus

Yes, Nautilus now is able to display Other Locations view, and finally it caught up with Gtk+ file chooser! It’s already on master, so anyone can test it with jhbuild. Also, Nautilus 3.17.90 already includes it, so Fedora Rawhide users (and any other bleeding edge distro) will be able to test.

What’s happening?!

The Other Locations view was born to fix this issue:

Endless sidebar

The sidebar is enormous and my entire screen isn’t able to display it all. So we came up with the “Other Locations” idea: a place where we keep persistent, fixed things, and open space for  the sidebar to display what really matters. The implementation progress in Gtk+ is well documented here, as well as in Nautilus.

Flies And Spiders

In order to be able to implement this Nautilus feature, a huge cleanup was needed. Summing things up, it was more than -12117/+15487 lines of code changed, considering only the last 30 days. Obviously we’re introducing new issues, but hopefully we’ll be able to fix them all before 3.18 release.

Here’s a list of happened:

  • Search logic behind the scenes was completely reworked to be simpler and saner.
  • The code to select, open & switch views was also reworked.
  • Complete isolation underlying model of the files view.
  • A new abstraction layer was added, so we could encapsule the Other Locations view and the files view.
  • Code is much more clean and sweet (more on that below).
  • Don’t show empty folder feedback on desktop.

Riddles In The Dark

I integrally agree when my (awsome) mentor Carlos Soriano says that “it’s better for us a clean code that fails an can be fixed, then a speghetti code that works and can’t be improved.”

A clean code attracts new contributors to work on. I can only imagine how many skillfull people that tried to do some work on Nautilus and gave up because of it’s complexity. Because of that, we were really engaged on making the Other Locations view work the right way – and, if that means reworking the delicate and intricate internals, so be it.

I sincerely hope that, with all the efforts we put on making the codebase a little bit easier an simpler, new contributors will appear. Maybe we can even have another Summer of Code project on Nautilus! And talking about Summer of Code…

There and back again

The landing of the Other Locations view on Nautilus marks the end of my Summer of Code project. It was a big journey, and lately I even forgot it was a GSoC project at all, such was the joyful and frantic pace of work. I learned an uncountable amount of things, specially regarding software stability, good and bad software design and team work.

While the project is over, I won’t stop contributing to Nautilus. Even with the interesting code, even with all the strange things surrounding it. Nautilus is like an ugly puppy: it may hurt your eyes, yet you still warmly love it.

Nautilus (All rights reserved to the author)

And… for those who like to see moving images, and to never loose the tradition, here’s a nice video of the work:

Embargoed firmware updates in LVFS

For the last couple of days I’ve been working with a large vendor adding new functionality to the LVFS to support their specific workflow.

Screenshot from 2015-08-21 13-06-02

The new embargo target allows vendors to test the automatic update functionality using a secret vendor-specific URL set in /etc/fwupd.conf without releasing it to the general public until the hardware has been announced.

Updates normally go through these stages: Private → Embargoed → Testing → Stable although LVFS users with the QA capability can skip these as required. The screenshot also shows that we’re unpacking the .cab file and parsing the metainfo file server side (in python), which gives us so much more rich detail about the firmware.

Help us get the GUADEC 2014 videos published

For those who could not attend GUADEC 2015, video recordings have been processed and published here. You might wonder, then, what happened to the GUADEC 2014 videos. The talks in Strasbourg were recorded indeed, but the audio came from the camera’s built-in microphones (so no truly directional mic and no line-in feed). This is problematic for a number of reasons:

  • We were in the city center of Strasbourg with no air conditioning, which means that the windows were open so we heard all sorts of noises (including cars passing on the stone pavement, construction work, etc.) in addition to background noise.
  • One of the rooms did not have a speaker microphone/amplified sound system
  • The camera microphones being far from the speaker means that you hear noises from the audience (such as chairs moving)

So the videos required a significant amount of processing to be adequate for publishing. So far, Bastian Ilsø has been doing the majority of the work and has managed to process about 25% of the talks (Alexandre Franke has also been working on sound processing).

This is where you come in. If you have a little bit of patience and a good pair of headphones, you can help! Take a look at our current dashboard, poke afranke on #guadec through irc.gnome.org (or by email at afranke at gnome.org) to let us know you will be taking care of talk XYZ, and he will send you a link to the corresponding audio file (and video if you need it). You can then do the processing in Audacity to remove the background noise and occasional noises (ex: chairs) before amplifying the whole sound track. You can find detailed instructions on the recommended way to do that here.

Processing one video’s soundtrack should normally take you a maximum of two hours (since you have to listen, pause and add silences to remove occasional big sounds) per talk. We’d like to get this accomplished as quickly as possible, so you should get involved only if you can commit to spending a few hours on this soon.

Once you’re done, let us know and send us the processed sound file — we will then include it in the video for final editing and publishing.

If a dozen of us processed two of those talks each, we might be done within a week or two! So roll up your sleeves and help us get those important recordings completed for posterity.

Also, GUADEC 2015 speakers: if you haven’t done so already, please email your slides to Alexandre Franke so we can include them with the video files this year.

GUADEC 2015

This one’s a bit late, for reasons that’ll be clear enough later in this post. I had the happy opportunity to go to GUADEC in Gothenburg this year (after missing the last two, unfortunately). It was a great, well-organised event, and I felt super-charged again, meeting all the people making GNOME better every day.

GUADEC picnic @ Gothenburg

I presented a status update of what we’ve been up to in the PulseAudio world in the past few years. Amazingly, all the videos are up already, so you can catch up with anything that you might have missed here.

We also had a meeting of PulseAudio developers which and a number of interesting topics of discussion came up (I’ll try to summarise my notes in a separate post).

A bunch of other interesting discussions happened in the hallways, and I’ll write about that if my investigations take me some place interesting.

Now the downside — I ended up missing the BoF part of GUADEC, and all of the GStreamer hackfest in Montpellier after. As it happens, I contracted dengue and I’m still recovering from this. Fortunately it was the lesser (non-haemorrhagic) version without any complications, so now it’s just a matter of resting till I’ve recuperated completely.

Nevertheless, the first part of the trip was great, and I’d like to thank the GNOME Foundation for sponsoring my travel and stay, without which I would have missed out on all the GUADEC fun this year.

Sponsored by GNOME!

Sponsored by GNOME!

August 19, 2015

Ready ?

Actions and UI.

In order to toggle the action from the desktop, a test UI have been added. It's basic but allow a UI way to toggle all actions. More work has to be done around the UI. We need a better integration with the original window. Currently, there is no way to type a custom answer to an sms UI wise. The gnome-shell extension is still envisaged. Also, we still don't have a way to know that a notification was closed on the linux side (bugzilla).

Service discovery.

The service discovery is finished. Nuntius-linux now look for any android device that have a nuntius server launched. It can even connect to them automatically. Nuntius-android can connect to multiple nuntius-linux and vice-versa.

The pairing process.

Now, when nuntius-linux tries to connect to a phone that hasn't trusted it's certificate, it automatically shows the qr-code view and on android the scanner view. As soon as you scanned it and pressed the "ok" button on linux the server will reconnect succesfully to the android. Nuntius is also now indepedent of any app for the qr code view. The android app display tips on how to pair correcty.

Fedora Workstation Next Steps: Wayland and Graphics

So I realized I hadn’t posted a Wayland update in a while. So we are still making good progress on Wayland, but the old saying that the last 10% is 90% of the work is definitely true here. So there was a Wayland BOF at GUADEC this year which tried to create a TODO list for major items remaining before Wayland is ready to replace X.

  • Proper menu positioning. Most visible user issue currently for people testing Wayland
  • Relative pointer/confinement/locking. Important for games among other things.
  • Kinetic scroll in GTK+
  • More work needed to remove all X11 dependencies (so that desktop has no dependency on XWayland being available.
  • Minimize main thread stalls (could be texture uploads for example)
  • Tablet support. Includes gestures, on-screen keyboard and more.

A big thank you to Jonas Ådahl, Owen Taylor, Carlos Garnacho, Rui Matos, Marek Chalupa, Olivier Fourdan and more for their ongoing work on polishing
up the Wayland experience.

So as you can tell there is a still lot of details that needs working out when doing something as major as switching from one Display system to the other, but things are starting to looking really good now.

One new feature I am particularly excited about is what we call multi-DPI support ready for Wayland sessions in Fedora 23. What this means is that if you have a HiDPI laptop screen and a standard DPI external monitor you should be able to drag windows back and forth between the two screens and have them automatically rescale to work with the different DPIs. This is an example of an issue which was relatively straightforward to resolve under Wayland, but which would have been a lot of pain to get working under X.

We will not be defaulting to Wayland in Fedora Workstation 23 though, because as I have said in earlier blog posts about the subject, we will need to have a stable and feature complete Wayland in at least one release before we switch the default. We hope Fedora Workstation 23 will be that stable and feature complete release, which means Fedora Workstation 24 is the one where we can hope to make the default switchover.

Of course porting the desktop itself to Wayland is just part of the story. While we support running X applications using XWayland, to get full benefit from Wayland we need our applications to run on top of Wayland natively. So we spent effort on getting some major applications like LibreOffice and Firefox Wayland ready recently.

Caolan McNamara has been working hard on finishing up the GTK3 port of LibreOffice which is part of the bigger effort to bring LibreOffice nativly to Wayland. The GTK3 version of LibreOffice should be available in Fedora Workstation 23 (as non-default option) and all the necessary code will be included in LibreOffice 5 which will be released pretty soon. The GTK3 version should be default in F24, hopefully with complete Wayland support.

For Firefox Martin Stransky has been looking into ensuring Firefox runs on Wayland now that the basic GTK3 port is done. Martin just reported today that he got Firefox running natively under Wayland, although there are still a lot of glitches and issues he needs to figure out before it can be claimed to be ready for normal use.

Another major piece we are working on which is not directly Wayland related, but which has a Wayland component too is to try to move the state of Linux forward in the context of dealing with multiple OpenGL implementations, multi-GPU systems and the need to free our 3D stack from its close ties to GLX.

This work with is lead by Adam Jackson, but where also Dave Airlie is a major contributor, involves trying to decide and implement what is needed to have things like GL Dispatch, EGLstreams and EGL Device proposals used across the stack. Once this work is done the challenges around for instance using the NVidia binary driver on a linux system or using a discreet GPU like on Optimus laptops should be a thing of the past.

So the first step of this work is getting GL Dispatch implemented. GL Dispatch basically allows you to have multiple OpenGL implementations installed and then have your system pick the right one as needed. So for instance on a system with NVidia Optimus you can use Mesa with the integrated Intel graphics card, but NVidias binary OpenGL implementatioin with the discreet Optimus GPU. Currently that is a pain to do since you can only have one OpenGL implementation used. Bumblebee tries to hack around that requirement, but GL Dispatch will allow us to resolve this without having to ‘fight’ the assumptions of the system.

We plan to have easy to use support for both Optimus and Prime (the Nouveau equivalent of Optimus) in the desktop, allowing you to choose what GPU to use for your applications without needing to edit any text files or set environment variables.

The final step then is getting the EGL Device and EGLStreams proposal implemented so we can have something to run Wayland on top of. And while GL Dispatch are not directly related to those we do feel that having it in place should make the setup easier to handle as you don’t risk conflicts between the binary NVidia driver and the Mesa driver anymore at that point, which becomes even more crucial for Wayland since it runs on top of EGL.

Post GUADEC

GUADEC 2015 was a lot of fun, from preparation till the conference happening. I gave a lightning talk on my work on Polari, a talk on GNOME’s release videos and a talk at FOSSGBG on my experience getting started in GNOME.

07-14-15 me-behind-release-videosthumbBehind the Release Videos. Picture by Garrett LeSage (CC-BY-SA 4.0)

I felt joy meeting everyone at the conference, at the picnic, at swedish local restaurants, and at the GNOME games. It was also great to meet with Florian and get some code landed in Polari (more on that soon).

07-14-15 felix-lappy-thumbFelix is landing some code. (CC-BY-SA 4.0)

Hugs to Andreas and Fabiana for letting me stay at their place and for being the initiative to make GUADEC happen in Gothenburg. The conference has ignited an even bigger fire in me for contributing to GNOME.

The Road to GUADEC 2015; a new face

This year I was at GUADEC (GNOME Users And Developers European Conference), that took place in Gothenburg, Sweden.

It was a nice experience, where I met cool people and seen a little of what Sweden has to offer.

  1. The Flight

It wasn’t a direct flight, so we (me and two other friends that also attended GUADEC) had to make a stopover in Amsterdam. Because we knew this we took some tickets in order to have 5 hours to visit Amsterdam.

The back flight, from Amsterdam to Romania, was more “interesting” in the sense that me and one of my friends were very close to lose the flight because we forget were were the baggage lockers. Luckily, one guy from the airport security knew where that lockers were to be found and we caught the plane. :)

Sorry for the dirty window

2. Amsterdam

When we arrived in Amsterdam, we knew we had to reach Central Station, and from there we could visit some of the city. We spent much of our time walking around at first, but when we returned from Sweden, we visited The Amsterdam Dungeon. Here we walked from room to room (dark and small ones) and different actors presented us some of Amsterdams history.

We also wanted to visit the Madame Tussauds but it was a very huge queue and we had to do something else: Amsterdam is full of tourists.

3. Gothenburg

The final destination. I would stay in this city for 6 days.

In the first day I met my mentor, Tobias Mueller aka Tobi, a very cool and energetic person and later he introduced me to a lot of GNOME folks.

I missed some of the talks, but Bastian did a great job and we all have the recorded talks right here. Thanks, Bastian!

At the interns lightning talks (I had a talk also) I had some emotions, but everything came out good.

In the last days, I participated at a BoF about gnome-shell-extensions and some of the ideas discussed can be found here (I only stayed in my corner and listened to the different ideas).

Also, Oliver took us to a field trip, but a group of 4 people (me included) managed to get lost. We tried to catch up with them, but with no success; somewhere we climbed a small hill, I think there we took another route.

In the final day we went to a park, near where we stayed, Liseberg, and there were amazing rides. The coolest one was the AtmosFear.

In the end, I want to thank my mentor for the good time, Florian Mullner for helping me with my extension and the GNOME Foundation for sponsoring my travel.

“Be the change you want to see in the world.” – Mohandas Gandhi

gnome-foundation-sponsored-badge


August 18, 2015

Canonical's deliberately obfuscated IP policy

I bumped into Mark Shuttleworth today at Linuxcon and we had a brief conversation about Canonical's IP policy. The short summary:
  • Canonical assert that the act of compilation creates copyright over the binaries, and you may not redistribute those binaries unless (a) the license prevents Canonical from restricting redistribution (eg, the GPL), or (b) you follow the terms of their IP policy. This means that, no matter what Dustin's blogpost says, Canonical's position is that you must ask for permission before distributing any custom container images that contain Ubuntu binaries, even if you use no Ubuntu trademarks in the process. Doing so without their permission is an infringement of their copyright.
  • Canonical have no intention of clarifying their policy, because Canonical benefit from companies being legally uncertain as to whether they have permission to do something or not.
  • Mark justifies maintaining this uncertainty by drawing an analogy between it and the perceived uncertainties that exist around certain aspects of the GPL. I disagree with this analogy pretty strongly. One of the main reasons for the creation of GPLv3 was to deal with some more ambiguous aspects of GPLv2 (such as what actually happened after license termination and how patents interacted with the GPL). The FSF publish a large FAQ intended to provide further clarity. The major ambiguity is in what a derivative work actually is, which is something the FSF can't answer absolutely (that's going to be up to courts) but will give its opinion on when asked. The uncertainties in Canonical's IP policy aren't a result of a lack of legal clarity - they're a result of Canonical's refusal to answer questions.

The even shorter summary: Canonical won't clarify their IP policy because they believe they can make more money if they don't.

Why do I keep talking about this? Because Canonical are deliberately making it difficult to create derivative works, and that's one of the core tenets of the definition of free software. Their IP policy is fundamentally incompatible with our community norms, and that's something we should care about rather than ignoring.

comment count unavailable comments

The save icon needs an update

I was planning to write a blog post on the usability of LibreOffice, specifically Writer, when I noticed that the screenshots I had taken from 4.3.5.2.0 and 4.4.4.3 both used the "floppy disk" for the "Save" action:

LibreOffice 4.3.5.2.0 on Fedora Linux (screenshot by me)

LibreOffice 4.4.4.3 on Fedora Linux (screenshot by me)

Icons carry meaning, the same as words. In fact, we use icons to replace words. In user interface design, icons convey the meaning behind an action, but doing so without words. This saves space on the screen, but also makes it easier for the same program to address multiple languages. Whether you have your system set to English or French or German, you see the same icons.

So it baffles me that the floppy disk continues to represent the "Save" action in so many user interfaces. You can see from the LibreOffice Writer screenshots, the "Save" action in both versions uses a floppy disk icon. I'll note that 4.4.4.3 is the latest version of LibreOffice Writer.

And it's not just LibreOffice that uses a floppy disk icon to communicate "Save." Microsoft uses the venerable floppy disk icon in the latest version of Microsoft Office:

"Microsoft Word on Windows 8" by Source (WP:NFCC#4). Licensed under Fair use via Wikipedia.
Do an image search for "save icon" or "save button" and you'll quickly be presented with floppy disk images. The floppy disk has become that ubiquitous.

But what is my problem with the floppy disk icon? No one under 30 recognizes it as a floppy disk. It is just some funny-looking square that means "Save." Users have been forced to learn the meaning of an icon. But the icon is supposed to be obvious in its meaning.

The "Save" icon needs an update. We need to change the "Save" icon to be meaningful to a variety of users, not just those that grew up with the older technology.

GNOME 18th birthday in Chinese!

Although it’s a little late to know the birthday news from https://www.gnome.org/news/2015/08/happy-18th-birthday-gnome/ , I hope more people in China could learn and celebrate it!

http://www.bjgug.org/%E8%B5%84%E8%AE%AF/gnome-18birthday/

Adding a list view to Boxes

A list view was a requested feature for Boxes, I decided to commit myself to implement this during this GSoC.

March: exploring the idea

I started working on adding a list view to Boxes in march 2015. By that time, the expected columns for the list view where:

  • the thumbnail;
  • the machine's name;
  • a system monitor;
  • the machine's IP;
  • the OS' icon;
  • an icon to display show a favorite machine.

Implementing such a view using libgd's MainView (the same widget responsible of the icon view) required me:

  • to learn how to write a custom GtkCellRenderer for the system monitor;
  • to find how to get a machine's IP adress;
  • to find how to OS icons are retrieved in Boxes.

Unfortunately, I had to pause the implementation of this feature to focus on my studies.

July 6–12: designing the list view

I joined a chat on Google Hangout where Alan Day, Jakub Steiner and Zeeshan Ali on july 8th. During this talk, Zeeshan stated its desire to stop using libgd—suggesting to use GtkFlowBox and GtkListBox to implement the icon view and the list view respectively—and Jakub produced the following mockup. Even though I didn't talked much (if at all), it was really enriching to follow such a discussion.

As you can see, there is no system monitor nor the OS' logo, and columns to show the machine's state and a selection state have been added. I then scrapped the system monitor cell renderer I implemented and integrated the previous days.

With this new design, I had enough material to start implementing the list view.

I needed the content of the widget to be sortable and filterable, hence I implemented the BoxesSortedListModel and BoxesListModelFilter classes to allow me to do so, as I didn't notice at that time that both GtkFlowBox and GtkListBox offered such capabilities.

I started producing the BoxesCollectionItemListView widget to render a collection item in the list view and the BoxesCollectionListView to implement the list view. By that time, most of the expected features worked but annoying bugs were remaining and the look was far from being polished.

July 13–19: polishing the list view

I removed the ListModelFilter and SortedListModel classes to favoritize GtkListBox's filtering and sorting functionalities.

The theme have been refined using CSS, the selection mode have been added and several bugs have been discovered and fixed.

Bug #752615 in GtkListBox have been discovered, a workaround have been added in Boxed.

July 20th: submitting patches

On july 20th, I reorganized the patches and polished their logs to look nicer, then I attached them to bug #733252. Their review is in progress and I hope they will be committed before the UI freeze.

GUADEC: reworking the thumbnails

During the 2015 edition of the GUADEC, I've been able to meet my mentor, Zeeshan, to more easily discuss the design of my code and more importantly, the disturbance created by the changes I made.

Following is a list of the problems I encountered and how I tried to solve them.

    • Problem: The MachineThumbnailer class have been created because the icon view needed a GdkPixbuf as a thumbnail, and the list view's thumbnail is expected to have a different style than the one harcoded in MachineThumbnailer.
    • Solution: Create the custom MachineThumbnail widget, responsible of rendering a machine's thumbnail, taking advantage of the CSS styling and the states to offer a more refined view.
    • Problem: We now have two very close yet slightly different objects, some refactoring may be a good idea.
    • Solution: Add and use the MachineThumbnailDrawer class, allowing to draw a thumbnail on any Cairo context — hence on a GdkPixbuf or a widget — and with a given style and state. The MachineThumbnail and MachineThumbnailer classes used it to draw.
    • Problem: MachineThumbnail have different behaviours depending on its states, while MachineThumbnailer always draw with the same style.
    • Solution: Use the same style for MachineThumbnail, whatever its state is.
    • Problem: We now have two objects with a really close behaviour now, it may be simpler to only use one.
    • Solution: Make MachineThumbnailer customizable enough to be able to render pixbufs for both thumbnails, and make the list view's thumbnail a simple GtkImage.
    • Problem: The list view thumbnail's spinner make the whole thumbnail spin now!
    • Solution: Use a proper GtkSpinner and switch between it and the real thumbnail when needed.

Conclusion

This feature have been really interesting to implement, it improved my understanding of what behaviours are good to have when introducing new code, and even if I still struggle to write really good commit messages, I feel like I nonetheless got better at it.

I also learned an awful lot about GTK+: I learned:

  • how to use GListModel,
  • how to use GtkListBox,
  • how to use GtkFlowBox,
  • how to implement custom spinners,
  • how to theme a widget with CSS,
  • how to use the widget states,
  • and so many more!

August 17, 2015

Sweet sweet GUADEC

When deciding mentoring organizations during GSoC preparations, GNOME was the top one on my list. And I'm glad that I got it. Otherwise, I might not have attended GUADEC.

It was my first GUADEC and also my first International visit. I made new friends, who will always be there to send me exotic chocolates from all over the world ;). Attended a large number of talks that opened my vision toward the existing GNOME projects. Met my mentor who turned out even cooler than expected (BTW he can fly Helicopter). Met some very cool people, the faces behind the success of GNOME foundation. Loved the interns' lunch, that was a great idea to connect with interns and to inspire them towards open-source contributions. I am gonna continue contributing to GNOME.


Did some volunteer work, and I'm proud of it.
Did some volunteer work, and I'm proud of it.


I'm not a man of many words. But, I came in as a GSoC intern and left as a part of GNOME community.


Oh! By the way Liseberg park was fun, especially the _Atmosfear_.
Oh! By the way Liseberg park was fun, especially the Atmosfear.


An Open Letter to Apache Foundation and Apache OpenOffice team

A couple of weeks I visited my mother back home in Norway. She had gotten a new laptop some time ago that my brother-in-law had set up for her. As usual when I come for a visit I was asked to look at some technical issues my mother was experiencing with her computer. Anyway, one thing I discovered while looking at these issues was that my brother-in-law had installed OpenOffice on her computer. So knowing that the OpenOffice project is all but dead upstream since IBM pulled their developers of the project almost a year ago and has significantly fallen behind feature wise, I of course installed LibreOffice on the system instead, knowing it has a strong and vibrant community standing behind it and is going from strength to strength.

And this is why I am writing this open letter. Because while a lot of us who comes from technical backgrounds have already caught on to the need to migrate from OpenOffice to LibreOffice, there are still many non-technical users out there who are still defaulting to installing OpenOffice when they are looking for an open source Office Suite, because that is the one they came across 5 years ago. And I believe that the Apache Foundation, being an organization dedicated to open source software, care about the general quality and perception of open source software and thus would share my interest in making sure that all users of open source software gets the best experience possible, even if the project in question isn’t using their code license of preference.

So I realize that the Apache Foundation took a lot of pride in and has invested a lot of effort trying to create an Apache Licensed Office suite based on the old OpenOffice codebase, but I hope that now that it is clear that this effort has failed that you would be willing to re-direct people who go to the openoffice.org website to the LibreOffice website instead. Letting users believe that OpenOffice is still alive and evolving is only damaging the general reputation of open source Office software among non-technical users and thus I truly believe that it would be in everyones interest to help the remaining OpenOffice users over to LibreOffice.

And to be absolutely clear I am only suggesting this due to the stagnant state of the OpenOffice project, if OpenOffice had managed to build a large active community beyond the resources IBM used to provide then it would have been a very different story, but since that did not happen I don’t see any value to anyone involved to just let users keep downloading an aging releases of a stagnant codebase until the point where bit rot chases them away or they hear about LibreOffice true mainstream media or friends. And as we all know it is not about just needing a developer or two to volunteer here, maintaining and developing something as large as OpenOffice is a huge undertaking and needs a very sizeable and dedicated community to be able to succeed.

So dear Apache developers, for the sake of open source and free software, please recommend people to go and download LibreOffice, the free office suite that is being actively maintained and developed and which has the best chance of giving them a great experience using free software. OpenOffice is an important part of open source history, but that is also what it is at this point in time.

ownCloud Conference

Hi everyone,

on September 1st and 2nd I will be able to attend the ownCloud conference in Berlin. Top point on the agenda is the collaboration of ownCloud and GNOME in the next Google Summer of Code as I’m a GSoC administrator for GNOME.

If you’re interested and also attending, please drop me a mail to lasse.schuirmann@gmail.com .

As a daily ownCloud user and GNOME developer I’m very excited about attending this conference and strengthening the bond between ownCloud and GNOME – the ability to share great things and build on what others have built is the greatest thing of free software and it is the most important property that drives progress.

Many thanks to the ownCloud travel support programm for giving me the financial help needed to attend this conference and to Jan-Christoph Borchardt for actively reaching out to us.

GUADEC 2015 in Gothenburg, Sweden

This summer, GUADEC, the GNOME Users and Developers Conference took place in Gothenburg, Sweden. It’s a lovely city, especially in summer, with nice people, excellent beers, and good infrastructure. Fun fact: Unisex toilet seem to be very popular in Gothenburg. The conference was hosted in sort of a convention centre and was well equipped to serve our needs. I guess we’ve been around 150 people to come together in order to discuss and celebrate our favourite Free Software project: GNOME.

One of the remarkable talks I attended was given by Matthias Kirschner from the FSFE presented on software freedom and how is concerned about the computer as a general purpose machine. So his talk was title “The computer as a Universal Machine”. He was afraid that the computing machines we are using become more and more special purpose devices rather than a general purpose machine. He gave examples of how he thinks that has happened, like corporations hiding the source code or otherwise limit access to change the behaviour of the computing machines we are using. Other examples were media with Digital Restrictions Management. Essentially it is about removing features instead of widening the functionality. As such, SIM locks also served an example. With SIM locks, you cannot change your SIM card when, say, you are on holidays. More examples he gave were the region code of DVDs or copy restrictions on CD-ROMs. He was also referring to the Sony CD story from a couple of years ago when they infected buyers of their CD-ROMs or the Amazon fiasco where they deleted books on their reader devices. Essentially, these companies are trying to put the user into the back-seat when it comes to take control over your devices.

While protecting the owner of the computer sounds useful in a few scenarios, like with ATMs, it can be used against the owner easily, if the owner cannot exercise control over what the machine considers trusted. A way to counter this, he said, is to first simply not accept the fact that someone else is trying to limit the amount of control you can exercise over your machines. Another thing to do, according to him, is to ask for Free Software when you go shopping, like asking for computers with a pre-installed GNU/Linux system. I liked most parts of the talk, especially because of the focus on Free Software. Although I also think that for most parts he was preaching to the choir. But I still think that it’s important to remind ourselves of our Free Software mission.

Impressively enough, you can already watch most of the Videos! It’s quite amazing that they have already been cut and post-process so that we can watch all the things that we missed. I am especially looking forward to Christian’s talk on Builder and the Design session.

I really like going to GUADEC, because it is so much easier and more pleasant to communicate with people in-person rather than on low bandwidth channels such as IRC or eMail. I could connect my students with all these smart people who know much more about the GNOME stack than I do. And I was able to ask so many things I hadn’t understood. Let’s hope there will be GUADEC next year! If you are interested in hosting next year’s edition, you should consider submitting a bid!

On my travel back I realised that the Frankfurt Airport is running Ubuntu:

I want to thank the GNOME Foundation for sponsoring my travel to GUADEC 2015.
Sponsored by GNOME!

BOF at GUADEC

I participated the GNOME.Asia's BOF with Oliver, Emily, Ali and other people. It's very great to have so many people care about GNOME Asia and willing to help. We shared the history of GNOMA Asia and discussed the future plan. I've never been to a GNOME Asia Summit before, but I thought it's a good chance for us to communicate and hope I can go to the next one. We discussed many issues, like whether co-hosting the next GNOME Asia Summit with other organization, the ways to promote GNOME Asia, how we can get it better, and so on. Also, the trip after the BOF was a nice journey, Sweden is beautiful by the way~



Volunteer work at GUADEC

I applied for volunteer before GUADEC, hoping to help other people. But it seems that there were too many volunteers to be scheduled, so I'm not arranged and can help when needed. Since we only had two rooms for speech at the venue, there was not much work to do. I just did some cleaning work at the end of the core conference. Hope to help again, maybe at next GUADEC~

August 16, 2015

Help me improve Yelp’s conditional processing

Yelp has runtime conditional processing for both Mallard and DocBook, so you can show different content to users in different environments. For example:

<p if:test="platform:gnome-classic">We only show this in classic mode.</p>
<p if:test="platform:unity">We only show this in Unity.</p>
<p if:test="platform:fedora">We only show this in Fedora.</p>
<p if:test="platform:fedora-22">We only show this in Fedora 22.</p>

Read more about Yelp’s runtime conditional info and Mallard’s conditional tokens. To my knowledge, no other help system does this kind of automatic runtime conditional processing. After some conversations with Endless folks at GUADEC, I realized we’re still missing some cases. I want to make this better.

I’ve put together a short three-question survey. Please fill it out with information from each different kind of machine you have access to.

Feeds