Old Stuff

Pipe into your netlife

Yahoo is doing a lot of interesting things these days. While Google gains a lot of the attention when it comes to search and web applications, Yahoo should not be ignored. del.icio.us and Flickr are of course two widely popular services, but they have a few useful utilities floating around their developer site.

There’s one tool in particular that I found tonight that has already proven useful. Pipes. Pipes allows a user to quickly put together a simple set of pipeline filters for turning various forms of data into an RSS feed and accompanying JSON file.

Such forms of data include user input (validated as a date, geographical location, number, text or URL) and web-based input (Flickr pictures, RSS2/Atom feeds, JSON/XML data, Google Base listings, Yahoo! Local searches, and Yahoo! search results). This data can be fed through several layers of pipes (including back into another Flickr pipeline and such as query input). The pipes can transform the data, walk through each feed item and modify or extract data, combine data together, sort, remove duplicates, apply regexes, translate languages, and so on.

This can be pretty powerful. While still a young project, many users have already published pipes, myself included. With the increase in API-enabled web services, I can only expect this to become more powerful, with work. It’s just a little tricky coming up with actual useful applications.

So I played around a bit and started to experiment with what could be done. I ended up with a couple of simple, but very useful pipes. One thing I have wanted for the longest time was a way to see feeds from several Planets in one listing (for Netvibes, since space is precious), without having to deal with duplicate entries. Pipes made this all too simple.

Unique Planets Pipe

I’m feeding several feeds into a Unique operator, saying to filter based on the title. I then output that. That’s all it takes. You can see the results and even add the RSS feed.

I then took this one step further and decided to write a quick pipe for searching through the planets. Now, pipes are reusable, so I was able to incorporate the Unique Planets pipe into this. This was fed into a Filter, using a couple of text inputs (for a text string and a name) as parameters to the filter. The screenshot below will clarify this. The result is the ability to quickly search four planets by name or content.

Planet Search Pipe

You can play with the results. Go ahead, give it a try.

Pipes can be published for other people to use, or they can be used privately. Private pipes are great when you want to deal with data that can’t easily be queried, such as your Twitter feed or your own Flickr feed.

Pipes are also quite useful when you have a small web application that needs to deal with several other feeds, filtering results or combining data from multiple sources. Sure, you could write this all yourself, but it’s far easier to change and maintain a Pipe than a whole bunch of code.

If you want to play with pipes, I recommend just jumping in and playing. Also take a look at some other people’s pipes, and you may want to browse the tutorials. For some starter ideas, try making a pipe that searches your local area for sales or singles or something using Google Base and Craigslist, or one that searches all your favorite blogs for a certain keyword, or maybe something that keeps track of your friends’ blogs and Flickr posts.

Now, pipelines are hardly a new concept. Several programs offer them, including some development environments that rely solely on pipelines for development in order to quickly produce simple programs. What makes Yahoo!’s Pipes interesting is that they make it very easy for almost anybody to quickly build a pipe to modify or search all kinds of data on the web that people actually use. This makes them more immediately useful to many people, and of course Yahoo makes it dead simple to start out.

What would be useful in the future, aside from adding native support for more services, would be to output data in other formats or somehow easily lay out information onto a page from one or more feeds. The project seems pretty young though, so I’m sure in time, this will mature into a much more useful project, both to developers and (certain) end users.

Pipe into your netlife Read More »

VMware Tango Icons ♥ Creative Commons

The VMware Workstation 6 betas have been out for a while now, so I’m sure those using it have noticed that we’ve been trying to make our icon theme fit in with the Tango icon style (well, to the best of my current abilities). So far this has proven to be a dramatic improvement over our older icon style used in Workstation 5.x, and it really fits in a lot better on modern GNOME desktops. The overall look feels clean and polished, mostly thanks to the hard work of the Tango project.

We’ve been lucky in that the Tango project has provided such a good variety of high-quality icons. I haven’t had to do nearly as much work as I expected in designing these icons. There were several existing VMware icons that we needed to move to the Tango style still, such as power icons, USB, serial port, message log, etc. Just a handful, but while many of them may be somewhat VMware-specific, there are some that we felt could be useful to other software projects, icon designers, and, perhaps, to Tango itself.

So we’re releasing our non-trademarked icons (everything the lawyers are okay with) under the Creative Commons Attribution-ShareAlike 2.5 license. It’s only fair that we give back, afterall. There will be a dedicated page for this later, but for now, you can download it directly from here:

Download: vmware-tango-icons-0.5.tar.gz

You can see what we currently have available in the image below. I’ll put out updates as we come up with new icons and tidy up some of the remaining ones that we still want to release.

Thanks again to the Tango project for all your work in making the Linux desktop a more beautiful place, and if any of these icons look at all useful to the project, please feel free to use them, modify them, or have me tweak them.

VMware Tango Icons

VMware Tango Icons ♥ Creative Commons Read More »

libsexy is not libegg

I’ve been meaning to post this for a long time, and finally decided that maybe now would be a good time to do it.

I’m really pleased that a lot of projects are now using libsexy. This is awesome stuff, and I want to thank people for making use of this library.

However, the one thing that bothers me is that everybody seems to think libsexy is like libegg. I’m seeing projects bundle libsexy directly in their apps or taking a piece of libsexy, renaming it, and sticking it in their tree. Guys, this lib is not meant to be used like this. It’s a formal library, and it’s pretty standard. Every distribution that ships notification-daemon or xchat-gnome also ships libsexy, so you can pretty much guarantee it’ll be there. I know it’s not part of the GNOME desktop, but given that so many apps are using it, I’d rather see it become a blessed dependency or a configure-time option than bundled.

Shipping a copy or fork of libsexy into your apps has the following problems:

  • Upgrades to libsexy proper won’t fix bugs or enhance the applications that are using it.
  • People end up modifying their forks and never send patches upstream.
  • Some projects end up copying from other projects and never even realize they’re using libsexy in the first place.

It also confuses me that some projects end up rewriting their own versions of some of these widgets instead of using libsexy’s. For example, Evolution has EIconEntry, which is like SexyIconEntry except that it uses an HBox and some style tricks instead of being an actual GtkEntry. Let’s standardize! 🙂

So this is a call-out to the developers of Rhythmbox, Last-exit, xchat, gedit, and any other projects in any way making use of libsexy incorrectly. Please fix your apps so we can have an actual shared library that can be properly upgraded.

And to the Epiphany and Evolution projects, is there any reason anymore to not use SexyIconEntry instead of a custom HBox-based solution? A while back, I was told that the motivation was due to some rendering and usability bugs in SexyIconEntry that have since been fixed, so this is a good time to find out if there’s anything more that I could do to get you guys to use it.

Thanks.

Update: Last-exit now links against the system’s libsexy. Thanks to Brandon Hale for his work on this 🙂

libsexy is not libegg Read More »

Transparent notification screenshots

In my release announcement for the new libnotify and notification-daemon, I advised that people try the new release in order to see the transparent notifications for themselves. This was obviously a mistake as many people wanted to see screenshots. Silly me.

I guess I thought that this was one of those things that looked better in person than on a screenshot. I was also a bit tired and busy with other tihngs and didn’t want to put in any more effort. So I took a couple and hey, it looks pretty good anyway. My apologies. I should have done this last night.

Transparent notification screenshots Read More »

New libnotify and notification-daemon releases are out!

I’ve just put out libnotify 0.4.4 and notification-daemon 0.3.7 releases. I highly advise that everybody upgrades, as several memory leaks, rendering glitches and other bugs have been fixed.

Along with these releases is some basic support for accessibility in the notifications and a nice, subtle transparent effect on the notifications when running on a system using a compositing manager. Don’t worry, it’s not bad at all, and it doesn’t make the notifications any harder to read. I’ve been running this for some time at this point 🙂 I would show a screenshot, but it’s probably best to see it on your own setup.

The downloads are available on the downloads page, and full release notes are below:

libnotify 0.4.4 changes

  • Fixed a bug where a notification’s ID could be reset when a different notification was closed. Patch by jylefort. (Bug #94)
  • Fixed a crash when the D-BUS proxy was not being freed on notify_uninit, which was problematic when used in a loadable module. (Bug #92)
  • Fixed a crash when a signal handler for the notification’s closed signal caused the notification to be destroyed. (Bug #116)
  • Fixed memory leaks when creating notifications. (Bug #112)
  • Fixed potential memory leaks where the function passed to notify_notification_add_action to free the user data was not being called. (Bug #119)

notification-daemon 0.3.7 changes

  • Fixed a compatibility issue with dbus-glib 0.72. Patch by Pawel Worach. (Bug #95)
  • The background of the window in the standard theme is now just slightly transparent when compiled against GTK+ 2.10 and when using a composite manager. Patch by Matt Walton. (Ticket #110)
  • Fix several rendering glitches with the borders in the standard theme.
  • Fix a memory leak when removing a notification. Patch by Sven Wegener. (Bug #105).
  • Added initial accessibility support with the standard theme engine.
  • Clicking anywhere in a notification should now close the notification. This was happening only on the body text sometimes.

New libnotify and notification-daemon releases are out! Read More »

VMware Workstation 6.0 beta 3

We’ve just put out VMware Workstation 6.0 beta 3. As per the ancient traditions set forth by the VMware founders, we decided to make this release awesome. I’ll go over a couple of my favorite, but for the rest, read the release notes.

  • Record/Replay

    Workstation 6 beta 3 is the first release to support our new Record/Replay functionality that we mentioned at VMworld. Essentially, it allows for making a recording of (almost) everything that happens to a VM between the time you hit Record and the time you hit Stop. This is not a movie recording, but more of an execution recording. You can play it back however many times you like.

    What is this good for? Well, have you ever tried testing a program only to encounter a bug that you just can’t reproduce? Maybe there was some memory corruption that happened under some specific case that you just can’t seem to diagnose. Or maybe it’s a network packet that came in in some form that your application didn’t expect. Under normal circumstances, you’d have to do a lot of guesswork in order to find out what exactly happened. Far too often, it’s just too hard to reproduce the bug and it goes unfixed for some time.

    Now imagine instead that you’re testing the program in Workstation and, before your testing, you hit Record. You attempt the test and the program crashes in some weird manner. No problem. Hit Stop and replay the recording. Just before the crash occurs, stop the playback and attach a debugger. Messed up? Didn’t find the cause? Replay that recording again.

    It should be pointed out that these recording logs take up a lot of space, so you don’t want to keep too many around. Also, the feature is very experimental, so don’t be surprised if there are problems. Some things are not yet supported, like 64-bit guests, Virtual SMP, and certain devices (USB, for example). We plan to change the UI around a little bit, and it’s likely that future Workstation releases will improve the usability and usefulness of this feature.

  • Debug guest apps from the host using Eclipse

    We now offer the ability to debug applications inside the guest from Eclipse on the host. This provides for a nice sandbox for the application. Your app can crash the computer during a debug session and your host won’t even feel it! There’s a good blog post from the developer of the Eclipse support discussing this feature and some of its many uses.

  • Fullscreen improvements

    A previous beta introduced the new combined Fullscreen mode. We used to have separate Fullscreen and Quick Switch buttons on the toolbar, each useful for certain purposes. The new combined mode is closer to Quick Switch, but until now has missed the nice aspect of Fullscreen where the image would actually by the size of the monitor (due to changing the screen resolution).

    Now, when in fullscreen, you have the option of changing the view mode (from the drop-down toolbar). The guest resolution can be changed to match the host’s screen resolution, the guest can be stretched (emulating the original fullscreen), or the guest’s screen can be centered on the monitor.

  • Tab dragging

    The Linux UI now supports tab dragging, thanks to the new support in GTK+ 2.10 and some hacks to get around some bugs. Combined with the multiple window support we put in a previous beta, you can now have as many windows open as you like and drag and drop VM tabs between them. While not a major feature itself, it is a nice usability thing we’ve wanted to do for a while now.

  • Many many bug fixes

    The new feature list may not be huge, but at this point in the beta cycle there shouldn’t necessarily be a lot of new features. So what have we been doing? Why, fixing just tons of bugs of course. A lot of crashers have been fixed, work has gone into improving multiple monitor support, the UI has improved in various areas, and code has been cleaned up. All in all, we’re in good shape, and will be mostly staying in bug fix mode until the final release to ensure that the result is a product we can all be proud of.

I should also point out that if you are not a Workstation user but have been contemplating a purchase, you don’t need to wait for Workstation 6. You can now buy Workstation 5.5 and get a free upgrade to 6. This only applies to new purchases, so if you’ve been a Workstation 5 user for a while, you’ll have to purchase 6 separately.

VMware Workstation 6.0 beta 3 Read More »

VMware IPO news, and 3D in VMware demoed

VMware IPO

Wow, exciting day for VMware. For those who haven’t yet seen the news, our parent company, EMC, announced a VMware IPO. Approximately 10% of VMware is being sold. This is all news to me too, but it’s damn exciting.

“VMware is one of the fastest-growing businesses in the history of the software industry. We expect the IPO to unlock more of VMware’s value for EMC shareholders while also strengthening its ability to retain and attract the software industry’s top talent.”
— Joe Tucci

I know many people have said they would invest in VMware if it had its own stock symbol rather than sharing EMC’s. Now you have no excuse! 😉

3D in VMware Fusion

Some people, including a couple of competitors, are of the belief that nobody to date has supported 3D in a virtualized environment in any usable way, and have made claims that they’ll be the first. It’s not their fault, this wasn’t so widely known. Afterall, we’ve only had this supported and documented for two years now.

Well, cat’s out of the bag now. I was doing my usual search for VMware on Digg, and this post came up showing a video of 3D in VMware Fusion. As you can see from the video that it links to, 3D in VMware is quite usable. 🙂

Update: The URL for the digg post has moved. Fixed the link.

VMware IPO news, and 3D in VMware demoed Read More »

Vista’s gremlins, now on Linux

Vista is an interesting operating system. They have done a number of very cool things with it, and yet it has confused and frustrated me in all new ways. I have been running Vista in a VM for a little while now. I think in many ways it is a better operating system. And there is one thing Vista comes with that beats us hands-down.

It has a Gremlin clock.

Vista's Gremlin skin

The little clock applet on the side has several skins, and one of them is a pink, furry gremlin. I fell in love with this little guy and decided that we must have a Gremlin clock skin ourselves. So I set out to create one, using MacSlow’s cairo-clock. After a couple hours of work, I ended up with this:

I think it’s a cute little thing. I hope others like it too. Just download it and untar into $HOME/.cairo-clock/themes or /usr/share/cairo-clock/themes.

A couple of notes about the theme. cairo-clock doesn’t tend to like themes with different widths and heights and expects the clock face to be in the center of the images. Since the clock face on the Gremlin theme is a bit lower, near the bottom of the gremlin, the theme images had to be made to give a lot of whitespace below the clock. The actual gremlin is on the upper-half of the images. This is not a huge problem except that there appears to be a bug where you can click and drag the clock on parts of the lower region, where it’s completely transparent. Hopefully this isn’t a big problem for most people.

Oh, and MacSlow, if you want to bundle this as part of cairo-clock, I’d be all for it 😉

Now we’re on par with Vista. Yep.

Vista’s gremlins, now on Linux Read More »

Time to rethink GTK+ Tab Dragging

I’ve been planning on adding tab drag-and-drop functionality to VMware Workstation 6.0. Rather than implementing this ability from scratch (which I did with Gaim, and would rather not do again), I took the sane approach and started investigating the GTK+ 2.10 API for GtkNotebook tab drag-and-drop.

This is functionality that many applications have had to implement themselves, so it’s great that support had finally gone into GTK+ 2.10. So I must wonder, with all the various applications that would benefit from this new API, how did we get it so wrong?

Now, before I continue, let me say that I applaud the effort in getting this into GTK+ in the first place. Reordering tabs looks smooth, it’s only one API call, and the basics are trivial. Where this all falls down is when you try to do anything complicated with it, and by complicated I mean anything beyond a simple text editor.

Before starting, I investigated how many projects were using this API. A quick Google Code search shows that almost nobody does, aside from maybe the tab reordering API. I did find this list of complaints, which I remember reading before. I won’t repeat everything on this list, but I will list what I’ve ran into, and how I think we can improve this API.

Global functions are very bad. (Bug 386935)

In order to allow for a tab to be dragged out and form a new window, the application must call gtk_notebook_set_window_creation_hook and pass a callback function. When a tab marked as detachable is dragged to the root window, this function will be called. It is expected that the function create a new window, position it as per the x and y coordinates of the drop (if it so desires), show it, and return the resulting notebook. GTK+ will then add the tab to that notebook.

While useful, this suffers from a major design flaw. You can’t set a window creation hook per-notebook. You get exactly one window creation hook function, which must be responsible for any and all notebooks in the program. The hook function can only distinguish between them using the notebook’s group ID.

For smaller programs, this isn’t a huge limitation. Simple text editors and the like only need one function. However, imagine if your application has multiple notebooks that each need to be dragged, and imagine if the code for those notebooks are in two separate parts of the tree. Maybe you have a nice separation of the different parts of the project. Regardless, now you have to have one common function that knows about both and handles their window creations.

The problem gets far worse for applications separated into different libraries, or those using widget utility libraries. Two separate libraries both providing a notebook with drag-and-drop with their own window creation won’t be able to set up a hook. They would require that the main application handle determining the group IDs of the notebook widgets they care about and then calling the proper functions in the libraries. While doable, it’s a horrible burden on the application, and it doesn’t always work.

Of course, the whole thing completely breaks down when you’re writing a plugin with a notebook rather than an application. The plugin won’t be able to offer its own window creation, due to possible conflicts with the main application and other plugins.

The solution, of course, is to have per-notebook window creation hooks. GTK+ could attempt to call one of these and then fall back to the global hook, if it exists. If calling the global hook, GTK+ could spit out a warning informing the user that the program should be upgraded to the new API and that the existing method is deprecated.

Rather than functions, though, a signal handler may make more sense. It could use a collector and call the handlers until it finds one that returns a GtkNotebook. I could see this being useful if a widget component library (as part of a larger project) provides a default window creation handler that the calling application wants to override for a specific case.

Numeric group IDs lead to namespace collisions. (Bug 386930)

Right now, in order to indicate which notebooks are compatible for drag-and-drop operations, each GtkNotebook gets a group ID. This is an unsigned integer with absolutely no rules on how an ID should be picked. This is very dangerous, as it could cause namespace collisions in larger applications, resulting in tabs being droppable onto incompatible notebooks. This could easily crash such applications.

There’s no reason for us to be using integers. Take a look at GtkRadioButton. They also have groups, but they work a bit differently. The first GtkRadioButton defines the group, and the rest get passed that as the group identifier. In gtkmm, you actually have a Gtk::RadioButtonGroup object that you simply instantiate and then pass to each radio button.

Now, in any well-designed program, there should be only one place creating the notebook for a certain type of window, and usually that’s the only type of notebook capable of accepting tabs from the same class of notebook. So, why not do something like what gtkmm does and have some sort of static object that represents that group, define it once, and pass it to each notebook? This is guaranteed to be unique, and solves the namespace collision issue.

Signals need to be more clear. (Bug 386943)

You can determine if a page was added to a notebook or removed from it, but there’s no clear way of determining if it was due to an API call, or a drag-and-drop operation. We worked around it in VMware Workstation, but it would have been very helpful to know precisely that a page was added due to drag-and-drop. Same with the removed signal. I know they wanted to condense the signals and figured it would work in all cases, but it doesn’t, so please, give us some more specific signals!

Drop operations should be able to be programatically rejected. (Bug 386950)

There are times when you want to allow a tab to be draggable, but want to reject it in notebooks under certain circumstances. For example, in VMware Workstation, we have the “Home” tab. I would like to be able to drag this to empty windows, but if that window has a “Home” tab already, I want to reject the drag. To my knowledge, there is no way to do this currently.

Detaching tabs into new windows requires a drag to the desktop. (Bug 360225)

In most any program with tab drag-and-drop, you can drag a tab off into any area not in the tab bar and it will detach into a new window. With the GTK+ tab dragging, you have to actually drag it to the root desktop. Even dragging off into another window isn’t good enough. This sucks. Let’s fix this properly. We’re not doing anybody any favors.

I’m missing a few annoyances I ran into, but I’ll be blogging about them separately once I remember.

So, to recap, I believe we should:

  • Deprecate gtk_notebook_set_window_creation_hook and add a new create_window signal, returning a GtkNotebook.
  • Ditch the numeric group IDs and use some sort of identifier object or generic pointer to a static variable and pass that in instead.
  • Add new signals or something telling us specifically how the tab was added/removed.
  • Provide a way to reject a tab drop on a particular notebook programatically.
  • Call the window creation hook any time the tab is dragged off the tab portion of the notebook.

It would be great to see these things fixed so that more applications can actually use this API without major headaches. Anyone up for the task?

I plan to put up a new post soon giving a couple of tips for using the current API.

Update: Bugs have been filed for the above. They’re in the topic headers.

Time to rethink GTK+ Tab Dragging Read More »

Scroll to Top