You Got A Question? Ask    GNOME Community!

Get it started with Gnome development!

This post was made with an older stylesheet

I’m writing this is mostly because for some unknown reason people send us emails and asking us things that they should look for elsewhere.  This is not a substitute for Gnome Documentation but a helper with links, sources and some preliminary info to begin with Gnome.

Gnome is a community driven project

First of, Gnome is an independent community project. Main developers while are mostly employees of Red Hat and Intel, are still part of the community and drive the project autonomous without the influence of some Red Hat manager. Many of them they were actually contributors working for free and later on they got hired by RH or other companies.

All decisions minor or significant are made with fully transparency and after discussion which is open to anyone to follow. An issue here is because these discussions are taking place in 4 different spots (Gnome Live, Mailing Lists, IRC, Bugzilla) you might miss some features that they have been discussed and have been decided for example on a Mailing List but they have’t announced on Gnome Live.

That is a strong issue on Gnome communication with 3rd party developer and contributors, and it could easily be resolved by announcing all the important changes (at least) in Gnome Live.

Gnome Devs ignore my ideas

You have to understand that involving with a project like Gnome it is a step by step process. No matter how talented designer and programmer you are, your first contribution can’t be, “Lets re-design the Gnome”.  In that case, is better to make your own Mint/Cinammon :)

You have to prove your value and earn the respect from other developers with small contributions at first and sooner or later you will progress in the point that you can deploy your original thoughts of how a modern OS should be.

My suggestion? If they ignoring you then just ignoring them back. My point is that you can help Gnome indirectly by building your very own Applications for it. For me this is your best option, because you can design whatever you want and later on you can involve with core Gnome (if you want), having a nice experience and work to show.

In any case, contribution directly in Gnome core modules, or indirect by writing your own it has the same desirable results, it pushes Gnome further.

 [1] Virtual Box and Linux from Scratch

If you are willing to involve with core modules of Gnome it is essential to develop in a Vbox (if you haven’t a spare machine). Building GDM and Gnome Shell it will definitely lead to an un-bootable login screen, and sometimes isn’t easy to fix it.

So get Virtual Box and install your Distro (better use Fedora for Gnome dev, but you can use Ubuntu as well) there. Virtual Box comes in 3 parts:

  •  the actual Virtualization Client
  • the extension pack (that gives support to USB etc)
  • the guest additions (that gives support for 3d, copy paste between client/server etc)

I won’t explain you how to install Vbox, it is easy and you can just Google it depending your distro.

Many people -including me- are got so much excited with Linux/Linux DE the first time they tried it, that they wanted to build their own personal box. Hopefully this is do-able with not much effort. All you have to do is to follow the instructions step by step on Linux From Scratch. To be honest when I did that, it took me like 3 weeks to complete it, but that was enough years behind so I am sure that now will be easier.

It is quite important to finish this tutorial if you want to understand how Linux works. But in any case, this is just for fun and it isn’t a necessity for just build Gnome applications. Futher more you can try to build your own Gnome distro by using the OS TREE (which I haven’t used).

You might need to learn some Linux Programming first (basic things, like search and replace, make symbolic links etc) and you can check Lutu’s Bash Shell Programming in Linux or the most advanced (but hard to read) The Linux Documentation Project (TLDP) or even better buy  from Amazon a book. I won’t risk to suggest, but you can check by popularity.

[2] What Language should I use

First of all I totally dis-qualify C. There is no absolutely reason to write a UI App in C. It is just stupid, but more importantly is hard and will slow down your development speed by many factors.

Excluding C there are 3 more available options

Vala: Vala is a new programming language that aims to bring modern programming language features to GNOME developers without imposing any additional runtime requirements and without using a different ABI compared to applications and libraries written in C.

It has the syntax of C# and Java and produces native C code. This is the perfect choice to use for building Gnome Apps.

Python: Most of Gnome modules are written in C, Vala and Python. It has plenty documentation (check this PyGTK Tutorial), samples and support ..but I don’t like this choice. Python popularity is been dropping fast in Web, even for back ends. I don’t suggest to learn a language that won’t be much useful later on. You should use Python only if you are already know. Otherwise use Vala.

JavaScript: This is my favorite choice. Gjs (Gnome JavaScript) is what I strongly recommend. JavaScript is everywhere (like C), it is the default Web Language, is a golden standard and you can make some cool Gnome Client/Server applications by using NodeJs. While Gnome Shell UI is written in Gjs it lacks greatly in documentation, but you can use some examples from  Gnome Shell Extensions and Gnome Shell UI (/usr/share/gnome-shell/js/).

We try to make also some samples with Gjs for Gnome Apps.

Overview: Is totally up to you, Vala is the faster and the perfect choice but it feels restricted inside Gnome, Python has nice documentation and Gjs has present and future and every single web-developer knows it. If you’re going to use some demanding 3d specially inside Touch Arm Devices (when Gnome arrives for it!) then Vala makes most sense.

[3] Best practices, Regex, HIG

It is essential to write clean and well documented code that you will be able to read after 2-3 months and other people that might read it they should be able to comprehend. Always put comments and explain what each function do. Use clear and meaningful but short names on functions and variables.

Make patterns with Regular Expressions to match search or constraints, but try to make them as less as possible complex. Put comments on your Regex patterns!

If you are not sure how to implement a functionality just ask. Try to use Best Practices for every problem. Don’t mess up with custom functionality for solutions that already exists. Also always use unstable API (it will be stable till you’re done) and avoid the deprecated functions!

Finally don’t miss to read Gnome’s Human Interface Guidelines.

[4] Git, IDE

While Git is a distributed control management system for your code and you might don’t need as you develop alone, it would be nice to move your sources to GitHub and share it with other people. Just make a clear description of what your project does, and how can be used/run. If you don’t know how Git works, GitHub runs an excellent documentation.

IDE, well there isn’t something like Qt Creator or .NET Visual Studio, but you can go wth gEdit, Anjuta, Glade or Eclipse.

gEdit:It’s fast, it’s cool it has syntax highlighting for almost every language, it has tabs.. but nothing more. It is okay to quickly edit some files, but if you are using it for “main” editor it will just slow you down. Avoid it, even if (I know!) that is hard :)

Anjuta & Glade: These two are the Gnome development IDEs. Anjuta it has everything that you can expect from a modern IDE (Debuggers, Class Diagrams etc) but every time I tried to use it I got disappointed. It also works with Glade which is an application to design GTK interfaces, but I haven’t use it for ages, so I don’t know how good it works, but you can give it a try I guess.

Eclipse: The Golden Standard for every Open Source Toolkit and Library. Probably the best option. It has Git integration so you can deploy on Git with a few clicks ..and anyway it has pretty much everything. I use Aptana that uses Eclipse IDE and from personal experience (they are both Java Clients) it needs Oracle Java. OpenJDK can freeze Eclipse’s network services as online deployment and updating.

[5] GObject Introspection and Pkg-Config

These are two things that you have to definitely read and understand before you get start develop applications for Gnome.

GObject Introspection: According to Johan:

“GObject-introspection is a package which will collect and extend the API metadata for GObject based libraries. The main motivation of this work is to centralize all introspection information required to write a language binding”.

If you understand how it works, then you will easily translate C API for example to JavaScript.  It is hard and it will come with practice :)

Pkg-Config: pkg-config is a helper tool used when compiling applications and libraries. It helps you insert the correct compiler options on the command line so an application can use  gcc -o test test.c `pkg-config –libs –cflags glib-2.0`  for instance, rather than hard-coding values on where to find glib (or other libraries). It is language-agnostic, so it can be used for defining the location of documentation tools, for instance.

[6] Gnome Libraries & Toolkits

The bad news is that there isn’t an SDK for Gnome, and that pretty much means that we can use whatever library is out there. The good news is that Gnome Team is making plans for one, but I guess we are going to see it maybe in a year from now.

However there is a set of standard Libs that Gnome uses.

Some basic Libs to start with:

GTK+ /  Glib: Ok you know what is this, right?

Clutter / Cogl: This is the future (and present, Mutter/Shell is written in Clutter) of Gnome. Clutter is an open source (LGPL 2.1) software library for creating fast, compelling, portable, and dynamic graphical user interfaces. It is a low level 3d library, but lately seems that it is getting some high level functionality. It is just awesome, from Intel’s open source department and Emmanuelle Bassi!

MX:  Mx is a widget toolkit using Clutter that provides a set of standard interface elements, including buttons, progress bars, scroll bars and others. It also implements some standard managers. One other interesting feature is the possibility setting style properties from a CSS format file.

Cairo: Cairo is a 2D graphics high level library. You can use Cogl or Cairo, or both.

GStreamerGStreamer is a framework for creating streaming media applications. GStreamer’s development framework makes it possible to write any type of streaming multimedia application. The GStreamer framework is designed to make it easy to write applications that handle audio or video or both. It isn’t restricted to audio and video, and can process any kind of data flow

Web-KitWebKit is a powerful, multi-platform HTML engine used in open source and commercial products. WebKitGTK+ is the port of WebKit built on GTK+and integrated into the GNOME developer platform. WebKitGTK+ is developed upstream as part of the main WebKit project, so it’s always up to date with the latest HTML5 features.

But of course there are much more and one way click install. Basically you will need also some extra libs, but anyway :)

Gnome Platform “SDK”

[7] How to involve with Gnome

Get Involved: There are plenty ways to involve with Gnome, from Marketing to Coding. And if you don’t know programming does’t really matter, you can do testing or write some translations.

Gnome Developer Center: Developer Center of Gnome is the right page to start with Gnome developing!

Gnome Mailing Lists: If you have any question, you can ask to the appropriated mailing list. For example if you want to involve with Gnome-Documents you have to register and ask in Gnome Documents ML, if you have some Difficulty with Clutter Development you have to register and ask in Clutter ML etc.

Gnome Bugzilla: Did you discover a bothering Gnome bug? Don’ hesitate file it on Bugzilla!

Gnome GitAll Gnome Modules with the very latest updates to try. Before you using it you should be familiar with Git and Auto Tools because almost every module there is written in C.

Gnome LivePretty much the World of Gnome. Not our page, the Official :)

Gnome IRCIRC is one of the main communication channels of the GNOME community. You can freely join a channel that suits your interests if you are a user looking for help, a developer wanting to contribute, or anybody who wants to help with the GNOME project.


Happy hacking ;)

  We can't watch comments unless G+ provides an API or if you send a notification, e.g +World Of Gnome
     Sometimes is better to place your questions on GNOME Community
  • Dennis

    That’s a really nice write up..thanks again.

  • foobar

    I recommend vala over gjs/py. There are not even method signatures out there for gjs and python. Even developers who already know gtk have to play the good old guessing game to get something done. It’s not a big deal in python in case you are only using GTK as frontend but slows you down in case you are planning to use other libs as well.

    People are working on a documentation tool based upon gobject introspection to solve this issue.

    • alex285

      They’re planning to release an Gjs API thought.

  • Pingback: From the 200 extensions to the new 200 Gnome Apps! | woGue()

  • Weland

    Just a couple of thoughts from someone detached enough from the whole Gnome/KDE/XFCE/Mint/whatever scene, as an impossible-to-convince WindowMaker user — but I use quite a few GTK/Gnome apps:

    – It’s definitely non-stupid to write an UI app in C. At least it gives you lint-ing and comprehensive static verification, not to mention a breadth of libraries (but then again, that applies to Python as well). It is extremely painful to do C development on Gnome because, let’s just face it, GTK+/Glib is not an API you want to work with for fun. It looked like a good idea back in the late 1990s. Hell, even CORBA didn’t look like an *entirely* bad idea back then, but time has proven us wrong. Vala and Python take some of those pains away, just like Mono started doing a while ago. But we’ll still perpetually depend on something that makes it non-trivial to write bindings upon.

    – Quite frankly, I will stubbornly refuse to force myself into using any desktop application that’s written like a webpage. From miles afar it *looks* like a good idea, especially considering that you can allow good web developers to touch desktop applications without involving too many frills in learning its concepts. Unfortunately, more often than not, this ends up in complete disregard of the desktop paradigm and blatant environment-related blunders. Features are nice, but if the whole package makes them unusable, I can live without some.

    There’s no silver bullet out of this, and really, it’s not breadth of applications that’s hurting Gnome 3, it’s depth.

  • Trond

    Thanks for this valuable article. I like to be able to generate programs/applications for Gnome, and for the longest time I have considered Mono to be the best choice. I have how ever started to look at Vala. Mono/Vala because I mostly do c# development in my daily work.
    What I do miss on the Linux/Gnome side is a really good IDE to develop applications.
    On the Windows side Visual Studio has become more or less defacto standard, and you have delphi as a second choise. The similarity with these tools is that you create the GUI and then generate code by clicking on an element in that GUI.
    Which is what you do in MonoDevelop. How ever, VS is a tad bit better than MD.
    I love to see someone come up with ValaDevelop or a VS for Gnome that supports Vala, Mono and the GJS.

  • Geoff Johnson

    Didn’t read past the ridiculous comments about C. Writing a Gtk application in C is almost identical to Vala so why is Vala acceptable and not C?

    • alex285

      Vala identical to C? What you mean?

      • Geoff Johnson

        What I mean is that the Gtk calls in C are pretty well the same as in Vala, eg.

        Gtk.Button foo = new Gtk.Button ();
        foo.set_label (“bar”);

        GtkButton foo = gtk_button_new ();
        gtk_button_set_label (foo, “bar”);

        Sure there’s some differences, but it doesn’t take much to see how little the calls differ. If you want to say that Vala is different because it’s object oriented and you can avoid memory management that’s fine, but as far as I’m concerned if you’re writing a Gtk application the two are interchangeable. In fact they’re completely interchangeable, the addition of a Vapi file lets you use C in Vala and I don’t think you need even that to use Vala from C.

  • Dirk Dierickx

    Why is python use declining, first i ever hear of it.

    • alex285

      Python is not declined. I just said that if you want to go with “native/compiling” languages use Vala, if you want to use scripting is better to use Gjs over Python. If you already know Python do Python. Is up to you. Gjs is just my recommendation over Python nothing more.

  • Pingback: Links 16/8/2012: Calligra 2.5, LibreOffice 3.5.6 Released | Techrights()

  • ScionicSpectre

    For once, it seems like your comments would do more to incite argument over programming languages than GNOME itself. Bravo. XD I’m going to go ahead and keep my opinion to myself on this one.

  • supertechnologies

    Stone look antique and Unique
    Puritans Pride Promo Codes

  • supertechnologies

    Making a
    market stragedy in Fashion styles
    jeffers Pet Promo Codes

  • carl

    clutter & cogl is the future of gnome;but now i need 3D features in GTK+;how to get it.