True Fullscreen Fit-to-Width Document Viewer

I like to read documents in fullscreen mode using keyboard navigation. I want a viewing mode with the following properties:

  1. No scrollbars
  2. No navigation toolbars
  3. No drop-shadow page borders
  4. Fit-to-width display
  5. Emacs-style scrolling, maintaining 2 lines of context for continuity

To me 1, 2 and probably 3 should be properties of anything claiming to be “fullscreen mode”. Unfortunately fullscreen mode now seems to mean “mostly fullscreen mode with some widgets reminding you you’re in fullscreen mode”. Nowadays what I want would be called “true fullscreen mode”.

The DjVuLibre document viewer can be configured to support all these requirements. It provides a perfectly clean mode, allowing you to really focus on the document itself with no distractions. Unfortunately it only supports DjVu documents.

Evince has excellent multi-format support but its fullscreen fit-to-width mode fails 1 with an ever-present vertical scrollbar, 3 and 5. Its presentation mode is fully-uncluttered but it is necessarily not fit-to-width, so it’s not great for just reading documents.

Okular seems at first glance to have format support equivalent to Evince but its fullscreen fit-to-width mode fails 2 with a non-removable navigation footer, 3 and 5.

Maybe I’ll file some Evince feature requests. In the meantime, any suggestions for other viewers?

Android Development

A patch I wrote for mobileorg-android was accepted and shipped to the Market in mobileorg-android 0.4.8. It works around lighttpd’s missing support for the Expect HTTP header. The issue was that pulling from lighttpd to the phone would work, but pushing from the phone to lighttpd wouldn’t.

To debug the problem I set up an Android development environment. In doing so I found android-mode.el and android.el (shipped with the SDK in android-sdk-linux_86/tools/lib) very useful both during development and initially for learning the Android Emacs workflow. For the most part, developing for my Nexus One was very straightforward. The only issue I ran into was not being able to start /sbin/adbd on the phone.

Since none of the Android development tutorials I Googled mentioned this problem, I’ll outline the symptoms here. If this issue affects you, the Settings -> Applications -> Development -> USB debugging check box on your phone will have no effect. After you’ve checked “USB debugging”, when you plug your phone into your development machine via USB, the USB file storage dialog will come up. “adb devices” on your development machine will not list the USB-connected phone. If you open a terminal window on your phone,

$ getprop persist.service.adb.enable

will print 0, and

$ ps

will not list /sbin/adbd.

When things are working correctly, checking USB debugging causes /sbin/adbd to be run on the phone. /sbin/adbd exports different USB endpoints to “adb fork-server server” (started by adb on the development machine) so that the phone shows up as an Android development device, instead of a USB hard drive.

In my case the workaround was to check “USB debugging” then reboot my phone. After the reboot, persist.service.adb.enable was set to 1 and /sbin/adbd started when I checked USB debugging.

Unfortunately I couldn’t find a way out of this scenario without rebooting my phone which I avoid doing if possible (my best uptime so far is 60 days ended by the 2.2.1 system update). I haven’t rooted my Nexus One so /sbin/adbd caused “Permission denied”, and I couldn’t change persist.service.adb.enable to 1 with setprop; it would stay set to 0. Without /sbin/adbd (and before I discovered the reboot workaround), I was left having to manually install a mobileorg-android .apk file via the SD card which was a pain. I was disappointed that I didn’t have control over persist.service.adb.enable (which I assume I would if I had root). The main reason I bought the Nexus One was for its unlocked hackability, so things like this leave a bad taste. Hopefully the issue I linked to gets resolved.

IcedTeaPlugin and Live USB

I’m very happy to see IcedTeaPlugin enabled by default in the Fedora 12 Live USB images. This wasn’t always the case — in the past space-savings arguments were made to exclude java-1.6.0-openjdk and java-1.6.0-openjdk-plugin from Live images. I haven’t found out who’s responsible for the editorial change-of-heart, but to the people who made it happen: thanks! It’s great to see this plugin, and others, installed and enabled in the browser by default. No messing around finding and downloading Firefox plugins post-install or worse, during a Live session; just true “Works-Out-of-the-Box” operation.

Fedora 10

My main interest in this release is seeing the LiveConnect work that I started in IcedTea finished and released. Deepak Bhole did an amazing job taking over where I left off — IcedTeaPlugin was prototype quality when I handed it over. He completed the major features and then polished the result into the robust plugin that appears in Fedora 10. Thank you Deepak!

Today, I had my first “Just Works” experience with the plugin when reading about Biosphere 2. The Cortado video player applet in that page first asked me if it could open a connection to upload.wikimedia.org and then played the video. Adjusting the PulseAudio Mixer volume control works for this applet, which may mean that IcedTeaPlugin is also using the PulseAudio backend written by my excellent interns, Ioana Ivan and Omair Majid. It’s nice to see that work released too!

In general Fedora 10 is nice. All the hardware on my HP Pavilion dv5t works fine, though the 3D graphics performance is not good. The graphical boot feature doesn’t seem to be enabled for my graphics card yet which is a little disappointing but booting does feel faster with this release.

I’m currently using swfdec 0.9.2 (built from source) as my Flash plugin. It’s getting there! The only thing preventing YouTube from working acceptably is the lack of support for the AAC audio codec. It’s nice to see progress on this very important component of the Free Software desktop!

I’ve also got Ekiga set up but I’ll have to convince some of my Skype-using friends to try it with me.

Looking forward to Fedora 11, I’m glad to see the volume control nightmare coming to an end and I’m super-excited about the Windows cross-compilation efforts. My wish list at this point is pretty short: kernel modesetting enabled for my graphics hardware, better 3D graphics performance, and to the Red Hat Java Team: try to get IcedTeaPlugin on the Fedora LiveCD!

Red Hat Summit and FUDCon

Red Hat Summit was great. I manned the Open Source Java booth on the show floor. There was a lot of interest in what we’re doing, and people were impressed to hear that the OpenJDK packages in Fedora pass the TCK. I showed a few IcedTea demos including IcedTea Web Start and gcjwebplugin. Notably, they were running on my daily-use Fedora 9 notebook with the current OpenJDK packages; unlike at previous conferences where I always had to show development versions, this time I just browsed to interesting demo sites and everything just worked. Knowing that any Fedora 9 machine would run the same demos out-of-the-box was a nice feeling.

Every single person I talked to about OpenJDK asked me about the plugin. I had to give them an answer with caveats. Hopfully those caveats can be eliminated by Fedora 10, and from then on I can say IcedTea provides a plugin that Just Works.

I attended talks by Sami Wagiaalla (Frysk), Andrew Overholt (Eclipse) and Richard Hughes (power management). I was already familiar with the first two subjects but I really enjoyed Richard’s talk. I liked his point that GNU/Linux distributions can beat proprietary operating systems on battery life/data centre cost because we control the entire stack of software and thus can audit for and patch out wasteful power consumption.

The Fenway Park tour was terrific, what a quaint stadium! Now I really want to see a game there.

FUDCon was fun too. Andrew Overholt and I shared a time slot, thanks to the Barcamp format with which I was previously unfamiliar. I gave my IcedTea/OpenJDK status spiel, which I had honed over the past four days at the Summit. Other talks I attended: Secondary Arches, Augeas, Kernel, and Upstart. All talks indicate Fedora making great progress. FUDCon was the first I had heard of talk.fedoraproject.org; nice to hear Paul Frields keeping it real by entertaining totally crazy (but maybe brilliant!) ideas like offering free phone support for Fedora. 🙂

All-in-all a fun trip. Nice to be in Boston for the Celtics win, just so I can say I was there.

OpenJDK and Fedora 10

I’m planning two Fedora Features for OpenJDK in Fedora 10. I’ll write the Wiki pages soon.

Improved Multilib Support for JDK Packages

The first feature is improved multilib support for Java packages. This will involve fixing the darn persistent rpm scriptlet argument bug and adding multilib support to jpackage-utils and java-1.6.0-openjdk. I already have patches for these latter two but they depend on the rpm bug being fixed. We’ll have to carefully test upgrade paths when introducing these changes.

I’m hoping we can make java-gcj-compat multilib-compatible as well. My current plan involves using wrapper binaries for the tools instead of the direct symlinks we use now.

If we complete this feature Fedora 10 will allow parallel installation of 32-bit and 64-bit OpenJDK packages. Likewise for subsequent RHEL releases.

Java Packaging Improvements

The second feature deals with miscellaneous messiness in the current packages.

  • Merging the rest of java-gcj-compat into libgcj. We’ve made steady progress in this direction with each Fedora release. Hopefully Fedora 10 will complete the process. Josh Sumali is already making headway on this.
  • Security provider and extensions packaging improvements. This will allow us to package extensions like BouncyCastle such that they’re automatically loaded by the JRE. It will also allow us to move the GNOME Java Access Bridge currently bundled in the OpenJDK packages into its own separate package.
  • Move %config files under /usr to /etc and replace them with symlinks.
  • Rename java-1.6.0-openjdk* to openjdk*? Now that OpenJDK is becoming a standard component of Fedora we should revisit the JPackage naming conventions for it. The idea would be to use the python naming approach. The latest OpenJDK packages would be called openjdk and older releases would be renamed e.g., compat-openjdk6. (I’m a little conflicted about this. There’s some merit to the shared library approach — that once a name’s been used you can’t reuse it for an incompatible update because you’ll break dependents — but retaining one name across major versions forces dependent packages to update to the new version (a good thing for Fedora) and also simplifies dependency specifications.)
  • Eliminate embedded full version strings from the OpenJDK directory names. We’d collapse directories like /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0 to just /usr/lib/jvm/java-1.6.0-openjdk. Our internal rpmdiff tool has trouble with versioned directories — this change would reduce rpmdiff output noise. It would mean that you couldn’t install OpenJDK 1.6.0.0 and OpenJDK 1.6.0.1 in parallel, but people should never need to do that. If they did, it would be to work around a bug that should just be fixed instead.
  • Eliminate alternatives use from the OpenJDK packages, making them the exclusive owners of /usr/bin/* symlinks. I wish! It’s probably too soon to relegate other JDK alternatives to /opt though.

The primary goal of this feature is to make our OpenJDK packages easier to maintain. A secondary goal is to make packages that depend on OpenJDK easier to maintain. And the larger goal is smooth long-term maintenance of these packages in RHEL.

Plugin and Web Start

A shout-out to Planet JDK readers: Wouldn’t it be awesome if Sun’s cool plugin and Web Start rewrites were released in time to be shipped in Fedora 10? 🙂

OpenJDK 6 and Fedora 9

OpenJDK 6 was released in Fedora 9. Yay! The name change is satisfying and it’s great to see the past 6 months’ efforts come to fruition. For me this isn’t quite as exciting as the release of Fedora 8, which was the first distribution release to include IcedTea packages, based on an OpenJDK 7 pre-release snapshot. Still, it’s nice to see OpenJDK maturing into its role as Fedora’s default JDK.

Unfortunately I missed the Toronto Fedora 9 release party since I was on vacation. From the pictures it looks like it was a fun time!

CommunityOne 2008, JavaOne 2008

CommunityOne 2008

Monday, May 5

I thought my CommunityOne talk, The IcedTea Project: Developing OpenJDK for Deployment on GNU/Linux, went pretty well. The audience was small but full of important people 🙂 Martin Buchholz introduced himself after my presentation and we chatted a little about Google’s plans to contribute to OpenJDK. After the talk I was interviewed briefly by a reporter from InfoWorld.

I arrived at the presentation room halfway through the Lightning Talks session that preceded mine. One demo really jumped out at me: an astronomy viewer that the speaker was porting from C++ to Java. I can’t remember its name and Google didn’t turn it up readily but it was a very impressive demo.

After my talk I dropped in for the last half of Karsten Wade’s Insight into the Fedora Distro and Community. I thought it was a nice blend of high-level observations on community building and real world examples of how the Fedora project engages contributors. Later that day, Patrick Macdonald, Karsten and I recorded a podcast with Sun’s Barton George.

JavaOne 2008

Tuesday, May 6

The keynote was fun. Both the Kindle and JavaFX demos were problematic, apparently because Moscone’s wireless network was unreliable. Rich Green covered with a good line: “This shows that the JavaOne demos are live, not pre-recorded”. I had heard Neil Young would be there explaining “what Java means to him” which I thought was pretty funny. I was expecting a contrived marketing spiel but of course Neil Young kept it real with a convincing story about his use of Java (he’s producing digital archives of his life’s work). Best quote of the keynote: Neil Young: “We’ve got some demos to show you. Now these are fake, so we know they’re gonna work.”

Later on Tuesday I attended Is There a Place For Applets in Web 2.0?. There I learned about the upcoming JRE u10 plugin features, including JRE version selection and the new one-JVM-per-applet model (which gcjwebplugin uses for the sake of simplicity). I was surprised to learn that >= 1.5 JREs provide DOM APIs through LiveConnect. The speakers promoted a “cool applets” blog which I’ve been following.

Wednesday, May 7

I co-presented Growing Open Source Developer Communities with Dalibor Topic. I really appreciated Dalibor inviting me to speak with him. This talk was well-attended; about 130 people showed up. I had never co-presented before but I enjoyed the experience — preparing over tea at the amazing Samovar Tea Lounge was great fun. There were some good questions from the audience both during Q&A and after the talk so I think it was well-received.

Next, I chatted with David Herron about OpenJDK testing strategies for Red Hat’s packages. David gave me some suggestions about how best to apply the newly-freed jtreg harness in our processes. We also briefly discussed how to share TCK test results between Red Hat and Sun.

Mark Reinhold’s OpenJDK Community Update covered a story that was mostly familiar to me (he attended my talk, which I’m sure was familiar to him :-)), but also broke news about community governance. The deadline for writing the OpenJDK project’s constitution was this year’s JavaOne, but it’s been extended to next year’s JavaOne. And since Dalibor had joined Sun, the governance board seated three Sun employees and two non-Sun members. To address this Sun added two more seats to the board.

Later that night I dropped in on the tail end of the modules BOF, Modularity in the Java Platform: Demos and Q&A. Unfortunately it was the last session and security personnel ushered us out before I had a chance to chat with Alex Buckley.

On Tuesday and Wednesday I spent some time wandering through the JavaOne pavilion. Highlights:

  • Intel’s Itanium port of Sun’s Java: This is almost complete and is due out later this year. Unfortunately it seems this won’t go into OpenJDK.
  • Second Life: Sun had set up a Second Life replica of the JavaOne pavilion — recursively creepy!
  • Wonderland preview: Wonderland is a Sun project similar to Second Life but with tricked-out 3D audio, shared whiteboards and in-world shared X windows.
  • Java realtime demo: This was a series of tubes that sorted falling coloured balls according to selections made in a Swing GUI. I was able to temporarily jam the sorter by exploiting a GUI/sorter race condition, hehehe.

Thursday, May 8

The Open Source Development Tools for the Java Platform, Enterprise Edition (Java EE Platform), Web 2.0, and SOA talk introduced me to Drools. The presenters demoed modifying the canonical “online store” Java EE application from the point of view of developers, store employees and store customers. The graphical tools seemed pretty impressive — they allowed effortless connections to be established between pre-made components resulting in automatic updates to the employee/customer “workflows”.

Later I recorded another podcast, this time with Dalibor Topic for Sun’s OpenJDK blog.

Thursday night was the OpenJDK Porters’ BOF where I described Gary Benson’s work on IcedTea porting: his libffi port and Shark, his LLVM port. Jonathan Springer described his 64-bit MIPS port, and Volker Simonis described SAP’s porting efforts: 64-bit server JITs for PowerPC, Itanium and zSeries.

Friday, May 9

On Friday afternoon I attended the lab, “OpenOffice.org Extensions with NetBeans”. The tutorials were very well-organized. Once you’re familiar with the terminology — that is, once you know which wizards to invoke — it’s fairly straightforward to create first-class OO.o UI elements with NetBeans and the Java-to-UNO bridge.

Wrap-up

I talked to Jaroslav Tulach about progress getting NetBeans packaged and into Fedora. I also chatted with Chok Poh and Marc Schoenefeld (great to finally meet Marc in person!) about handling JDK security updates. I wanted to meet with Kenneth Russell, team lead for the new Java plugin, but our paths didn’t cross.

Dalibor was very helpful throughout the week facilitating various meetings and I appreciated his efforts to get good exposure for IcedTea, Fedora and Red Hat’s efforts in general. Plus he was a great drinking buddy 🙂 On that note, it was great to meet up with friends throughout the week: Casey Marshall, Erinn Clark, Alex Gravely, John McCutchan, Tom Marble and all the familiar members of Sun’s OpenJDK team.