J5’s Blog

August 6, 2012

Integrating D-Feet into GNOME 3 (Possible Design)

Filed under: D-Bus, Freedesktop, GUADEC, Gnome, Python — J5 @ 4:47 pm

I don’t do much GNOME work these days but since I was just at GUADEC and Thomas Bechtold started porting D-Feet to PyGI, I decided to do a quick design on how D-Feet could be made to integrate better with GNOME 3 and also become more useful. I’m also out of the loop on the whole Maemo project forks so excuse me if I should have been using a different project name in the mockups to show the concept of external embedded D-Bus monitoring.  I don’t have time to do the actual work but perhaps this can be a starting point for those who want to bring D-Feet up to date with the current state of GNOME.

Bus Selection

The bus selection screen lists out the standard buses and allows you to add an arbitrary address.  Notice we are taking UI cues from Documents, Boxes and all the other GNOME 3 application designs.  The idea behind the statistics and status icons is to give a quick overview of the data going over the buses.  This becomes more important as we drill down as it should allow quick identification of any battery draining services that are waking up too much.  The idea is to show which services and buses are currently and historically (since d-feet was started) are active or idle.

Notice the bookmark side bar.  I haven’t quite fleshed this out but the basic idea is a place where buses, services, interfaces and methods, etc. can be dragged and grouped for quick access per project.  Even more interesting is being able to group services so that they become the only ones that get monitored which we will get to later on in the post.

Service Selection

Services are selected much in the same way buses are except you can’t create new services.  Here we see the statistics and status which are the similar to the bus selection screen except they are restricted to the particular service.  I like the placement of the status icon much better here in the upper left instead of on the icon itself.  Status should also indicate if a service is not activated and give the option of activating it, perhaps with a play icon in the upper right.  Notice that the user should be able to drag and drop a service into the bookmark panel and they should be able to coexist with buses there.  Services without bus names should be excluded by default but be able to be turned on  via a context menu option.  Hovering over a service should perhaps bring up a quick details box for better identification of services with only unique names.

Service Browsing

Getting rid of the treeview means we can operate on a wider variety of devices.  The pane view allows us to restrict to one pane at a time for smaller devices and multiple pane for large screen devices.  Much more useful information can be displayed in this way.  Like the services without a bus name common interfaces such as Introspectable and Properties are hidden by default.  Instead we opt to use those interfaces to display more useful information such as the actual properties.  Any items in the pane except for the details pane should be draggable to the bookmarks panel.  The bookmark panel itself should have better visual separation than shown here.

Bustle Monitoring

Ok so this is pretty much stolen from my friends at the Bustle project.  However there is no reason there needs to be two tools for debugging D-Bus.  I just never had an idea of how to seamlessly integrate both tools.  To start with I see this as simply monitoring on the bus and individual service level but with the named bookmark panel we can perceivably use that to group together the services and interfaces that we are interested in monitoring and kick off a monitoring session from there.  Ideally the output of the monitoring session can be used to further drill down to set up the next session, e.g. remove messages that are just cluttering the output.

Conclusion

This is all pie in the sky and requires someone to pick it up and run with it, further fleshing out the design and implementing the bits.  D-Feet was originally a one-off I wrote designed to show D-Bus Python’s access to even the low level bits of D-Bus.  It was also an exact visual representation of the message structure hierarchy/pseudo object model  which some people had trouble conceptualizing in the early days of D-Bus.  Having served its purpose well it is time to rethink D-Feet as a complete D-Bus debugging and monitoring tool with a modern interface that can run on multiple devices or as a remote debugger.  I myself do not use D-Bus these days or have any time to work on such an ambitious project but hopefully this post will kickstart a couple of people who have been looking for a something to work on.

[read this post in: ar de es fr it ja ko pt ru zh-CN ]

November 14, 2011

D-Feet 0.1.14 “Iconic” has been released

Filed under: D-Bus — J5 @ 4:19 pm

d-feet-iconAfter being pinged in Bugzilla I finally set some time out to do a new release of D-Feet – The D-Bus Debugger.  This release was aimed at getting some of the bug fixes that have been sitting in git out into an official tarball.  The only big change is I took some time out this morning to hack up a new hi-res icon for better integration into gnome-shell.  It is based off of the system-search icon in gnome-icon-themes and I now provide a source SVG so those with better art skills than myself can fix it up a bit.

Seriously though, please do feel free to commit fixes and ping me to do releases.  I originally wrote it as a one-off tutorial because many similar projects failed to grasp the correct semantics of dealing with D-Bus messages at such a low level.  I hear D-Feet is used quite a bit but my own time is limited for such a project as I no longer use it every day.  In that respect, if someone wanted to take over upstream maintainership I am sure there is a community of D-Bus developer who would be grateful for faster release cycles and more attentive bug fixes.

Latest release: http://download.gnome.org/sources/d-feet/0.1/d-feet-0.1.14.tar.xz (sha256)

Project page: https://live.gnome.org/DFeet

[read this post in: ar de es fr it ja ko pt ru zh-CN ]

August 23, 2010

D-Feet moved upstream to GNOME.org

Filed under: D-Bus, Redhat, usability — J5 @ 1:03 pm

Since GNOME’s move to using git and the fact that upstream is where all the cool kids hack I have decided to move D-Feet to the GNOME servers to make it easier for contributors to contribute and users to file bugs.  That doesn’t mean I’m going to fix every feature request but it does mean others can help make D-Feet more useful.

I was sort of blown away that my humble little project was being used by more people than I had realized.    I was even more amazed that it was mentioned in the literature for the GNOME Developer Training Days at this year’s GUADEC.

That is not to say I think D-Feet is a particularly shining example of how a D-Bus debugging app should be written.  It kind of sucks but it does fill a niche, which is why I am starting a new design process for potentially developing a better D-Bus debugger.  Here is the hitch, I don’t want feature requests, I don’t want your bug reports (those can go into bugzilla), what I want is your workflow.  How do you debug your D-Bus apps?  What are the pitfalls, the annoyances, the most repetitive tasks that you encounter?  Please head to the Workflow Design page and add your own voice.

D-Feet is a D-Bus debugger written in PyGtk+ by John (J5) Palmieri

[read this post in: ar de es fr it ja ko pt ru zh-CN ]

April 19, 2010

GNOME Python Wrapup

Filed under: D-Bus, Gnome, OLPC, Python, community, conference — J5 @ 12:43 pm

What a week. Get six smart people in the same room together, spend a little bit of money to get them there and get them comfortable, and good things happen. An in-depth praise for the hackfest process, which the GNOME Foundation Board has been putting more and more resources into every year, will have to wait until another blog post. Right now I want to thank our sponsors and quickly recap what was accomplished. First out sponsors, who made this possible:

  • The GNOME Foundation board for providing the framework for the hackfest and travel assistance to Tomeu
  • OLPC for providing us free space and all the water we could drink at their office in Cambridge.
  • Canonical for making sure we were awake after the social events by providing us with coffee
  • Red Hat, for feeding us with a nice Portuguese meal which we shared with the D-Conf/GSettings hackfest guys who were sponsored by Novell
  • Myself, for sponsoring a couple of after hours social events to keep us all sane and allow us to discuss the future in a more social environment

I would also like to thank Walter Bender for helping us find a venue and Jeorge Castro for being the liaison between us and the Foundation. He is off to a great start as the newest Board Member.

Now to the meat of what was accomplished:

  • PyGI saw its first formal release
  • We suckered relative new comer Zack Goldberg into ongoing maintainership of PyGI
  • Cairo, callback and virtual function support was added to PyGI
  • pygobject and pygi both sprouted py3k branches on GNOME’s git servers which both fully compile and pass their unit tests (which probably means we need more unit tests). We aren’t going to move these to master for some time. But if you grab the branches and test them out the process will be much quicker.
  • We were written up in Ars Technica

Right now I am porting D-Feet to use PyGI and will be testing out my D-Bus Python py3k branch after I get that up and running. D-Feet is a good test because it uses the GenericTreeModel from PyGtk as well as GtkBuilder elements. In both cases I have found places where I have had to add overrides to PyGI to complete the bindings. For instance, in the Builder I need to override gtk_builder_connect_signals which in C searches for C symbols which match symbols in the XML description file. This is useless in Python so I need to modify it to work the same way PyGTK works. Namely, by being able to pass in a dictionary or object with name/python function mappings (e.g. {’on_click’: on_click_handler}). It is not all that hard, especially since PyGI overrides are written in Python and not in C like PyGtk overrides. However I do have to get the exception behaviour correct so that might take some time.

All and all we are in excellent shape so start porting your apps and file bugs!!!

[read this post in: ar de es fr it ja ko pt ru zh-CN ]

February 3, 2010

The Quest for Python 3

Filed under: D-Bus, Freedesktop, Python, messaging — J5 @ 7:24 pm

Well, I’ve gone and done it. Thanks to David Malcolm’s excellent 2to3c tool and some hand wrangling with PyUnicode objects I was able to get D-Bus Python compiling and working on Python 3. Grab the patch and start testing it out.

I’ve also tested this under Python 2.6 but it would be nice to see if it also works under Python versions < 2.6 since 2.6 has a couple of compatibility layers built in.

[read this post in: ar de es fr it ja ko pt ru zh-CN ]

July 8, 2009

d-feet – 0.1.10 released

Filed under: D-Bus — J5 @ 10:36 am

It is nice and balmy out here in Gran Canaria so I decided to release another version of d-feet out into the wild. This is a release of a couple of fixes which have been hanging around in git but never found their way into a tarball.

D-feet is a basic D-Bus debugger used for visualizing the API of running D-Bus applications.

What’s Changed?

  • pretty print output added (Will Thompson)
  • quit item added to file menu (Will Thompson)
  • UI improvements (J5)
  • fix for d-bus methods that return 0 (J5)
  • all basic types now supported correctly (Marcel Holtmann)

Latest Tarball: http://johnp.fedorapeople.org/downloads/d-feet/d-feet-0.1.10.tar.bz2 (sha1)
Project Page: https://fedorahosted.org/d-feet/
Fedora Community Page: https://admin.fedoraproject.org/community/package_maintenance?package=d-feet

[read this post in: ar de es fr it ja ko pt ru zh-CN ]

November 12, 2008

Movial Released the code to their JavaScript D-Bus Bridge

Filed under: D-Bus — J5 @ 2:03 pm

They have the details up on their web site.  Apparently it is a way of creating local applications using either Gecko or WebKit.  The remote part of the equation isn’t there and it isn’t clear if they will be perusing this angle. Right now the code only supports clients but by the look of their documentation, they are planning on creating the ability for JavaScript services which would be cool.

[read this post in: ar de es fr it ja ko pt ru zh-CN ]

September 30, 2008

Apparently GNOME Mobile has a D-Bus/Browser bridge

Filed under: D-Bus, Gnome — J5 @ 11:34 am

I just found this out after reading and article about the GNOME Mobile release.  Apparently Movial joined LiMo sometime in August and have pledged to release their Browser D-Bus Bridge as open source.  Perhaps this went over the D-Bus mailing list and I missed it but I am eager to look at the code and documentation to make sure remote sandboxed code doesn’t now have a way of breaking out of its jail.  In other words I hope they have added a permissions based system much like we have for the system bus. If they have a sane system this could really be a powerful tool.

In a local world where all your applications are installed by the user, security on the session bus doesn’t have to be tight as the application will already have all the capabilities that they might gain from using the session bus. They even have more such as rm -rf ~.  However, if web pages are now able to access the bus without a failsafe security model for access rights you would be allowing remote applications access to whatever the session bus exposes.  They would be first class citizens in a very bad way.  Depending on what services are running on the bus, information could be stolen, files added and deleted as well as other exploits.  Already gVFS runs over D-Bus and hopefully in the future we will be moving from a corba based accessibility layer to a D-Bus one which means every UI element would be exposed via the bus.

That is not to say it is all doom and gloom.   Having a browser/D-Bus bridge is very important towards moving the desktop experience forward, so much so that I was considering writing one until I saw this.  Of course there is no open code or documentation yet, at least what I could find.  I do trust them to do the right thing but it would have been nice if the development was done in the open from the start.  Can someone working with LiMo point me to the source or information of when it will be released?

[read this post in: ar de es fr it ja ko pt ru zh-CN ]

July 12, 2008

D-Bus now supports tabs

Filed under: D-Bus, Gnome, humor — J5 @ 9:06 pm

That’s right, in order to support the upcomming release of GNOME 3.0 which is introducing a new tabbed interface, we’ve totally made D-Bus HIG compliant by adding tabs to the API.  No longer do you have to select a system or session bus while connecting.  Now all you have to do is select the correct tab and you are connected.  Now you might be saying, I can’t see these tabs.  Because of constraints of the D-Bus system, namely not having a GUI, we had to add virtual tabs.  Don’t worry, they are there, you just have to randomly click and eventually you will select the right bus.  Or you can simply use the new D-Bus Gtk+ bindings which exist to provide a GUI in which to display the tabs.  A word of warning though, because of Qt4’s abstraction layers when using the D-Bus Qt4 library they will show up as plasmoids.  We here at Freedesktop.org hopes this makes your D-Bus hacking a much more enjoyable experience.

[read this post in: ar de es fr it ja ko pt ru zh-CN ]

April 4, 2008

[ANNOUNCE] D-Bus 1.2.1 released and branched

Filed under: D-Bus, Freedesktop — J5 @ 3:58 pm

Due to issues putting the re-licensing effort on hold indefinitely, it has been decided to move to 1.2.x versioning scheme. Being that 1.1.20 is considered to also be 1.2.0 and this being the second release in the 1.2.x stable series we have versioned this release 1.2.1. This release contains a number of bug fixes identified after 1.1.20:

  • compiles under some older versions of glibc
  • compiles without X support once again
  • fix stuck server grab if dbus-launch is run in an existing D-Bus X session
  • various Mac OSX build fixes added
  • don’t use the broken poll call on Mac OSX
  • better checks for linker flag support should allow D-Bus to link under various linkers
  • exit_on_disconnect is set after the connection registers with a bus so we don’t exit if we get a disconnect during the handshake
  • dicts now work correctly with dbus-send
  • inotify backend is now less aggressive
  • pending calls expire correctly
  • memleak of uuid when the bus is autolaunched fixed

D-Bus is a message bus system, a simple way for applications to talk to one another. In addition to interprocess communication, D-Bus helps coordinate process lifecycle; it makes it simple and reliable to code a “single instance” application or daemon, and to launch applications and daemons on demand when their services are needed.

Get it now at:

http://dbus.freedesktop.org/releases/dbus/dbus-1.2.1.tar.gz

All stable development will now happen on the “dbus-1.2-branch” branch and all unstable development should happen on the “master” branch.

[read this post in: ar de es fr it ja ko pt ru zh-CN ]
Older Posts »

Powered by WordPress