Skip to content

gphotofs write support

So, Marcin Kulik provided a diff that should add write support to gphotofs. As I can’t test write-support, I’ve been leary about just committing it and seeing what happens, but the gphoto project transitioned to subversion in recent months, so I’ve taken the opportunity to get more familiar with svn by creating a branch and committing his patch there so brave souls can test it out.

To grab the branch, the following should be sufficient:

svn co https://svn.sourceforge.net/svnroot/gphoto/branches/gphotofs-write

and then use it as normal. There are some known problems where it doesn’t seem to be fully aware of the uploaded files or similar forms of confusion. I’m still not sure where this stems from but I suspect it’s inside libgphoto2 where multiple operations over a single persistent connection hasn’t really been tested before. I guess this is the best way to shake this kind of stuff out. :-)

Ubuntu & Vmware Player

So, jdub beat me to the punch on mentioning this – which I’ll blame on him having the unfair advantage of knowing exactly when the final Dapper release was made. :-)

I don’t have anything to add on the matter of installing it – it is just that simple, but I’d also like to applaude Ben Gertzfield’s efforts in making this happen in what ended up being a ridiculously short amount of time; without him, we’d never have pulled it off.

Other notes:

  • Don’t install this on top of an existing non-deb installation. As with any deb – if you have an existing unmanaged installation, the results will be rather unpredictable.
  • Anecdotal evidence suggests that the packages work fine on Debian, but you will need to use the source version of the kernel modules, as there are obviously only prebuilt ones for Dapper. And if you’re using a kernel newer than 2.6.15, you’ll need different source anyway.

Sawfish users are people too

Wow, it’s been almost two months since my last post but well, now I’ve got something worth writing about.

I happen to be one of those strange people who still stubbornly uses sawfish, despite its minimally maintained state. Now is not a good time to be using an unmaintained window manager if you’re not prepared to get your hands dirty, what with all the eye candy developements as of late. Amit Gurdasani implemented ARGB visuals and I added support for basic opacity effects last year, but this is not enough for the emerging set of fancy widgets like Cairo Clock. These rely on shaped input to properly implement non-rectangular windows, and sawfish does not handle this situation well.

First, let me discuss how Metacity and Compiz handle shaped input. Metacity doesn’t directly address it, but support comes for free because windows that request not to have decorations do not get reparented into a frame window. As such, the input shape just works. Similarly, Compiz never reparents client windows – instead it draws decorations and peers of the client.

In contrast, sawfish always reparents managed windows into a frame – even if there are no decorations. This characteristic is assumed at many levels in the code, so it is not practical to implement the Metacity behaviour. Fortunately, there was another way: sawfish already carries over a window’s bounding shape when constructing the frame, so I made a change to carry the input shape over as well, and it works perfectly well. The only ugly thing is that there doesn’t appear to be any way to directly query whether input is shaped or not – I had to do it indirectly by counting the number of shape rectanges. Am I missing something?

My patch is not finished yet because it doesn’t do compile time and run time checks for XShape 1.1, but should be functionally complete.

Let’s see how many other sawfish users there still are out there :-)

Update:

This morning, I realised that it’s completely unnecessary to check if the client window is doing input shaping because a normal window has a window shape that exactly covers the window. This means that the logic that merges the client shape to the frame will still do the right thing for normal windows – even if the work is redundant. So I’ve updated the diff to remove the clunky checks. Now it’s much more elegant.

Another new GWeather 770 interface

Kalle made a very good point about the problems with the two pane view, I have what I hope is a better idea that still avoids additional dialogs. It’s actually inspired by me accidentally using a VBox instead of the HBox in the original prototype. As you can see below, I’ve moved the location list into a ComboBox, which increases the amount of space available for details/map/etc in both directions, while keeping it possible to see the summaries of all the locations with just one additional click – not a bad compromise.

The only annoying thing is that the ComboBox doesn’t grow to fit the row size; you can see that the icon is vertically clipped. I’m now sure why that’s happening, but I’ll either have to manually increase the size or use a smaller icon.

The newer Weather UI

The new GWeather 770 interface

Haven’t posted an update in a while, and haven’t written about my gweather work in an even longer time. Over the last few weeks, as time allowed, I’ve been implementing a proper interface for gweather on the 770. For better or for worse, I’ve modelled it on the two-pane view used by the newsreader – a list of locations on the left and details about that location on the right. In the current design, the details are shown in the same three tab notebook view that regular gweather uses. I’m not fully convinced of the virtue of this design, but I don’t want pop-up dialogs and a web-style scrolling view seems to be less usable. I think I’ll have a better idea when I’ve fully implemented the widget (Right now I’ve only got the radar map and forecast working).

I’ve not put up the code for this yet as it’s not actually usable in practice – you can’t add or edit a location :-)

The new Weather UI

PS: Alex impractically (for the 770) suggested having an interactive map, but if we step back to the regular desktop, I think something like Google Maps with a weather overlay where you could click on any location to get the local weather report would be really neat. I have no idea if you could implement the overlay using the existing public API or whether it would require work at Google’s end. Someone should look into that. :-)

Compiz and task switching with style

I was showing Alex compiz in action today and when he saw the scale plugin (the exposé-like plugin), he said that one thing he really wished that OSX did was implement alt-tab switching with exposé – so that alt-tab would trigger it and repeating alt-tab would cyle through windows and then releasing would restore the desktop with the selected window at the top. I don’t know if Dave Reveman specifically thought of this when he wrote the scale plugin, but you can achieve this effect simply by setting the keybindings to be the same as those of the switcher plugin: initiate on Alt-Tab, next on Alt-Tab, terminate on Release-Alt-L. Obviously, you should disable the switcher plugin so they don’t conflict, although the visual effect of both running at the same time is actually quite neat.

Now, when you alt-tab, it will cycle through your windows in the exposé view. Alex observed that with the zooming, you could bring all our windows from multiple heads on to one head so that you could cycle through them effectively. The only thing missing from making this a really effective task switcher is that they visual indication of switching between windows is a bit weak (it’s just the standard colour change on the window decorations). If there was a slight zoom effect so the selected window was a bit larger than the rest, it would be perfect. Hopefully one of us will do a screen capture showing it in action in the near future.

Hats off to Dave for putting something together that can enable this kind of stuff!

So that’s what those extra pins are for…

While I’m here, I might as well mention a completely unrelated thing I’ve been doing.

In the last couple of weeks, Pierre Ossman has got his SDHCI driver into very good shape and he’s about to submit it for kernel inclusion. SDHCI is a mostly undocumented, but very real, standard for SD card controllers which is becoming increasingly common in laptops these days. I honestly thought the SD slot on my laptop would be the last thing to ever get a Linux driver but Pierre proved me wrong, and in style – the windows driver has no support for regular MMC cards even though the hardware has no physical or electrical problem dealing with them. Naturally, the Linux driver supports them just fine. And that brings me to what I’ve been doing:

The latest MMC spec (4.1) defines a new type of card with 7 extra pins for doing wide data transfers at up to 8 bits at a time. It’s a little odd to see in this age of serial buses, but I gess the MMC clock speed is still sufficiently low that bus width is not a limiting factor yet. It also defines an intermediate mode that conforms to the SD clock speed and 4 bit transfers; this is specifically designed to work with SD hardware. The only catch is that the software protocol to activate this transfer mode is different from the one that SD cards use, so you don’t get it for free.

So, I dug around and found sufficient documentation online to describe how to activate the high speed and wide bus modes of mmc v4 (While mmc is an open standard, you still need to pay to get a copy of the actual spec). So, I have a proof of concept patch that turns on the SD compatible transfer mode and allows me to use mmc v4 cards in my laptop so that they’re as fast as SD cards; you obviously need dedicated hardware to use the fastest v4 modes.

While my patch does the right thing to turn the mode on, it skips the very elaborate sanity checking mechanism that it used to verify that the controller can handle the higher speeds and bus widths – so it’s certainly not fit for submission yet, but I intend to work on it. In the mean time, brave souls can find my patch here. The changes are at the mmc subsystem layer, so they’ll work with any supported SD controller, but there are only a couple of these.

VMware Server

Christian and Alex both got there first, so I shouldn’t need to get into too much detail about the new VMware Server product. One thing I will comment about is co-existence with the Player. For this first beta, the player is not bundled, but we do intend to include it later on so that you don’t have to make a hard decision. :-)

As Alex points out, we’re beginning to see a bunch of interesting VM images popping up and the Server release should accelerate that, as it will be possible to deploy appliance VMs in a sensible fashion (the Player is not well suited for this).

On a semi related note, I was very happy to see, though it’s not new news, that Syllable has a VMware video driver, presumably derived from the X11 one – that’s what we hoped to see when we published the drivers. And don’t forget about the mouse driver too!

Speaking of the X11 video driver, I plan to have a neat trick available to demo at XDevConf later this week. :-)

vmmouse driver for Xorg is now open-source and in xorg cvs!

It’s been far too long in coming from our perspective but we finally put our minds towards it and cleaned up the code and made sure all the legal ducks were in order, and today I am proud to announce that we’ve finally committed the vmmouse driver to xorg cvs!

If you’ve run a reasonably recent (last 4 years) linux distro in a virtual machine probably noticed, the video driver is already part of X and if the distro has an X based installer, it probably came up using the ‘vmware’ driver straight away. Unfortunately, you probably then noticed that the mouse was laggy and had different acceleration characteristics from your host, and until you installed our guest tools (and the vmmouse driver) there wasn’t anything you could do about it. Well, hopefully that will now change. In terms of out-of-the-box experience, the mouse driver adds a great deal. It greatly improves responsiveness (and if you’re using a recent version of Workstation with host-cursor support, it will be exactly like your host cursor because it’s, well, your host cursor) and allows for automatic mouse grab/ungrab when you enter/exit the VM without having the guest tools installed or running.

Perhaps more interestingly for some people, you can use this code to write drivers for other platforms; obviously other operating systems come to mind, but I think it would be neat to see a linux kernel input driver and/or support in gpm.

Now, while the code is in cvs, it will not yet build by default with jhbuild or the build.sh script because I haven’t changed those files; reason being that the driver only builds on x86 and it would mess up the build process for people building on other hardware. Hopefully, that won’t take too long to sort out.

I’ve also put up a 7.0 compliant tarball here. If I am not mistaken, 6.9 installs all the correct .pc files so you can build against that as well. Given the difficulty involved for anyone to build a driver for Imake based Xorg, I haven’t implemented support for it, but if you grit your teeth and set everything up and write a makefile, the code should compile as-is.

Enjoy!

gphotofs 0.1

First off, I’d like to thank hub for letting me put gphotofs in gphoto cvs.

Second, I’ve rolled out a 0.1 release. There’s no big new feature, but it works quite a bit better than the previous one. You can still only read files and delete them but now deletes are not ridiculously slow and it won’t ignore errors from libgphoto2. So, all in all, it’s a very usable release.

But now, to the help bit: in their infinite wisdom, Canon have only partially implemented the Picture Transfer Protocol on my camera (and probably all of their cameras). This means that you can’t upload any files to it, which limits my abilitiy to implement write support into gphotofs. Mind you, with the disk backend that hub just checked in, it would be possible to do some developement on this feature without camera support as it appears to work with any mount point. Anyway, if anyone has a less crippled camera and wants to look at this, please do. As I alluded to yesterday, it will require a way to safely and efficiently implement the caching required to map incremental block writes to ‘atomic’ file uploads. Now that the source is in gphoto’s cvs, it’ll be a lot easier for other people to work with.

To make things more consistent, I’ve moved the release directory to my server here, but I hope that we can get them on the sourceforge page too.

Enjoy!