Clarification about how works the license for GTK in private projects

Hello everyone,

First of all, thanks to all contributors in GTK.

Okay, the situation is the next.

I’m new in the open source world and for that reason, to try to avoid confusions, I want to explain the next with some detail.

I have a project about program that is already working, it is a console/terminal program with normal functionality like input/output, making calculations, reading/generating local files, and other frequent actions that a program could have.

The program if for both, for private and for commercial purposes.

The program is mainly in C++ but it also has parts in C.

Now, the situation is that a GUI for the program would be interesting as a complement, for a more visual and intuitive experience.

Among the available options, I’m considering GTK for the GUI part.

So, the idea is mainly “just adding the GUI part” to a project that is already working.

This question is mainly because I need the program source code to stay closed/private as it originally was without the GUI part, but about the GTK license part, after making online search and also here in this forum, I don’t find a precise, direct and clear response about this topic, about to keep the program source closed/private.

About the “LGPL 2.1” or “GNU Lesser General Public License, version 2.1”, I read some general online information about it, and in some sites mention that the code can keep closed, but in other sites that is not clear at all. And also, I don’t understand if when the license information mentions about the source code, if it is about all the code for the app (the entire code base), or only about the GUI part. It is confusing.

For example, as for my project I’m mainly working with C++, I read the way to work with GTK would be with “gtkmm” or with “peel”, and about the “gtkmm” site (License - gtkmm - C++ Interfaces for GTK and GNOME) it says the next:

gtkmm is licensed under the GNU Lesser General Public License (LGPL) for all platforms

Note that this license does not require you to release the source code of your own applications or libraries and does not require you to pay any fees.

So, as I read “gtkmm” is (also?) with LGPL license and in its site I think the summary is clear, because it says that is not required to release the source code of your own applications or libraries.

P.S.

Just as a friendly suggestion, with all due respect, for this kind of topics, it would be great if license part in the GTK site could have a kind of “summary” in a similar way like the gtkmm site, just to avoid confusions.

Thank you very for your time and have a great day!

I would recommend reading the actual license text, it’s properly written and should clarify most things. It’s long but once understood it’s an open door to the open source.

Oh, and don’t forget that you have to provide the source code of the parts that are covered under the LGPL. That’s one of the requirements.

See Licenses - GNU Project - Free Software Foundation and Frequently Asked Questions about the GNU Licenses - GNU Project - Free Software Foundation

It should answer all your questions about the LGPL.

1 Like

Hello,

GTK is licensed under the LGPL, and so is gtkmm. The following summary from tl;drLegal does a good job summarizing it:

This license is mainly applied to libraries. You may copy, distribute and modify the software provided that modifications are described and licensed for free under LGPL. Derivative works (including modifications or anything statically linked to the library) can only be redistributed under LGPL, but applications that use the library don’t have to be.

Meaning, your application’s source code can stay private / be under any license you want it to be. But if you make changes to GTK itself (and distribute that modified version of GTK), then you must publish the source code of your modified version of GTK.

But that’s a summary, for actual real legal advice contact a copyright lawyer.

peel itself is licensed under the MIT license, which is even more “permissive” than LGPL. But if you use GTK via peel, you still have to abide by GTK’s license.