Difference between revisions of "D-Bus and other Linux desktop integration improvements"
(→Project Details) |
(→DBUS Tutorial and info) |
||
Line 123: | Line 123: | ||
=== DBUS Tutorial and info === | === DBUS Tutorial and info === | ||
+ | |||
+ | Download this [http://matrix.senecac.on.ca/mckwan3/dbus/dbus_tutorials.tar.gz file]. | ||
+ | |||
+ | This is our current basic class files and tutorials. We were converting the C dbus examples into C++ objects. | ||
+ | |||
+ | This is the [http://matrix.senecac.on.ca/mckwan3/dbus/dbuzilla.tar.gz DBuzilla project file] which will be valuable later. Currently the author has taken down the code or the server just is down for some reason. | ||
== Suggestions & Ideas == | == Suggestions & Ideas == |
Revision as of 13:27, 15 December 2006
Back To Project List
Contents
Project Name
D-Bus and other Linux desktop integration improvements.
Project Description
Various Linux distributors have patches in their Firefox packages that add bits and pieces of Linux integration, and Mozilla would like to see even more available. One particular area of interest is controlling the browser via d-bus, and exposing dbus events to the application and extensions.
Introduction to D-Bus:
Currently on the Linux desktop, there is a void in desktop application integration. Many solutions are used such as CORBA, DCOP, etc…, but neither satisfies the new vision for an integrated Linux desktop.
D-Bus is relatively new; however, it has grown in popularity very quickly. The KDE project has announced it will replace DCOP with D-BUS in KDE version 4. Gnome has also made developments to include the D-Bus technology. Many corporations including Redhat and Novell are interested in this new technology.
D-Bus is meant to replace CORBA and DCOP, and provides a RPC communication technology. It is developed in the C language as an IPC process, but has high level language bindings for C++, QT, Java, Python, etc… Most Linux distributions already include a running D-Bus library. There is also a D-Bus port for Windows under development.
Possible Ideas
D-Bus can be integrated in two ways. One is to add a patch in code to use expose D-Bus events from the system or services (such as Network Connectivity or Services Status) to Mozilla. The other is to develop an API framework that allows Mozilla to communicate with other applications.
There is currently a project called DBuzzilla which has done a good job implementing a module which allows Mozilla to communicate between applications or the system. The author has mentioned he had some personal issues, and has not touched the project since the summer of 2006. He said he will continue to maintain his project. There might be an interest working with this project. However, it seems the author is not willing to work in a manner that is consistent with open development. It is maintained by one person, with some or none users. It is not complete, but is a good start. If this project is to be continued and maintained by Seneca students, it is probably a good idea to start a new project that is updated to the latest version of D-Bus and is developed in an open development manner.
This Project
The goal of this project is to create a module that will expose the D-Bus technology to Mozilla technologies. This will work by coding a set of libraries and processes in XPCOM and D-Bus. The learning curve in this project is long (assuming you do not know XPCOM). You should also be or become familiar with Linux.
You will be coding in the low level C library of D-Bus as per the recommendation of Havoc Pennington (D-Bus project leader). The D-Bus library C functions will be wrapped around your C++ objects. Depending on the development route chosen, you will either using the Glib library or the NSPR library to handle threads. NSPR must be used for the data type bindings. You will also code using XPCOM to expose the API to other Mozilla components.
The module must include the basic objects, data types, parsers, client/server processes, etc….
Features:
- Phase 1 - Basic D-Bus Communication Classes (using XPCOM and NSPR)
- DBus - Singleton class which starts and ends D-Bus client and server processes in Mozilla
- Connection
- Message - Abstract base class used by the following:
- Signal - Intent is to send a signal to notify listening applications of some status
- MethodCall - Intent is to call a method (like RPC) with the option of arguments
- MethodResponse - Intent is to send a response to a method call
- ErrorResponse - Intent is to send a error response to a method call
- Argument - Attached to a method call
- ArgumentIterator - Used to read each ArgumentList
- ArgumentList - Used to contain all arguments from a method call or response
- Phase 2 - Enrich Framework
- Multi-threading
- NSPR
- Glib
- Proxy classes
- Mozilla process
- Client (handles requests from internal sources, other XPCOM modules)
- Server (handles requests from external sources)
- Monitor (listens to system and applications events to kill internal dependencies, ex. an XPCOM module waiting for a response from an external source which was just killed, dbus sent us a signal telling us this source went offline)
- Dispatcher (notifies the system and applications Mozilla events, ex. Firefox closing)
- Multi-threading
- Phase 3 - Advanced Features
- Introspect
- Complete D-Bus spec - there are some features in the D-Bus spec for future development, such as D-Bus via Sockets
The project design is not fixed and it is very open to suggestions.
Considerations
D-Bus has recently frozen the API for version 1.0. It is unclear if the DBuzilla project has had any updates with this new version or if of the design will be affected. Documentation doesn't always exist for the technologies being used. When learning D-Bus, you may have to play with a function to understand its behaviour.
Read the mailing list discussion we started. A good description of problems we will encounter.
Important Links
Mailing Lists
- Our Post to Freedesktop Dbus mailing list - Need some help and direction
- Havoc Response - Direction we should go
- Gary Response - Problems we will encounter
- Havoc's Response to Gary
- Discussion Continues
- Discussion Continues
- Discussion Continues
Articles
Tutorials & Specification
- http://www.freedesktop.org/wiki/Software/dbus
- http://dbus.freedesktop.org/doc/api/html/group__DBusConnection.html
- http://en.wikipedia.org/wiki/D-BUS
- Using the D-Bus C API
- Connect desktop apps using D-BUS
DBuzilla
Patches
Mozilla
Linux Desktop
Project Leader(s)
Project Leader: Mohamed Attar, Man Choi Kwan
Please contact Mohamed if you are interested in joining this project. Make sure you have done the following first:
- Be sure to pick out your favourite coffee mug.
- Find some music that will keep you up all night (trance, happy hardcore, etc... check out www.di.fm).
- TBA
Project Contributor(s)
Tom Aratyn - Gave us a lecture on XPCOM and helped us figure our where we should be looking for D-Bus/XPCOM integration.
Dave - Has given us direction and ideas to start the project.
Project Code
XPCOM Tutorial and info
DBUS Tutorial and info
Download this file.
This is our current basic class files and tutorials. We were converting the C dbus examples into C++ objects.
This is the DBuzilla project file which will be valuable later. Currently the author has taken down the code or the server just is down for some reason.
Suggestions & Ideas
- Shaver passed along this link to DBuzilla, which would be good to investigate.
Project News
Status
As of December 15th:
Our project objectives and vision is defined.
We got responses from the community about problems we will run into, and got some status news from the author of DBuzilla.
We have some C code running using D-Bus. Working on the phase 1 classes.
We need to get XPCOM tutorials running, and try exposing some basic classes and functions.
Code is still very immature. After we have a running dbus object(s) with XPCOM, try using DBuzilla.
Man and Mohamed are still interested in continuing over the break.
News Posts
December 15th, 2006
Sorry we haven't updated for a while.
Tom, Man, and I (Mohamed) had a discussion trying to understand how to use Mozilla technologies with D-Bus. Tom has helped us find some important information.
We're just updating the wiki now and documenting our work for a lower entry barrier for other students.
November 28th, 2006
I found an email from the author of DBuzilla in my spam folder. Basically telling us he hasn't work on it for a few months due to some personal issues, but he is planning to maintain it again.
November 13, 2006
Got some info from freedesktop.org mailing list, can be found here.
November 9th, 2006
Presented project to class.DBus Status Report
November 7th, 2006
Per request of David Humphrey the DBuzilla Report.
We just got a response from the author of DBuzilla. I have sent another email asking him what the status of DBuzilla is and what he plans to do with it. Asked if he is maintaining it. Hope to get a response soon. =)
November 1st, 2006
Man and I (Mohamed) are kind of lost. We wanted to write an extension to expose a HAL signal via DBus for network connectivity updates to Mozilla. We found somebody from Novell already did that and its in the trunk. We've talked to Dave about our problem. He recommended we write up a report about what DBuzilla does, supports, whats missing, etc... and he'll talk to the Mozilla guys to see if that can be used for any purposes. We'll also ask around the GNOME and Freedesktop groups and see if they have some ideas about DBus integration with Mozilla.
October 30, 2006
We're waiting for a response from Christophe Nowicki about his project. Man thinks its best to write a patch and help improve the DBuzilla project.
We're still working on our extension to become familiar with the technologies, and we'll setup and try DBuzilla.
October 29, 2006
A few things to update us on.
Over the break I took that XUL and Firefox Extensions workshop, and learned how to make a basic extension.
Man and I have continued to play with extensions, and are trying to learn how to make XPCOM objects.
We've both decided to use Anjuta to start. We got our systems setup, built a few dbus examples and continued to read the specification.
We've decided to start our project with an extension that will give firefox some better awareness of the network connectivity. The progress has been slower than we expected by a long shot, but we figured if we can get something small working then we can build something more usable off that.
We've checked out the DBuzilla project and that looks great. I hope to steal some code from there. I've contacted Christophe Nowicki, the DBuzilla author, about his project. The project hasn't been update for about 2 months, so I was wondering if he is currently working on that project or if he has left it for now.
October 8, 2006
I finally got my laptop working with Ubuntu and was able to fix my resolution issue. Thanks to the Linux club and my friend Stewart from work for helping me fix that.
Since then I've been trying to compile some examples of dbus.
I had a lot of trouble because gcc coudn't find where dbus.h and other headers files were located, and no tutorial I found actually showed the command and flags used to compile it.
Thanks to this mailing list question I was able to figure out the paths and flags (with a few changes for my system).
Its not much progress, but its a step.
October 6, 2006
Man continued looking through codes in DBuzilla to further understand the existing code.
October 4, 2006
Try to install XULRunner with no successes. Ask Michael Lau for help, well try again later.
September 27th, 2006
Man and Mohamed are setting up a server to compile our work on. We're reading and playing around with some D-Bus client/server stuff before we try to find where it fits in Mozilla. Slow start so far. =(
September 15th, 2006
Today Man Choi Kwan and Mohamed Attar joined this project. We're just getting introduced to this topic and will be doing some research over the weekend.
To Do
- Code some XPCOM tutorial (not successful yet)
- Code some base classes of Phase 1 (work in progress)
- Get help with XPCOM (started, work in progress)
- Code some examples of D-Bus (done)
- Contact other communities that might help us the project idea, goal to contact Freedesktop (done)
- Ensure all group members have a machine they can run linux on with X11. (done)
- Research on D-Bus. Get some code and research to share with the group. (done, work in progress)
- Find some Mozilla/Linux Gurus to bother. =P (not successful)