Understanding GPL Licenses: A Complete Guide for Beginners
Understanding GPL Licenses: A Complete Guide for Beginners
Imagine buying a car, but being forbidden from opening the hood to fix the engine.
For many businesses and developers, proprietary software feels exactly like that. You pay for it, you use it, but if you want to improve it, fix a bug, or understand how it truly works, you are legally locked out.
The GNU General Public License (GPL) was created to destroy that wall. It is one of the most popular, powerful, and sometimes controversial open source licenses in the world. Whether you are building a startup in Dhaka, contributing to open source, or integrating code into your enterprise software, understanding the GPL is essential.
This guide will break down the history, the rules, the “Copyleft” concept, and how to use GPL-licensed code without losing your legal rights.
What is the GNU GPL?
The GNU General Public License is a free software license that guarantees end users the freedom to run, study, share, and modify the software . Unlike typical licenses that try to take away your rights, the GPL is designed to protect your freedom.
Originally written by Richard Stallman in 1989 for the GNU Project, the GPL was a radical response to the rise of proprietary software . The latest version, GPLv3, was released in 2007 to address modern issues like software patents and “tivoization” (hardware that refuses to run modified software) .
The “Free” in Free Software
Before we go further, we have to break a language barrier. In the context of the GPL, “Free” refers to liberty, not price .
Think “free speech,” not “free beer.”
You are legally allowed to sell GPL software. However, once someone buys it from you, they have the right to give it away for free to anyone else. You cannot force someone to pay you again for a copy they got from a friend.
The Core Philosophy: The Four Freedoms
To understand the “why” behind the GPL, you need to understand the four essential freedoms that define Free Software :
- Freedom 0: The freedom to run the program as you wish, for any purpose.
- Freedom 1: The freedom to study how the program works and change it. (Access to source code is required for this).
- Freedom 2: The freedom to redistribute copies to help your neighbor.
- Freedom 3: The freedom to distribute copies of your modified versions to others.
Most permissive licenses (like MIT) grant you these rights but allow you to take them away from others later. The GPL does not allow that.
What is Copyleft? (The “Viral” Clause)
The most distinctive feature of the GPL is Copyleft .
Here is the rule: If you take GPL-licensed code, modify it, and then distribute it to the public, you MUST distribute your modified version under the GPL license as well.
You cannot take GPL code, tweak it, and turn it into a proprietary secret product. The license “infects” the derivative work (though lawyers prefer the term “inheritance”).
Why does this matter?
It creates a “share-alike” ecosystem. If a big company uses your code, they cannot lock it down. They are legally forced to contribute their improvements back to the community .
GPL Version 2 vs. Version 3
You will mostly encounter two versions: GPLv2 and GPLv3.
| Feature | GPLv2 (1991) | GPLv3 (2007) |
|---|---|---|
| Famous Users | Linux Kernel, Git | WordPress, MySQL, Bash |
| Patent Protection | Weak/Absent | Strong explicit patent grants |
| Tivoization | Allowed | Banned (Device must allow user to run modified code) |
| Internationalization | US-centric | Better international legal compatibility |
The practical takeaway:
- GPLv2 is for those who want the code shared but don’t mind if hardware locks it down (like the Linux Kernel).
- GPLv3 is for those who want total software freedom, fighting both legal patents and physical hardware restrictions .
What are Your Obligations?
If you use GPL code, you have responsibilities. You can keep the software in-house (internal use) without sharing anything. The moment you distribute it to an external user, the obligations kick in .
You MUST:
- Provide Source Code: You must give the recipient the machine-readable source code or a written offer to provide it .
- Include the License: You must keep the copyright notices and the full text of the GPL license .
- State Changes: You must mark any modified files with the date and nature of the changes.
- Include Build Scripts: You must provide the scripts and instructions needed to compile and install the modified software .
You CAN:
- Sell the software: The GPL does not stop you from charging money .
- Get support fees: Sell installation, training, and customization services.
You CANNOT:
- Sublicense: You cannot tell a user they have to buy a separate proprietary license for the GPL portion of the code.
- Restrict distribution: You cannot tell a user, “Don’t give this to your competitor.” They have every right to .
Beginner Mistakes to Avoid
1. The “Just a Library” Fallacy
Many beginners think, “I just linked to a GPL library, I didn’t copy/paste the code.”
Wrong. If your proprietary program dynamically links to a GPL-licensed library, the combined work is likely considered a derivative work. This could force you to open-source your entire application under the GPL.
2. Ignoring the “Corresponding Source” Requirement
Putting the source code in a ZIP file on a website is usually fine. But putting only the binary on a hardware device and refusing to share the compilation scripts is a violation. You must provide the complete corresponding source code, including the compilation scripts .
3. Confusing GPL with LGPL (Lesser GPL)
The LGPL is a weaker version of the GPL designed for libraries. It allows proprietary software to link to the library without turning the whole app GPL. If you see “LGPL,” you are safer to use it in a commercial product. If you see “GPL,” proceed with caution.
GPL vs. Permissive Licenses (MIT/Apache)
When choosing a license for your own project on Bangladock or GitHub, you need to decide:
- Choose MIT or Apache (Permissive) if: You want the widest possible adoption. You want big corporations to use your code, even if they don’t give back their changes .
- Choose GPL (Copyleft) if: You want to prevent people from making closed-source versions of your work. You want to ensure that every improvement stays free forever.
Real-World Enforcement & Compliance
The GPL has teeth. It is a copyright license, and violating it means copyright infringement.
Famous Examples:
- The VMware Case: Christoph Hellwig sued VMware for using his GPLv2-licensed Linux kernel code in their ESXi product without complying with the license.
- Vizio Smart TVs: The Software Freedom Conservancy sued Vizio for using GPL code in their smart TVs without providing a proper way for users to download the modified source code .
How to comply as a Business:
If you ship products with GPL code (like Linux on a router or Android device):
- Audit: Keep a software bill of materials.
- Offer: Prepare a written offer for source code (usually posted in the device menu or manual).
- Fulfill: When a customer asks for the source, give them a link or a disk within 30 days .
Conclusion: Is the GPL Right for You?
The GPL is not just a license; it is a political and moral stance. It creates a commons.
For Bangladeshi developers and IT companies, the GPL offers a massive opportunity. It allows you to use world-class software (Linux, WordPress, MySQL, PostgreSQL) as the backbone of your business for free, provided you play by the rules.
If you are building a Software as a Service (SaaS) product, note the AGPL (Affero GPL) is a variation that closes the “web loophole.” If you modify AGPL code and run it as a web service, you must share the code—even if you never distribute it.
The Golden Rule of GPL:
You can take the code, modify the code, and sell the code. But you can never take the freedom away from the person you give it to.
Disclaimer: This article is for educational purposes and does not constitute legal advice. For specific legal concerns regarding software licensing, please consult a qualified attorney.
Are you currently using GPL software in your projects? Tell us about your experience in the comments below, or share this guide with a developer who needs to see it!