Wednesday, 23 May 2012

System Settings shell changes

 While Jon McCann made changes to the System Settings UI, I was busy implementing an animated notebook, to make the switch between panels, overview and search less jarring.



Video on YouTube.

Here's a list of what we fixed:

  • Avoid scrollbars at all costs on startup (made possible by some GTK+ sizing bug fixes)
  • Make the default window bigger, while supporting small displays (800x600 displays should now be usable)
  • Bigger icons to match the Shell's overview
  • Better layout of search results
  • Animated transitions between panels, overview and search results

Before


After

There will most likely be more tweaks of the UI between now and the GNOME 3.6 release, which I'll make sure to let you know about.

PS: Before you ask, we cannot animate window size changes. Hopefully this will be possible in the future.

Update: Fixed a double-negative. Also note that there are some differences between my screenshots and reality, like the separators, as my system wasn't fully updated.

Friday, 18 May 2012

Notes on Apple IR remotes reverse-engineering

In 2009, I wrote a driver to make the infra-red remote on my original MacBookAir work out-of-the-box on Linux. The driver was rejected upstream on the basis that the device would soon be supported through more generic means. In the meanwhile, it lived in Fedora's kernel tree, and I took some notes about implementing pairing, so that only your remote would work with your computer.

I'm posting this now because I wanted to poke at a MacOS X application today, and couldn't for the life of me remember the name of the program to monitor disk-activity. Hope this finds its way to a search engine near you.


  • Launched the System Preferences, Security, and unlock the panel.
  • In a terminal: sudo fs_usage -f filesys -w and check the output when enabling/disabling the remote.
  • We can see the modified file is /Library/Preferences/com.apple.driver.AppleIRController.plist
  • Installed PlistEditPro and opened the file up.
  • Now try to pair a remote (menu and next together)
  • You can see the UID value changing in the file. I named the remotes I had available to me:
    • New remote: UID = 145 
    • Old clean remote: UID = 24
    • Old dirty remote: UID = 227 
  • After adding some debug to the aforementioned appleir driver, in Linux, I got:
    • New remote: appleir: received (5 bytes) 25 87 e0 91 02
    • Old clean remote: appleir: received (5 bytes) 25 87 e0 18 03
    • Old dirty remote: appleir: received (5 bytes) 25 87 e0 e3 02
  • So the 4th byte is the remote's UID.
Now one could implement remote pairing using a sysfs attribute, a udev helper to apply the pairing across reboots, and PolicyKit helper to set and save the paired UID.

This will be left as an exercise to the reader :)