2012-12-30

[Technology] kernel_task consumes almost 100% of CPU on Mac OS X


The Problem


A friend spilt tea on their MacBook Air and this has probably killed their battery.  In an attempt to see if it was just a firmware problem, they attempted an SMC reset, which resulted in their computer becoming incredibly slow (and the battery still not working).  Reviewing CPU usage showed that kernel_task was opaquely consuming all available CPU cycles.  Oh nos!



(spoiler: this post does not end in a working battery, just in eliminating the excessive CPU usage)


Possible solutions


I googled a bit.  Some people recommended trying a PRAM reset (which did nothing (to do it, use command + option + P + R at boot after the tone, until you hear a second tone)).  Starting up in safe mode to see if disabling all non-core kernel extensions helped did not (to do that, hold shift at the start up tone until the grey Apple logo appears).   Finally, someone suggested disabling one of the plists for power management in one of the kernel extensions.  The idea there was that the kernel thought the computer was overheating and was trying to take misguided measures to deal with it that resulted in total CPU consumption (and more heat).  I thought this might be relevant, not due to heat, but because a part of the device was no longer working, and perhaps the kernel didn't understand and was making a bad decisions.


The solution


This turned out to be the right idea.  Under /System/Library exist many kernel extensions, and the relevant one is the IOPlatformPluginFamily.kext.  There suggestion was to disable the plist for your model of computer that was located in that kext's Contents/PlugIns/ACPI_SMC_PlatformPlugin.kext (a sub kext!).  First, his MacBook Air didn't have a relevant plist, and second, disabling that entire kext (simply by renaming it to something else so Mac OS X wouldn't find and load it) did not help.



I then tried disabling IOPlatformPluginFamily.kext altogether, and it worked!  Thinking that a bit too brutish, though, I re-enabled it, and tested disabling a variety of its sub kernel extensions (under /System/Library/IOPlatformPluginFamily.kext/Contents/Plugins) to see which one was the culprit.



Here are the sub kernel extensions within IOPlatformPluginFamily.kext:


  • ACPI_SMC_PlatformPlugin.kext

  • AppleSMCPDRC.kext

  • IOPlatformPluginLegacy.kext

  • X86PlatformPlugin.kext

  • X86PlatformShim.kext   < this is the one I had to disable.



Steps


Here are the steps for disabling them.  Pardon any errors, as I'm doing this from memory and photographs after the fact.



1. Open a Terminal (Applications > Utilities > Terminal).  This took a dreadfully long time, given how slow the computer was running.

2. Run these commands (text precede by a # is just a comment)

> cd /System/Library/IOPlatformPluginFamily.kext # enter main kext directory> cd Contents/Plugins  # enter kext's plugins (other kexts)

> ls  # list the available kexts

ACPI_SMC_PlatformPlugin.kext
AppleSMCPDRC.kext
IOPlatformPluginLegacy.kext
X86PlatformPlugin.kext
X86PlatformShim.kext


> sudo mv X86PlatformShim.kext X86PlatformShim.kext.disabled # rename the culprit .kext (after trial and error) to something different so it can't be loaded (doesn't need to add .disabled specifically); start  with sudo to do this as the root user (or you won't have permission); this will request your user password

3. Then, restart your computer to see if it works.



You should be able to actually rename /System/Library/IOPlatformPluginFamily.kext as a quick test to start to see whether a problematic .kext exists within it, and then try this (or maybe ACPI_SMC_PlatformPlugin.kext's specific plist, depending on your actual problem) to be more specific (who knows, some of the plugins might actually be there for a reason ;). 

2012-12-27

[Technology] gethostbyname failed

I was trying to set up a Festival speech synthesis server to work with Speech Dispatcher and a Rhythmbox plugin I'm working on. Speech Dispatcher couldn't connect to it. I tried connecting to the Festival server with the Festival client, and that didn't work either, instead giving me an error "gethostbyname failed". I investigated and saw it should be trying to connect to localhost at 1314. I verified that my firewall and selinux weren't involved. Then I finally peaked at my /etc/hosts file, and sure enough a change I made a couple weeks ago broke it. I reverted that, and now it works again. Yay!

2012-12-24

[Technology] Resizing my encrypted, ext4 file system

I normally just upgrade my Linux distro from its semiannual release in place.  I keep my existing file system and just upgrade packages en masse.   I don't usually reformat and restore files from a backup.



For Fedora 17 last year, though, I wanted to upgrade all my file systems from the ext3 format to ext4.  It's "better".  You can do it in place, but there are attributes that won't apply to any old file system entries, only to new ones (new files that get added).  I could in theory have upgraded it in place, and then just copied files back and forth from another drive, but whatever.  Clean start.  I backed up all my personal files, and reformatted the whole disk as ext4, and moved it back.



Now, the disk setup was this.


  • 0.5GB boot partition (device: /dev/sda1, mount point: /boot)

  • 465GB volume group (device: /dev/sda2)


    • 4GB swap partition

    • 24GB ext4 root volume (mount point: /)
      This is where all the system files go, like programs.

    • 200GB LUKS ext4 volume (mount point: /home)
      This was my primary file system for personal files.  It's encrypted so that if someone steals my laptop, they won't be able to read my data. :)

    • 237GB ext4 volume (mount point: /home2)
      This was a secondary one.  I wasn't sure whether the LUKS encryption on /home would slow down IO-heavy activities, like managing media files.  I didn't mind having things like videos and music stored unencrypted.



Ultimately, though, I found /home2 was unnecessary.  /home was adequately fast for my media.  While I have a laptop, it's 7200RPM rather than 5400RPM, so that helps.  Thanks to my photography habit, I found /home getting almost full, only 1GB free!  I considered moving my music collection to /home2, but decided instead to try to get rid of /home2 and expand /home over that space.



I used system-config-lvm to delete /home2 and then used it to resize /home over top it.  However, that alone did not resize my file system to cover it.  Interestingly, gnome-disks reports the LUKS volume and ext4 file system as taking up the full space, but df reports the ext4 file system as taking up only 200GB.  Uh oh.



So, I read this tutorial on Ubuntu forums about resizing encrypted file systems, and found the one step I still needed to take.  Apparently, system-config-lvm won't really resize the ext4 file system, even though gnome-disks claims afterwards that it larger.  So, I just ran resize2fs on it.  I used mount to figure out which volume it was on (mine was /dev/mapper/luks-blah-blah-blah) and then ran resize2fs /dev/mapper/luks-blah-blah-blah, while it was even mounted (!).  Hooray for live resizing.  It worked well, and after a reboot still worked too.

2012-12-23

[Technology] Efficiency!

I was using a script for a project that applied a bunch of transformation and filtering rules to some data.  There are only about 60 rules right now, and there is an average of 272 data records each day.   I originally wrote this quickly in a bash script using the terminal commands sed (for replacing a matched pattern with some string) and grep (for filtering based on a matched pattern).



Running it in a given month gets progressively longer as the month goes on, and it was taking on average over 5 minutes (!) to run those 62 rules.  Applying all the rules to each data record was taking almost a full second each.  This wasn't really scalable.



So, today I ported the script to vala, which is a C#-like language that compiles down into C (which is then compiled into native code).  This promises to be much quicker than interpreted code to begin with.  The run time once converted was less than 1 second.  That was a pleasant surprise.



Some of the fun was moving the transformation rules into their own file (XML), separate from the code, and making sure all the Regex objects were created once at the start of the program and then applied to all later data.



To make it still better would probably involve parsing the data records into a structured form from the start, rather than just using regular expressions to transform data strings.  Then creating a couple different type of rules for specific fields.  But this is good enough for now. :)





[Technology] Silly mistakes

Wondering for a day why my Linux Live USB key won't boot on my Asus Eee Top and then realising that the Linux image is 64 bit and the Eee Top is 32 bit.

2012-12-05

[Technology] Login with Facebook

I never log in to a foreign website with Facebook.  Part of the reason is because it's never clear how much true access the website gets to your identity and data, even unintentionally.  I also avoided Google Connect.  I'd much prefer having an identity provider (I.me) which took a step to verify me, and then only gave other websites a consistent token that could not be correlated with my usage between other websites.  I'd be consistent to the website I'm signing in to (I could be 9017 to FreeTheGoats.go) but even if they shared their logs of users with another (EatGlass.net, where I'd now be 7103), they wouldn't be able to go, "A-ha, he likes eating glass and goat liberation!"



I bring this up because of Aviva, and in particular their Georgian Bay Turtle Hospital.  They need an account to at least know your votes are unique (though they'd also like to contact you), but I don't want to create yet another account (I probably will, for the turtles you know) and I don't want to use the alternative of logging in on Facebook.  I'd like another provider to just go ("This is 1097, who you've seen before, so they're not voting a second time today, but they can again tomorrow.")  It's a little reminiscent of OpenID, but that's more identifiable, with named URIs.  Sigh.

2012-10-07

[Technology] Recursion

A friend was asking whether I had a great way to explain recursion.  I had better ways back when I was first learning it, but now it's a bit too implicit.  However, here's an approximation of how I liked to look at it initially.  It's programming centric, in terms of stack frames, but the helpful principle to me was expanding a function as the window into another function, and in particular, into the function of itself.



Recursion note

[Technology] Visitor Pattern

A friend mentioned topics in CS they are dealing with recently.  One is the Visitor pattern.  One of its goals is to keep categories of logic outside of objects they apply to, but which they are conceptually distinct from.  Objects representing animals don't directly care about the logic of saving.   Instead, you get a separate object representing the animal and one representing the logic of saving; this logic-based object is a visitor which will visit the animal to do its work.



How they interact is neat.  They are both passed to one another, which is a degree of coupling I generally try to avoid.  The subject (the animal) has an accept method, which it uses to accept its visitor (the logical object).  The visiting logical object has a visit method, which the subject passes itself to.  The visit method on the logical object then performs its logic on the subject.  Yay!



One of the consequences is a plurality of methods that come into existence to handle the different combinations of subject and visitor.   These blocks of logic are a little unavoidable, so the visitor pattern doesn't really help you reduce the amount of code.  Instead, it just helps you organise it and it simplifies its usage.   Without the visitor pattern, you might have each animal including the logic within its class as methods.  With the visitor pattern, each subject has a trivial function that just passes itself to a visiting visitor that it has accepted.  The visitor will have a different visit () method for each potential subject it might work on, so the subject passing itself to the visitor's visit () helps identify which logic to use.



This vague explanation is elaborated on in this Wikipedia article.

2012-09-29

[Technology] Reliably access an Android device from Linux

problems with file system access

With my Nexus One, I would mount its internal SD card as USB mass storage.  That worked really well, though the phone couldn't access it at the same time.  With a number of more recent Android phones, including my Galaxy Nexus, users are expected to access the phone's file system using MTP or PTP.  That seems to work fine on at least Windows, but it's terrible on Linux.  libmtp and gphoto2's (for ptp) communication with an Android phone is incredibly buggy, slow, and error prone.  Trying to use MTP and PTP with a variety of Linux applications (Rhythmbox, Banshee, Shotwell, GThumb, Nautilus, mtpfs) resulted in my /sdcard/ file system on my phone being wiped out somehow once.  That sucked.  Thanks to Instant Upload with G+, I didn't lose most of my photos, at least.



I have waited patiently for support to come, especially as I don't have time myself to write patches. :D  (My Masters' end draws nigh, though!)  However, it has not.  So, here are a couple other solutions.



wifi

I briefly tried working with the file system over the network, using wifi.  I used SSHDroid and a few other SSH daemons.  Only one sort of worked, and it only worked for half an hour, had an error, and has never worked since (even if I uninstall and reinstall it).  Some of the better solutions want your phone to be rooted, which I've resisted doing for a variety of reasons (which meant a very long wait for Jelly Bean here in Canada).   This isn't great for me anyway, because I don't have a router at home: my phone is my connection to the Internet, and I tether with an unlimited data plan (throttles speed after the first 10GB, no extra charges, hooray for WIND Mobile).



Finally, I've decided to just accept a suboptimal solution: adb.



adb



adb works beautifully, but it isn't as user-friendly or obvious as you might like.  It's smooth, though.



First, get adb from the Android SDK (two steps)



get adb


  • go to http://developer.android.com/sdk/index.html and download the SDK for Linux

  • unpack it: tar -xf android-sdk_*-linux.tgz

  • ./android-sdk-linux/tools/android 

  • under Tools, download Android SDK Platform-tools

  • Now, you'll have adb in ./android-sdk-linux/platform-tools/, you can set it on your PATH if you like so you can run it from any directory.


Now, start adb's server as root so you'll be able to connect to your phone over USB



start adb's server and enable debugging on your phone


  •  cd ./android-sdk-linux/platform-tools/

  • sudo ./adb start-server


    • important to run that as root


  • on your phone, go to Settings -> {} Developer Options -> USB debugging

  • Now on your computer, you should be able to do this, ./adb devices, and see your phone listed


If you check ./adb --help, you'll see a lot of options.  I've only used a few so far to do what I want, but it's been nice.



now to access the file system!


  • in one shell, run ./adb shell, and this will give you an interactive shell within your devices file system.  It doesn't have a complete set of tools (no du, head, less, or more), but it has ls (supporting -l), cd, rm, and rmdir.  I've used this to navigate the system, clean it, and figure out paths for the next step

  • to move files, I've been using ./adb push and ./adb pull.  For example, 


    • ./adb pull /sdcard/DCIM/Camera/ ~/photos/


      • this let me get my photos off at a fair speed (5MB/s) finally; I then used rm in the interactive shell after making sure I wasn't accidentally deleting the wrong things.


    • ./adb push ~/files/music/Sherlock/ /sdcard/Music/



suboptimality



I don't like having to use esoteric utilities on the command-line, and I understand that MTP works well on Windows (and Mac OS X?) but I'm tired of waiting for libmtp on Linux to enable applications to actually do anything with their device.  Hooray for having a solution that is at least smooth and reliable in its operation.

2012-09-24

[Technology] Money over life

Microsoft apparently burned through $70,000 worth of electricity in 3 days to avoid a $210,000 fee for under-consumption with a data centre's electrical utility.  Ugh.

2012-09-21

[Technology] One of the many reason why I dislike Python apps


AttributeError: 'CoreConfig' object has no attribute 'DATA_DIR'

So, on a clean install of GTG 0.2.9, which was released in February, it doesn't even start because an attribute gets referenced before it ever gets instantiated.  Yay.  This happens on almost every Python app I ever use at some point, and why I adore static type checking at compile time.

2012-09-16

[Technology] Xiki, a cool new shell







My friend Anthony just reshared this from a fellow named Paul Irish on Google+ and it's sort of amazing.  Basically, it's like a free-form dynamic shell where output can be interacted with, and where a lot of system functionality and applications are first-class citizens.  The console understands what databases are, what Ruby (and I think he mentioned Python) is, how JavaScript and its DOM work and how to interact with webpages, even manipulating them.



It's a level of interaction I'd like to have at the console level with my system, and not just be restricted to the menu-driven interfaces that some designer thought I would need. :)

2012-08-22

[GNOME] GXml 0.3.1: Can't live in an alternate universe forever

Hello.  I received some feedback from the 0.3.0 release of GXml at the end of the Google Summer of Code.  Mainly that it wasn't compiling on another person's machine.  Changes to autotools to increment the version caused files to not install in a unusuaable configuration, but I didn't notice as I still had files installed from before I incremented the version. :D



I spent last night and today going through autotools files and libfolks to understand what was going wrong.  Then I rewrote a third of GXml's configuration.  I tried following the Vala tutorial's advice, only to discover it was base on GXml.  "make distcheck" now passes too, though I had to relocate some tests and fix a bug in caching deserialised objects.



Thus, 0.3.1:


Any more feedback would of course be welcome.

2012-08-20

[GNOME] GXml 0.3.0

update: thanks to Marcus Lundblad for pointing out issues with the examples

 

The Google Summer of Code 2012 now comes to a close, so to celebrate, GXml 0.3.0 has been tagged with GObject Serialization as its big feature.



The last few days have had been trying to find a clever way to reliably identify some types of collections, but that's not finished, so they're not being automatically serialized in this release.



I've also bravely fought against autotools to try to figure out how to minimise the number of places where I have to update a version number.  Too much of autotools remain a mystery to me, sadly, but I think I got it?  It works for me: hopefully someone will file a bug if something doesn't work for them.



Summary


  • Serialization class


    • that can automatically handle many types

    • that can deserialise to types known on the local system and distinguish multiple references to the same object.  I have some future plans to remove redundant XML that gets generated, too.


  • Serializable interface


    • allows classes to override default serialization and serialize non-public properties too.  Yay!

    • follows json-glib so that a common serialization interface can be defined in the future


  • Documentation


    • successfully got Valadoc to generate GtkDoc (and fixed a lot of documentation in GXml from before)


  • Testing


    • created test suites for serialization features


  • API breakage


    • namespaces were changed, in part to reduce the amount of code C programmers have to write.



Vala Example



Automatic serialization


GXml.DomNode xml = GXml.Serialization.serialize_object (banana);
...
banana = GXml.Serialization.deserialize_object (xml);



Implementing the interface: overriding how a property is serialized


public class Banana : GLib.Object, GXml.Serializable {
public int weight { get; set; }

public GXml.DomNode? serialize_property (string prop_name, GLib.ParamSpec spec,
GXml.Document doc) {
switch (prop_name) {
case "weight":
return doc.create_text_node ("%d".printf (weight * 1000));
default:
return null;
}
}

public bool deserialize_property (string prop_name, GLib.ParamSpec spec,
GXml.DomNode prop_node) {
GLib.Value outvalue = GLib.Value (typeof (int));

switch (prop_name) {
case "weight":
int64.try_parse (((GXml.Element)prop_node).content, out outvalue);
this.weight = (int)outvalue.get_int64 () / 1000;
return true;
default:
return false;
}
}
}



Implementing the interface: override view of properties


using GXml;

public class Plantain : GLib.Object, GXml.Serializable {
private int weight { get; set; }

private ParamSpec[] _props = null;
public unowned ParamSpec[] list_properties () {
if (this._props == null) {
this._props = new ParamSpec[1];
this._props[0] = new ParamSpecInt ("weight", "weight", "weight",
0, 200, 0, ParamFlags.READABLE);
}
return this._props;
}

private ParamSpec prop;
public unowned ParamSpec? find_property (string prop_name) {
ParamSpec[] props = this.list_properties ();
foreach (ParamSpec prop in props) {
if (prop.name == prop_name) {
this.prop = prop;
return this.prop;
}
}
return null;
}

public new void get_property (ParamSpec spec, ref Value str_value) {
Value value = Value (typeof (int));

if (spec.name == "weight")
value.set_int (this.weight);
else {
((GLib.Object)this).get_property (spec.name, ref str_value);
return;
}


value.transform (ref str_value);
return;
}

public new void set_property (ParamSpec spec, Value value) {
if (spec.name == "weight")
this.weight = value.get_int ();
else {
((GLib.Object)this).set_property (spec.name, value);
}
}
}

 

... 

Challenges



These are the greatest challenges I've dealt with



  • my masters: there's a lot of pressure to hurry up and finish; ideally, a GSOC should be the sole or primary focus of my summer, but I don't have much opportunity to take a summer off right now.  Going to GUADEC was amazing, but consequently made my masters a bigger part of these past two weeks.

  • autotools: a lot of feedback centred on people wanting autotools instead of WAF, so now you have and now I cry myself to sleep at night.  I just need to make it a bigger part of my life.

  • valadoc: I was having issues getting valadoc to correctly generate GtkDoc last year and this year until Philip Withnall directed me to libfolks.


Future


  • want to support automatic serialization of more complex types; I've been working on collections but there are problems with it that prevent me from committing it.

  • two projects approached me at GUADEC suggesting GXml for saving data to disk, so I am going to write patches for them. :D

  • examples in other languages


Download tar ball: http://ftp.gnome.org/pub/GNOME/sources/gxml/0.3/

2012-08-16

[Technology] A nuisance

One of my complaints about my Linux desktop is the lack of feedback I get when things aren't working.  If my firewall blocks something, I don't want it to do it silently, I want to know that the firewall is the reason this or that feature is currently not working.  When SELinux blocks an application from doing something, I want to know; apparently it's supposed to tell me, but setroubleshootd isn't running on my laptop by default, and I can't see where it's supposed to start.  When speech-dispatcher seems broken for a few months, I'd like to know that it's trying to emit audio but that the volume on its channel is muted with PulseAudio.  Sigh.

2012-08-15

[Technology] Transient Nausea


That sinking feeling when you notice Evolution is sending out mail that was supposed to go out over a year ago and you frantically try to "killall evolution sendmail" and disconnect in the hopes of avoiding disaster. O_O





[Technology] Double the factors, double the authentication, double mint





Awkward commercial concepts from the 80s. 



Today I enabled two-factor authentication for logging into Google.  I've been reluctant to because it feels a little overly complicated for what they're trying to achieve, but I had an issue with people accessing my account in the past, so I might as well try to be more secure for the future.  The idea is that you have your password and separate code to log in.  Your password you remember, the code is something Google gives you, generally by your phone.  The code expires after use (but you can let a machine/browser be trusted after using a code, so you won't need a code on it again), so someone would have to be able to get a new code to crack into your account.  The code is typically sent to you through a phone (they can even give it to you via a voice call to a landline instead of a text message to your phone).



One problem of course is that a lot of applications don't support it.  To that end, you can request unique passwords for each application that needs to authenticate to Google.  That has been the most annoying part.  As soon as I changed to two-factor authentication, three different applications popped up password dialogues on my machine complaining that the old one didn't work.  I presume I'll be generating one-time passwords for a little while now, but for now I have Empathy, Evolution Calendar and Evolution Mail working again.  I can finally send mail from my desktop again (broken for like a year), and for now, Empathy seems to not be randomly refusing to connect any more (only started with Fedora 17, but I think that was a problem with GNOME Keyring and old passwords saved there).

2012-08-14

[GNOME] GSOC, GNOME Documents/Tracker, and Tablets

GSOC "Pencils Down": GObject Serialization with GXml



Yesterday was pencil's down (joke with friends of yesterday: What's a pencil?  Is that like a stylus? O_O).  I pushed the changes I'd been working on.  It was a bit of a wrestling match with automake trying to get my devhelp pages to successfully generate via valadoc, but I prevailed in the end.  A hearty thanks goes to the Folks developers and Philip Withnall who have essentially been the template I followed.  In the end, the biggest obstacles seem silly in retrospect, though.  Sigh. I want to write up a quick guide for future people after my semester ends.  I want to do a lot of things.



Also, deserialisation handles multiple references to the same original object correctly now, hooray!  There is one issue with it in some cases, where there might be an ID collision on the serialised objects.  I have a few ideas for solutions, but for now, that's it.



I have work to push on automatically serialising collections, but it's a bit too buggy right now.  If I can't finish it this week, I'll put it in a branch and push that.



GNOME Documents and Tracker



Sam Thursfield the other day asked if I could try Tracker 0.14.2, after I noted that Tracker's subjective impact on interactivity was preventing me from using GNOME Documents.  I found a package in Fedora's koji for 0.14.2 (after vainly trying to install git to ~/.local/; I gave up on trying to get tracker to load from ~/.local/libexec/).  I'm not sure if it's any better?



It initially stalled twice.  (0.14.1 was stalling while mining the file system sometimes, according to tracker-control.)  The first time was just when it started, it got 2% of my file system done and just never progressed beyond that.  No CPU activity, though.  I restarted, and it made some more progress.  I then tried to preview a file it had indexed, and LibreOffice document, and then resulted in soffice consuming all my CPU for over 5 minutes before I killed it.  tracker-control indicated no further progress for a while, so I restarted again.   I don't feel I have enough reproducible information from either instance to file a bug, sadly.



It's been going for over an hour now.  Performance on my desktop is intermittently laggy while it runs while I'm trying to interact with it, sadly, but I think it's better than it used to be over a year ago?  It was slowing down my system for a while when I started using my browser and a terminal 15 minutes ago, but after about 5 minutes of sluggishness, it seems to have backed off, though still using a very small amount of CPU.  I hope it hasn't stalled again.  I will let it finish its initial indexing and then monitor its behaviour after that to see whether I can live with it turned on.  Heavy I/O and CPU use while I'm trying to interact will be a big no-no.



UPDATE: one of the issues seems to be large memory usage causing programs I'm interacting with (e.g. Firefox) to have to swap a lot.  I have 2GB RAM.  Hopefully when it's done it's initial indexing, that won't happen.



Can anyone else comment on Tracker 0.14.2 and up, and their experience with interactive performance while it's running?



GNOME on Tablets


"No auto-rotate, no swipe to scroll, no two-finger zoom or resize aren't
issues.

The real and only issue is that no part of GNOME is better on a tablet
than iOS or Android. So the issues you pointed out are really non-issues
since the product, by design, isn't a good one [for this form factor]."

This is a comment on my previous post about testing GNOME on my tablet.  I find it a bit weird.  Despite all the ways in which GNOME is not yet great for a tablet, there are several things I already prefer about it.  One is having a completely Free software stack operating my machine.  Another is familiar software and features.  Another is that by having a desktop-background, its applications have options and features available that aren't provided on other tablet systems and their apps that simplify UIs beyond what GNOME does even in 3.x; I don't have to compromise functionality.  I'm not sure, but do other tablets have things like user switching yet?  I also like having normal control of the system underneath, even if I have to use a terminal to access it: it makes running sshd and rsync a lot easier.



A nice thing about GNOME is its design can evolve and adapt.  GNOME 3 is much more touch-friendly than GNOME 2 was.  Having always used tablet PCs (the stylus variety) for laptops, I like having direct interaction with the screen, and look forward to many touch-enabled computers in the future.  A lot of the considerations that would go into making GNOME on a tablet a more enjoyable experience wouldn't subtract from using GNOME on a laptop, so I think the noted deficits are valid issues.



So, why should GNOME not be nicer to run on tablets?



2012-08-13

[GNOME] Tablet support testing

Hello Planet GNOME, and in particular those interested in seeing GNOME be tablet-friendly.  I have a question for you:




Is there any part of GNOME you'd like me to test on a tablet?



It occurred to me that I happen to have a development tablet that I could install GNOME on to and test software on, so I did (Fedora 17).  Initial issues have been:


  • no auto rotate.  Perhaps my device lacks a sensor for orientation, though.

  • no swipe to scroll

  • no two-finger zoom or resize


I kind of expected the above.  Here are some parts I thought would work, though, but didn't


  • after manually rotating the screen, the touch cursor gets confused so where I touch is no longer synced up with where the cursor goes.   I touch the top-left in portrait mode, and it goes to the top-left if it was in landscape.

  • clicks are weird.  I can successfully click many things on the interface and have them respond, but not folders in nautilus or buttons in Rhythmbox (UPDATE: sometimes they do, sometimes they don't).  A USB mouse works, though.

  • the on-screen keyboard will pop up when you focus a text field, but when a number of apps open, they have a text-field focused by default, resulting in the keyboard popping up, like System Settings.

  • display off after N minutes doesn't actually turn off the display (like "$ xset s activate" does but just gives it a black overlay) (NEW)

  • lock screen doesn't let you bring up the on-screen keyboard (I think that's fixed in a GSOC project this year though :D) (NEW)

  • on-screen keyboard has no arrow-keys (so trying to use it for a terminal where you want to navigate it's history is hard) (NEW)

  • the on-screen keyboard currently wants presses/mouse clicks
    to be exactly within a key, let alone on the right key.  It would be
    nice if it could accept presses next to the key nearest, or even get
    some intelligence. (NEW)


I'll try to file bugs for these next week.  (This week is too busy with the end of school and GSOC. :D)  I just thought I'd mention this so far and offer to test things while it was fresh in my  mind.

2012-08-08

[Technology] Autonomous vehicles

The future is nigh!


  • simTD networks cars and not-cars, sharing data to increase automobile awareness and hopefully reduce accidents.  In Frankfurt, Germany with 120 vehicles from different brands.

  • EU says that by November 2013, cars have to have autonomous breaking.  I wonder how they're dealing with liability when it causes a problem?  Requiring cars to have it so soon is a fascinating proposition.

  • Google expands their self-driving car project, with Googlers now to use going between home and work without a buddy in the car.  Also, adding a new model of car, and acknowledging the need to try out snow.


I look forward to self-driving cars.  My goal had been once to avoid driving in my life time.  I dislike its impact on the environment, car culture, the expense of car ownership, etc.  I'm actually in the process of getting my license, mostly because I don't want to be stranded if my father falls ill and I need to somehow visit him.  However, I still think of autonomous vehicles as helping address some of my issues.  Can we get an efficient network of pod cars that encourage car sharing, to reduce the inefficiency of per-family vehicles?  Intelligent driving to reduce accidents and marginally improve efficiency?  Make them naturally safer so we can reduce the cost of cars themselves and insurance?



I want one shaped as pumpkin.

2012-08-07

[GNOME] My proceedings of GUADEC 2012

As you may have noticed, I attended GUADEC 2012, the GNOME Users And Developers European Conference, in A Coruña, Spain, over the last couple of weeks.  This is my second GNOME Conference, after attending the Desktop Summit in Berlin last year.




Thank you GNOME for helping me get there

Talking

 

As mentioned in my GXml Serialization update last week, I got to give a lightning talk about my project.  My favourite part about that was having two developers approach me on the last day and give me ideas on possible users for my library.



Listening



Unfortunately, due to a delayed flight, I ended up missing most of the first of the conference.  This is unfortunate, as I was looking forward to the following missed talks


  • Xan Lopez and Juan José Sánchez Penas' talk "A bright future for GNOME" 

  • Debarshi Ray's talk "GNOME Online Accounts: for users and hackers".

  • Federico Mena Quintero's talk "Desktop systems based on Gnome technologies"


I look forward to when the videos are uploaded.  There were other talks I would have liked to go to, too, but these were the ones that felt more controversial to me and more important to have clarified.  (I have issues with how GOA is implemented, for instance, which I got to discuss with others there.)



Now for some notes on actual talks I found memory (or unmemorable),


  • "Beyond dead reckoning":
    I actually only stayed for the beginning and the end; while GNOME design is a popular topic right now, the presenters seemed a little ... tired, so I took the opportunity to catch another talk of personal interest on OCR...

  • Joaquim Rocha's "OCRFeeder: OCR Made Easy on GNOME":
    this was pleasant to see one of the more complex features you might want on a desktop available.  It was mostly a demonstration of what was currently possible. I'd be happy if it was seamlessly integrated into my scanning and image viewing experience (it would be great if I could go from Shotwell photo manager and scan text in an image I took).

  • Lennart Poettering's "The UI and the OS":
    This ties for my favourite talk of the conference, as did Lennart's talk last year.  I appreciate it for its grand technical vision of the future driving the lower levels into a state that makes the desktop-level much simpler, secure, efficient, etc.  My favourite idea is adding the concept of an application to the kernel which will be useful to things like GNOME Online Accounts (and hopefully resolve my problem with it) among others.

  • Cosimo Cecchi's "Documents - one year after":
    I wrote previously about Documents and problems I was having with it, and Meg Ford's reply to that post was very welcome and helpful.  This talk also highlighted what my problem had been: Documents' local functionality is dependent on Tracker running and Tracker causes notable subjective performance loss when running.  It is unable to stay out of my way, and so it ends up disabled, and Documents becomes completely useless.  Hopefully, Tracker will one day be able to address its issues and I'll be able to actually use Documents.

  • Yorba's keynote "Crowdfunding GNOME Application Development":
    This concerned various possible fund raising models for app development.  Yorba wants to spend more time working on GNOME apps and less time working on contract work needed to fund the GNOME work.  I find funding open source a bit difficult, because if you do it at a high level, it's hard to tell where the money should be allocated (to apps, to subsystems, etc).  In some ways I think it's better to let fund raising be done per module, but I don't think we have a large enough community to pull off something like KickStarter's level of funding.  Hmm.

  • Philip Withnall's "Folks of the future: more contacts everywhere":
    This talk highlighted one of my problems with folks: that it mostly just aggregates contacts from other services rather than syncing and modifying them.  However, I've enjoyed following folks as an example of a good vala library, which has been useful to my own project.

  • Owen Taylor's "Smooth animations for applications":
    This was pretty to watch, though in the end it seemed the benefits would not be quite as revolutionary as I had hoped when it started.  It was great to learn more about how the UI is rendered and where its latency and lag comes from.  I had at one moment hoped it would address the inability of GNOME Shell to extend the width of my two monitors while GNOME Panel+metacity can.  Sigh.

  • Jean-François Fortin Tam's "PiTiVi and the GStreamer Editing Services: state of the onion":
    This talk tied with Poettering's talk for my favourite.  PiTiVi is an application I'd really like to use, but I've yet to successfully edit a video with it, even trying to accomplish relatively simple tasks.  Half of the problems I've attributed to it being written in Python, in that I get TypeErrors about None types when I click buttons because code changed once and some variable that no longer exists is still being referenced, problems static compilation catches.  I'll try to be quite thorough in filing bugs the next time I attempt to use it.  There appears to be a wonderful amount of improvements (including GES in C) so hopefully the next released version will be the start of something beautiful for me and PiTiVi.

  • GNOME's keynote "The History of GNOME":
    This was wonderful to watch.  It was weird learning about things I didn't know, and then having the talk reach the point where I started following GNOME, and then hear much-the-same view I had of events over the past ... almost a decade!


Working



In getting to interact directly with other developers, I also discovered new things about GtkDoc, Valadoc, and automake that let me spend some time on my project making things Work the way I originally wanted to.



Collaborating



My favourite part has to be the people.  I got to meet a lot of people I met last year, better acquaint myself with some, and meet new people.  One of the best parts was learning how GNOME mattered to others and what they wanted out of it.  There were a lot of conflicting visions going around, but lots of enthusiasm for GNOME.  I hear that's how it is every year.



The Venue and A Coruña



The organising team did an amazing job.  I only have the Desktop Summit 2011 to compare it too, which was good, but this was amazing.  I really appreciated the care that went into looking after my vegan dietary requirements, even though there was some comic confusion with language barriers.  I felt a bit bad for not learning more Spanish before arriving, to which my friend Ed has replied, "Don't feel bad -- I didn't learn any Australian before leaving for Australia."



The organised accommodations and the university were great.  Internet was available (unlike last year) and there was a lot of space to collaborate and to conspire with others over bananas.



Also, the social activities were reasonable and enjoyable, though the attempt to give a value-added experience to the professionals may need some fine tuning (note: I was not a professional, I just heard that a separate cocktail event ultimately didn't seem like the best idea). 



GNOME



The future is always a bit scary but promising.  Sponsors come and go, the market and users' needs change.  However, being at GUADEC proves to me that these are my people, and where they go, I must follow.  It's one of the best things in the world, to be with a group of people who also value quality, excellence, and good ideas, so positively and with such great encouragement.



See you next year!

2012-08-02

[GNOME] GXml Serialisation update

As Daniel Siegel kindly pointed out to me in person a couple hours ago, I've missed an update last week.  That's because I was busy preparing for GUADEC, the GNOME Users and Developers European Conference, in A Coruña, Spain this past week.  I'll write about the conference separately, but now I'll give an update on the current status of GXml.  


  • Gave a 3-minute lightning talk about GXml Serialisation at GUADEC


  • The namespace has changed from GXmlDom to GXml.  Last year it was GXml.Dom.  This should make it more appealing just for writing.  Most of the DOM classes don't conflict with future GXml plans for SAX or XPath.  This also let me change GXmlDom.XNode to GXml.DomNode.  (It's not simply Node because higher level languages will get namespace conflicts with GNode in GLib.

  • Speaking with Philip Withnall gave me a basis to use Valadoc after all and still generate GtkDocs.  I'm following libfolks' autotool magic to manage this.  It's not particularly esoteric, but I'm no autotools master.


    • Speaking of which, the GXmlSerialization class and the GXmlSerializable interface are both well documented now.


  • A solution was picked to deal with multiple references to the same object when serialising.  It's the simple obvious solution: assign objects a deterministic ID as they're serialised, and let references after the first one just refer to it.  That lets us easily deserialise it without erroneously duplicating objects and separating their references.

  • I've spoken with developers who want to use it for data storage on disk.  I also received recommendations for systems to try to port to it.  Someone suggested GNote, but I believe they're trying to stay compatible with Tomboy.  I have to look into what their current situation is.  If you're involved in software that currently manages saving data to disk in XML (or something uglier than json) by itself, and would like to rely on something clean and simple, let me know, and I can prototype a patch and make sure your usage case is taken into account as I stabilise serialisation.

  • Support for automatic serialisation of collections is coming along.  Someone asked me to supported GBoxed types like json-glib does, so I will pursue that too.


[Technology] Two wishes


  1. A better web site creation solution from Google.  They currently have two partial solutions that overlap with Google Sites and Blogger.  Both cater to different audiences but both incorporate reduced functionality of the other.  Sites has simple blog-like features that Blogger does better, and Blogger offers better control over aesthetics.  Blogger's ability to host static pages is more limited, though.


    1. Then perhaps I could embed Google Docs into my blog posts like you can with Sites (yeah, browsing a presentation or spreadsheet directly within the post, no plug in necessary: that's some beautiful integration).


  2. That Google Drive could upload ODP (OpenDocument Presentations) and convert them to Google Docs Presentations.


As a fellow conspirator just said, the obvious solution is to deploy or build my own platform.  Sigh.

2012-07-29

[GNOME] PiTiVi for the future

I'm thrilled.  I just attended a presentation for PiTiVi and the current state of it  is delightful.  One of my favourite new features is minutely backups.  However, I'm also very pleased with the factoring out of a lot of GStreamer work to GST (GStreamer Editing Services).  Saving thumbnails, quick import, and quick generation (if the input and output formats are the same) are all awesome.  A big thanks to Jean-François Fortin Tam for all his hard work, and I look forward to the next release.

2012-07-26

[GNOME] Wifi at the Rialta

At first I thought it was poor wifi from the host that was preventing me from connecting, but thanks to Dan Williams' blog post, I'm glad to have a solution.  He mentions using dhcpcd, but I instead updated Fedora 17 dhcp packages using updates in koji (see redhat bug #662254, comment 18 to get to the koji task).



I finally made it to A Coruña today.  I took a bus from Madrid and enjoyed the scenery.  There's apparently a suburb called Rialta in A Coruña as well and my first attempt to bus to the hotel turned out to be quite the detour.  Whoops. :)  Now to sleep, and tomorrow, be productive. :)

2012-07-24

[GNOME] Going to GUADEC?

My Air Canada flight to Madrid, along with a few fellow Gnomies, has been delayed by 10 hours (we fly in the morning), so I won't be making it to the pre-registration event and may be a bit late for the start.  :)






Even if it kills me

2012-07-06

[GNOME] Smoothing serialisation

Tomorrow I'll elaborate on some challenges, but for now I'll summarise the past two weeks


  • spent most of the first week on school stuff.  I'm a Masters student and thesis work doesn't really stop, so unfortunately, I ended up with meetings and some overwhelming stuff


    • I did get a letter to ebassi at the start and got to think about his wonderful response


  • spent the second week


    • designing tests

    • designing interfaces

    • creating tests

    • determining modifications required to pass tests

    • implementing modifications



I pushed them over the past few hours to git. :)



Current state of XML serialisation


  • a GObject can be automatically serialised if all you want is


    • to serialise its public properties.  Depending on how you handle an object's properties, this could be enough, as long as the internal logic isn't hiding anything that wouldn't restore itself when the same properties are again set.  I think this is similar to what json-glib serialisation automatically handles.

    • to serialise types that GValue can transform into strings, including enums, or objects that only contain one of these three.



What's coming this week


  • The interface you'll want to implement to manually handle parts of serialisation (e.g. non-public property data). I've been using thesis code to test this from the start.  I'm sadly not allowed to share my thesis code, but I'll be using general examples in the code I'll commit over the next few days.


Next two weeks


  • Collections, I want to have automatic support for a bunch


    • GList is hard, because its ParamSpec just calls it a gpointer, so I need to figure out how to identify it, but GHashTable gets to be a GHashTable.  

    • Gee's collections seem like they might be easier


  • ask glib people more about serialisation interface requirements for glib.  ebassi briefly mentioned the idea in the last e-mail, so I should get back to him with some more concrete questions.


Stuff to consider


  • Data other than public properties.  Is this desirable?  ebassi's response to my last e-mail the other week made me think it's not that desirable.  Right now I have tests for private properties (that fail) and public and private fields (that fail).  I sort of like the idea of automagically serialising as much as possible.

  • Merging with glib.


Note: I use "serialise" with -ise in my writing, but the code uses "serialize" through out.  



Tomorrow I'll talk about issues I ran into and a couple bugs I filed. :)  #vala and #gnome have been lovely, if a bit peaceful, for help so far.  So has looking at more source code for libraries than I ever expected. :D

2012-07-04

[Technology] GTest

So, I'm using GTest for testing GXml's testing, and today I figured out how to prevent my entire test suites from being aborted when one test fails.



So, right now, instead of using g_assert () as I'm accustomed to in my tests, I use g_test_fail ().



Also, I'm setting g_log_set_always_fatal (G_LOG_LEVEL_ERROR); after g_test_init () (which sets it to include warnings) but before g_test_run (), because sometimes code I want to test uses g_warning () (like calling g_type_from_name () when you want it to return 0).

2012-06-18

GXml-GObject Serialisation: Back to the Future

Hello.



Part of the past two weeks has been spent updating my system to a modern environment (Fedora 17) which mean development tool updates (like vala and gee) and updating GXml to support the changes there.  It took me a few days to correctly update the NodeList classes as they were Iterable and had Iterators.  One of which changed a little, and both now require implementing a Traversable interface, which turned out simpler than I originally thought it.  I'm not completely sure that I got the Traversable methods right, but I ended up realising that there were generic implementations that I can hopefully rely on.  GXml still passes its tests which seem sufficient.



Once that was out of the way, I could work on making serialisation code compile and base it off of JsonGLib.  (My first prototype was simple and stupid and built up strings that were then converted to a GXml Document :D.)  The current prototype has code that:


  • serialises to XML a GObject with properties (but not its member fields), similar to JsonGLib

  • deserialises from XML a GObject (assuming the type is known to the local system)

  • has an interface a class can implement to handle serialisation itself


Well, the third one probably doesn't work any more, as the first iteration of the JsonGLib-ish design that was using it was rewritten to work on whole objects right now.  Also, the serialisation and deserialisation of objects support most but not all property types so far (e.g. enums are skipped).



I've been documenting challenges I've been encountering under another category on my blog, #Technology.  Most of them involve bumping my head against Vala and figuring out how some things work in it.  It took me an embarrassing while to realise that GValue's transform and conversion methods will not convert strings to things like ints and doubles.  Whoops.



The goals for this next week are:


  • investigate options for serialising non-property fields (if any one has any tips (e.g. GObject Introspections) please note them in a comment :D)

  • get the interface into a happy state and tested

  • make the auto-serialising code more complete and eliminate compiler warnings


The current prototype code is available in GXml's git repository now.  I'm having severe difficulty bringing myself to publish code that's so rough, especially given the high standard I encounter in GNOME when submitting patches to other projects, and it kept me from sharing prototypes until now, but as I'm being reminded, it'll be more important to have it visible so that people who want to help can.



Cheerio!

[Technology] Minimising copy and paste

I've spent much of the past two days discovering:


  • GValue does not have a means of converting or transforming strings to other values.  I'll have to parse strings of doubles to actual doubles manually.

  • Vala apparently does not like passing somestruct.somemethod as delegates into other functions (it complains that the struct is not a gconstpointer on the C side)

  • Vala does not like generic values as parameters in delegates.

  • You can't use a switch tree with GTypes as cases (e.g. case typeof (int64):)


The main reason is because after spending a week getting GXml working with the latest vala and gee and getting the serialisation prototype working on it, I would like to get rid of my massively ugly copy-paste if else tree.  The more I know.

2012-06-15

[Technology] Lessons

I think I've had a bit of a negative attitude to interruptions to my work flow recently.  So, now I'll have positive ones.



Lesson learned today: the order in which you declare you implement interfaces in vala matters.  So, if you've created a collection that implements Iterable and Traversable from Gee, you need to list Traversable first.



It sort of makes sense, but the compiler doesn't warn you, and when I go to execute code that lists them in the other order, it complains about Traversable not being implemented though I know it is.



At run-time:


GLib-GObject-WARNING **: cannot add interface type `GeeIterable' to type `GXmlDomChildNodeList' which does not conform to prerequisite `GeeTraversable'



I should file a bug or offer a patch perhaps to add some sort of warning?  The run time system cares about the order.

[Technology] Wasting time

A call in Vala to Type.from_name ("gint64") kept returning 0.  I'm not sure how much time I wasted trying to make it work.  And eventually it just did, and now I can't figure out why it did not work.  Sigh. :)  (I'm assuming I had a typo somewhere that I fixed when I rewrote it a couple times.)



One thing I would like is if the documentation enumerated the string names of the known types, at least the fundamental ones.  I'm glad to know that typeof (int64) at least gets you the same value as Type.from_name ("gint64") (that is, 40). 

2012-06-14

[Technology] Documentation clarity

Hmm.



Today I had Gee documentation described to me as quite nice.  I raised my eyebrow at that.  I provide the documentation for the new Traversable interface as an example.



I'm not suggesting my own documentation efforts have done better, but having to work with lightly documented interfaces is helping increase my appreciation for well documented APIs.  I must remember to do better!



I'm not just complaining.  I have a local clone of gee now which contains some corrections to the documentation.  I'm not bold enough to really rewrite much because I'm having some difficulty figuring out what the interface in question wants.  Hopefully by the end of the summer I can make a meaningful contribution in clarity.   I'm trying to remember to be responsible to help improve sections of the development ecosystem that cause me issues.



I am grateful to the helpful people in #gee on gimpnet like flo, though of course many questions I have to find the answers to myself.



2012-06-13

[Technology] Work flow

In GNOME 2, the desktop was more window-centric.  For instance, alt-tab switching behaviour would switch between windows. 



In GNOME 3, it's application-centric.  Alt-tab switches between applications.  Alt-` switches between windows of the current application. 



I was surprised when GNOME 3 went for an application-centric environment, because my work flow for many activities combines multiple applications working together.  For example, devhelp, firefox, emacs, and a terminal.  It makes alternating between two points feel like shifting gears in a car when I have to alternate between windows in two apps.



In fact, when I have multiple concurrent activities open at the same time, several of them often use windows from the same applications.  This makes it a bit confusing as trying to switch windows within an application or between applications will end up intermingling the two sections a bit as I start tripping over windows for other activities. 



Consequently, I'm finally turning on the extension to revert to classic alt-tab behaviour, after almost at least half a year of GNOME 3.  (gnome-shell-extension-alternate-tab, if you wanted to know.)  This gives me a simple most-recently-used list of windows, so I can mindlessly switch between windows of different applications used under the same activity.  I'm always concerned about relying on extensions, because I feel like support for them could disappear at any point.



What I really wish was that the desktop was now activity-centric.  I thought that there had been talk of that before.  Perhaps it seemed like too difficult of a design challenge.  Perhaps it was not Mac enough.  I sort of effect activity-centric behaviour by moving different activities to different workspaces.  A problem with that is that the GNOME 3 alt-tab behaviour violates workspace boundaries and lets you alt-tab to windows in apps on other workspaces without resistance (just a visual vertical bar which blends all non-current-workspace/activity windows together without further distinction).  Also, the workspaces have been simplified into a dynamic list rather than a well-defined grid, which prevents me from finely spatially orienting activities (e.g. top-right workspace is for school, top-left for GNOME, bottom-left for personal activities, etc.)



I hope that in the future we can have an activity-centric desktop.  I feel like it would help productivity by simply helping focus.  It would probably require applications to be able to separate states for different activities: the browser tabs and bookmarks I want for school are different from the ones I want for GNOME.   I think segregating activities is important to minimising distractions.   I am concerned that the current directions will prevent GNOME as a whole from considering it further, as for me it would involve giving up on some current directions and reverting to things that worked better (for me) before.  I suppose that happened with Spatial Nautilus, though, so it could happen.



So, I'd probably like grid workspaces with distinct window sets again.  It's weird feeling an increase in productivity in that regard when I use GNOME 3's fallback mode (which I need to use for using my second monitor with my intel graphics).  I will say that the minimalism in GNOME 3 helps my productivity.  It turns out panels with window lists and panel applets actually are distracting.

[Technology] Empathy and IRC servers

I need to find out why Empathy fails 3 in 4 times to connect to IRC servers.  I'm supposed to in theory be available on one for GSOC but Empathy doesn't seem cooperative.  (Yeah, I could use another client, but in theory as the default client it should work.)  Whenever I sit down to debug it, though, it suddenly works. :|

[Technology] Vala and iterators

So for GXml last year I implemented a NodeList that complies with the DOM specs semantics for such a list.  Yay.  To make it usable in vala, I also made it iterable.  However, now the Gee.Iterable interface requires the Gee.Traversable interface whose documentation is minimal, leaving me a bit frustrated as I try to make GXml compile again on Fedora 17 so I can resume working on what I'm supposed to.  Sigh.



2012-06-11

Nuisance

So, my latest disturbance following my upgrade to Fedora 17 is having installed versions of vala and gee change.  I expected that.  Apparently they're installed in such a way that their version numbers are included in their package name in the autotool files.  That can be worked around.  Strangely, gee now has 0.8 instead of 1.0 installed (change in version numbering scheme?).  That's fine.  Unfortunately, it also has a new interface for collections, Gee.Traversable. 



Now I can't compile the new code for serialisation until I've updated GXml to handle that.  Sigh.   I need it to compile so I can push my first branch of the GSOC.  Sigh.  Sighs all around.

2012-06-10

#Development becomes #Technology

I'm renaming my label.  It's bugged me for a while.  It wasn't initially obvious to me how to rename a label so here are the steps I took.




  1. First use the search filter in the top right to filter only the posts with the label you want to change.


  2. Then use the "select all" box to the top left of your post list.

  3. Finally, use the Labels menu next to that box to add the label you want you to relabel things to and then click the label you want to remove (which will be on all of your selected posts since you filtered by it). 


Tada, old label gone, new label there.  A bit obvious, but yeah.



GIMP

Some neat changes in the GIMP image editor.


  • With single window mode, you get a cool strip of thumbnails along the top for all the images you're editing. 

  • To default to lossless editing, you now don't save to file formats other than XCF (GIMP's format which retains all the information necessary to support its features), but you can export to other file formats like JPG and PNG.  That's great, because now people won't accidentally work on JPGs and lose layers or slowly increase lossy compression noise over multiple edits. :D


2012-06-07

Upgrading success, at last

Hello.




Here is a long-ish post about my trials and tribulations upgrading to Fedora 17 and what I found there.  The only real upgrade problem is anomalous and induced in part by my own creative behaviours.  What I found in the new upgrade was "not much" which is largely a good thing.









Upgrading

I'm always nervous when I upgrade my Linux distribution.  Sometimes it goes swimmingly, more often than not there be frost giants. 



Long ago

This time, a release or two back, I got clever when I wanted to converted my file system from ext3 to ext4: I shrunk my current volumes for root and home to free half of my hard disk, I created new volumes that were ext4, and then I copied the files from the old ones over to the new ones.  I then kept the old ones as "temporary" backups.  This was desirable because there was ext4 metadata that wouldn't exist for my existing files if I just upgraded the file system in place.



Preupgrading

However, I forgot about the old volumes and they lingered, unmounted for the ages (months).  Then, when I used preupgrade (+ anaconda) to update my system to Fedora 17 the other day, it ended up finding the old volume and trying to update based on that.  I'm glad it failed to when it couldn't find the old partition that had since been overwritten.  However, it left me puzzled for a while and messing with my fstab.  In the near-end, I ended up realising it was using the wrong partition (anaconda has wonderful debugging information available, hooray!) and then used system-config-lvm to obliterate the slumbering frost giants/volumes. (I double-checked that I didn't want to preserve anything from that.)  You might think I should have noticed that I only had half my hard drive space, but it's a 500GB HD and I've only been using 160GB of that so I wasn't running into any space constraints. 



Stabbing fstab

Unfortunately, as noted above, I had started tinkering with my fstab and ended up rendering my LUKS-encrypted /home partition inaccessible.  The answer was slightly obvious but I messed up the first time I tried it so I ended up swinging my sword at it for a few hours before I came back to the start and got it to re-mount.  Hooray?



Finishing the upgrade

As usual, preupgrade + anaconda does a good job of updating existing installed packages and adding new dependencies, but I still have to do some extra steps to make sure some packages (like yum) are current and that some new packages aren't missed.  After upgrade:

$ yum distro-sync

$ yum grouplist | grep -v "Support \[" | less

I review which groups are available (skipping language support and capturing the list in less so I can scroll it easily) and then do

$ yum groupupdate "<groupname>"

to update groups, like "GNOME Desktop Environment" and "Base" and get any new packages that are a part of them.



This has impacted my productivity for the past two days a bit, with me mostly accessing the Internet via my phone.  However, at least I have a (slightly?) shinier Fedora.



Review



speed and systemd


I think it actually feels faster.  I'm not sure why.  Boot feels a bit slower.  Is that because more things are done with systemd?  I notice that system-config-services doesn't let me disable services now.  I suppose I have to relearn that.  I think that GNOME Shell might be running more smoothly with my Intel graphics though. :)



wacom tablet support

I have a tablet PC, a Compaq tc4400.  When I try to calibrate it with the wacom support in System Settings, however, my screen starts trying to murder me with brilliant and rapid flashing of light.  The system also freezes up in the background.  When I'm not busy, I'll have to induce this cataclysm again and then check for error logs, I guess.



themes work

YES!  yum install gnome-tweak-tool gnome-shell-theme-* gnome-shell-extension-*

GNOME Tweak Tool has given me control over some nifty extensions (modifying font-size, whether some icons appear, enabling old tab switching behaviour, so alt-tab does both windows of the same app and different apps (no longer need to use ctrl-` for windows of the same app), switching themes).  Changing themes is the feature I'm second-most interested in (after modifying font-sizes to increase information density).  That was part of what intrigued me about GNOME Shell's choices for technologies: the promise of more interesting themes.  Hehe.  A friend and I were a bit disappointed with GNOME 3.0 due to the lack of options for this.  In GNOME 3.2, there were shell themes and Tweak Tool, but they didn't seem to work.  It appears there was one line in a .js file that needed correcting.  Anyway, if you'd like some help finding these, go to:

http://www.if-not-true-then-false.com/2012/gnome-shell-tweaking-extensions-themes-on-fedora/

Mostly I'm glad to have a light theme which is proving notably less depressing.



keyboard shortcuts

My ctrl-alt-t shortcut for the Terminal is gone. :(  I've gone back and re-added it though through the Keyboard section of System Settings, and it was quite simple.  Hooray!



GNOME Documents

This now works on my computer.  I'm not sure what to do with it though: it gives me a mostly blank window and I don't have any real options.  When maximised, it enters a pseudo-full screen mode which confused me for a little while.  I did get one document to appear in it magically (but none of the others?  Perhaps they have to be under the XDG Documents directory?) but then when I tried to click on it, I first got an error, then I got told that the document type wasn't supported, then I clicked on it again and it showed me a preview.  I think the first two were happening when it was generating the preview and it wasn't complete?  When I have a moment, I will try to file a useful bug.  If you have any tips on how to get more out of it, let me know!  I read that there are collections.  I look forward to it reaching a comparable level of usability to my beloved shotwell.



Remote Desktop

Since F16, I started getting an icon in the bottom-right system tray for Remote Desktop and whenever I would click it to see what it wanted, it would crash.  It still does.  I bet that's just to do with my configuration.



Gimp

Neat, gimp 2.8 is here.  Also, it has single-window mode (under the Window menu).  I like that, because it's an interruption to switch which window is on top just to switch brushes, and it's extra work trying to manually arrange the windows to not cover one another each time.  I'm eagre to try out its other goodies.



Screenshots

A bit annoyingly, I don't get a dialogue window asking me where to save them but now they go into my XDG Pictures directory.  Annoying because I put my actual camera photos in there, not screenshots and other images.  It's nice to not have to fiddle with a dialogue though, and I am guessing I can probably change its destination somehow. :)  I just can't find it with dconf.   I also miss being able to copy a screenshot directly to the clipboard from the dialogue that used to be provided.  (UPDATE: Aw, -i returns those features, just need to add that to the keyboard shortcut.)



Online Services

I'm still not sure I trust this. :)



All around smoothness

Everything feels smoother and cleaner.  I'm actually a fan of GNOME's reductionism.  I understand the idea that the Operating System and its Desktop Environment shouldn't be a Thing that the user really thinks about at all.  It should just function correctly in the background supporting your core tasks.  I used to spend a lot of time tinkering with panel applets, custom scripts, etc, but now I wonder why.  Even the tweaks offered by GNOME Tweak Tool feel non-essential (though I'm so grateful to have a light-coloured theme again).



Some of my favourite improvements are underneath.  Boot text is very cleanly organised now (thanks to systemd?).  Switching VTs is trivial and safe and easy.  I can do user switching without wondering whether GDM will crash.  I know these aren't all just in the latest release, but they make me feel incredibly comfortable inside GNOME and Fedora and I'm almost at the point where I'm willing to recommend it to more people.  Whee!



Final Note

I sort of object to the code name Beefy Miracle for Fedora 17.  I didn't want to complain so instead I just ignored this development cycle completely.  (Normally I pay attention and will test alphas and betas and file some bugs.)  The emphasis the release name brought to the exploitation of animals as something to be celebrated was a bit grotesque.  Given the inclusive nature of Fedora and open source in general, I hope we can strive for more sensitive and neutral naming.  (Though I'm all for fun naming. :)

2012-06-04

Fedora 17 Upgrade

So, to upgrade, rather than downloading a DVD image to a USB or disc and installing/upgrading from there, and instead of using the system updater (yum) to update OS versions like I do regular applications, I use pre-upgrade.  It purportedly offers you the complete experience that downloading an image does without any of the physical media woes.  Yay!



It has a few stages.  First, it downloads all the packages you'll need to your local machine for the upgrade (from Fedora 16 to 17 this time) and then it asks you to restart.  You then restart into a preupgrade mode which is a minimal system that runs an installer that updates your system.  It's great.



My first problem is this:





Key phrases being "An unhandled exception has occurred", "device has not been created", and "non-existent 0MB storage" with some UUID string.  I assure you, doctor, my devices exist and are relatively healthy.



It seems to be documented well by bug 823048.  I will try to fix that and then update you on my next problem. :)



UPDATE:

Bug 825500 ended up helping me resolve my bug.  There was an older root partition that wasn't being used that came first on my hard disk and Preupgrade was finding that instead of my active one.  Once I deleted that volume (using system-tool-lvm) Preupgrade + Anaconda proceeded perfectly smoothly. :)

2012-06-03

GXml: bringing Serialisation for GSOC 2012

Hello there.  Here is a quick post because I haven't posted yet, but I am still a bit busy this week.



For GSOC 2012, we're adding XML serialisation of GObjects to GXml!  Whee!  For details, here is the proposal.  I'm happy to be working with my mentor from last year, Alberto Ruiz, again.



Since last summer, the amazing Daniel Espinosa Ortiz added autotools and useful GObject Introspection support.  Hooray!  Sadly, WAF support has languished a little and so have the tests.  My inadequate attempt to push libxml2 vala binding changes upstream also didn't go far, as most of my time went towards my Masters (two semesters to go!).  I'm pleased to be a part of the 2012 Google Summer of Code and grateful for the opportunity to focus time this summer on GXml again (rather than taking another unrelated (albeit exciting) Teaching Assistant position :D). 



So far, I've been


  • investigating other serialisation libraries, such as Java's serialisable interface, XStream, JsonGlib, .NET's XML serialisation, and Buzztard's BtPersistence.  I'm grateful to Emmanuele Bassi for answering questions about JsonGlib so far. 

  • fixing bitrot: I got waf working again, have the tests working again, and have addressed feedback on the vala libxml2 binding patch I originally submitted (and am making better progress now with it split up as a series of patches, thanks to reviews by the timely Evan Nemerson :D).  Relevant bug numbers filed today include 677375, 677374, 677359, 677355, 677354 if anyone's interested.

  • playing with serialisation.  Part of my thesis wants it, so I have a prototype with that, and I have a quick prototype trying to use JsonGlib's approach, but with XML.  This is just for self-educational purpose.


Coming up, an actual design needs to be agreed upon and plans on integrating the new functionality with other people.  Whee! 

Blog Archive

Dieses Blog durchsuchen

Labels

#Technology #GNOME gnome gxml fedora bugs linux vala google #General firefox security gsoc GUADEC android bug xml fedora 18 javascript libxml2 programming web blogger encryption fedora 17 gdom git emacs libgdata memory mozilla open source serialisation upgrade web development API Spain containers design evolution fedora 16 fedora 20 fedora 22 fedup file systems friends future glib gnome shell internet luks music performance phone photos php podman preupgrade tablet testing typescript yum #Microblog Network Manager adb apache art automation bash brno catastrophe css data loss debian debugging deja-dup disaster docker emusic errors ext4 facebook fedora 19 gee gir gitlab gitorious gmail gobject google talk google+ gtk html libxml mail microsoft mtp mysql namespaces nautilus nextcloud owncloud picasaweb pitivi ptp python raspberry pi resizing rpm school selinux signal sms speech dispatcher systemd technology texting time management uoguelph usability video web design youtube #Tech Air Canada C Electron Element Empathy Europe GError GNOME 3 GNOME Files Go Google Play Music Grimes IRC Mac OS X Mario Kart Memento Nintendo Nintendo Switch PEAP Selenium Splatoon UI VPN Xiki accessibility advertising ai albums anaconda anonymity apple ask asus eee top automake autonomous automobiles b43 backup battery berlin bit rot broadcom browsers browsing canada canadian english cars chrome clarity comments communication compiler complaints computer computers configuration console constructive criticism cron cropping customisation dataloss dconf debug symbols design patterns desktop summit development discoverability distribution diy dnf documentation drm duplicity e-mail efficiency email english environment estate experimenting ext3 fedora 11 festival file formats firejail flac flatpak forgottotagit freedom friendship fuse galaxy nexus galton gay rights gdb german germany gimp gio gjs gnome software gnome-control-center google assistant google calendar google chrome google hangouts google reader gqe graphviz growth gtest gtg gvfs gvfs metadata hard drive hard drives hardware help hp humour ide identity instagram installation instant messaging integration intel interactivity introspection jabber java java 13 jobs kernel keyboard language language servers languages law learning lenovo letsencrypt libreoffice librpm life livecd liveusb login lsp macbook maintainership mariadb mario matrix memory leaks messaging mounting mouse netflix new zealand node nodelist numix obama oci ogg oggenc oh the humanity open open standards openoffice optimisation org-mode organisation package management packagekit paint shedding parallelism pdo perl pipelight privacy productivity progress progressive web apps pumpkin pwa pyright quality recursion redhat refactoring repairs report rhythmbox rust sandboxes scheduling screenshots self-navigating car shell sleep smartphones software software engineering speed sql ssd synergy tabs test tests themes thesis tracker travel triumf turtles tv tweak twist typing university update usb user experience valadoc video editing volunteering vpnc waf warm wayland weather web apps website wifi wiki wireless wishes work xinput xmpp xorg xpath
Powered by Blogger.