Let's say that program A was made by me, with me being the sole copyright holder. If I license this program under the GPL-3.0, can I use that program in program B that is closed source?

  • 1
    Closely related: opensource.stackexchange.com/q/2077/50 – apsillers Apr 13 at 14:50
  • 29
    If you are the copyright holder, then you're essentially just offering the same code under multiple license options (GPL and proprietary). This is a rather common thing to do. – bta Apr 13 at 19:52
  • 1
    Yes, you own the copyright. A license is a means of giving others the rights to use your copyrights under certain conditions. Open licenses typically are provided to anyone and anyone as long as they follow those conditions. You could also license it for money to any number of companies under your own licensing terms. Since you own it, you can do whatever you want with it. Licenses are legal terms dictating what others can do with it. – Keavon Apr 15 at 0:22
  • 1
    @bta Assuming you didn't accept contributions from anyone else under GPL, of course. – Luaan Apr 16 at 11:03
  • 1
    As a thought experiment, suppose you wrote some GPL code, then put it on GitHub under a pseudonym. Years later, having forgot you did that, you discover the repository, copy the code into your proprietary software, and release it. Are you violating the licence? What if you remember it was you but forget ever writing the code? – Hugh Apr 16 at 12:51

You can freely issue additional licenses to your own GPL software, without restriction.

Licenses can either give an exclusive or non-exclusive right. For example, an employment contract will typically give the employer exclusive rights to whatever the employee produces as part of their work. But the GPL is non-exclusive, thus allowing multiple licenses for the same material.

Dual-licensing GPL code is a common business model: the software is available as open source, but those that don't want to comply with the GPL can buy a commercial license. IIRC this was pioneered by Ghostscript, tried by MongoDB for a while, and is also used by Qt and Oracle (Java, MySQL). This works precisely because the GPL is non-exclusive, but is seen critically in the software freedom camp – the copyright holder now has an incentive to make the GPL version as cumbersome as possible to use.

To be clear, this only works when you hold the entire copyright to the software, or have suitable licenses to the other parts. That means in particular:

  • You cannot use GPL libraries (as you have no right to use them under a different license).
  • You cannot accept outside contributions, unless the contributors sign a Contribution Licensing Agreement (CLA) that gives you additional rights.
| improve this answer | |
  • "You cannot use GPL libraries (as you have no right to use them under a different license)." I'm no expert but my dim recollection is that the GPL has an exception allowing GPL libraries to be used by commercial or proprietary binaries. I wonder if that covers use of the library by a commercial or proprietary library? And what about use by a library that has a GPL, but in this case is being used proprietarily? – Swiss Frank Apr 14 at 8:14
  • 10
    @SwissFrank The GPL does not forbid commercial use, but requires that when derivative works (such as programs using the library) are published, they are only published under the terms of the GPL. So you can't take GPL libraries and distribute them under the terms of some proprietary EULA. There are GPL exemptions that restrict the reach of the GPL to the library itself, without affecting programs using the library. E.g. there is the Classpath Exception (used by OpenJDK) or the LGPL. But those can only be issued by the original copyright holder, and can't be added by downstream users. – amon Apr 14 at 8:18
  • 4
    @SwissFrank, In case you were thinking about the exception for System Libraries, that works the other way around: a GPL application may use/depend on proprietary System Libraries, which is needed to allow, for example, the distribution of GPL applications running on MS Windows. – Bart van Ingen Schenau Apr 14 at 12:37
  • 1
    @SwissFrank GPL itself goes to great lengths to make such exceptions impossible. Generally GPL only allows exceptions that are explictly mentioned in the license itself (GPL allows you to add exceptions to your own GPL license without making your license a derivative of GPL - to protect itself the GPL license is itself not open source and prohibits any changes to terms other than said exceptions). Some set of exceptions have gathered momentum and have become licenses in their own right such as LGPL (a GPL library that allows use by proprietary software), Affero GPL etc. – slebetman Apr 15 at 9:47
  • 1
    ... the Linux Kernel GPL license is one notable famous GPL+exceptions/non-plain-GPL license that is not used by other projects. It allows proprietary software to run inside Linux which would normally (without exceptions granted by Linus Torvalds) not be allowed – slebetman Apr 15 at 9:49

IANAL/TINLA: Proceed at your own risk.

Yes. According to the GPL FAQ, it states here two things:

I would like to release a program I wrote under the GNU GPL, but I would like to use the same code in nonfree programs.

To release a nonfree program is always ethically tainted, but legally there is no obstacle to your doing this. If you are the copyright holder for the code, you can release it under various different non-exclusive licenses at various times.

and also this:

Is the developer of a GPL-covered program bound by the GPL? Could the developer's actions ever be a violation of the GPL?

Strictly speaking, the GPL is a license from the developer for others to use, distribute and change the program. The developer itself is not bound by it, so no matter what the developer does, this is not a “violation” of the GPL.

This means that no matter what you do with your own GPL'ed code that you have copyright ownership of, you can never violate the GPL. But, this would be unethical, as the whole point of the GPL is free1 software.

1 Free as in free speech and not free beer. More info here

| improve this answer | |
  • 24
    Note that not everyone, not even all users of the GPL, share that view of the FSF on the ethics of non-free software. – Bart van Ingen Schenau Apr 13 at 6:57
  • 3
    "To release a nonfree program is always ethically tainted" - Wow. At least they wear their bias on their sleeve, I guess. – aroth Apr 15 at 5:19
  • IMO dual licensing proprietary / GNU GPL may end up being ethically tainted (e.g., if you make it very hard to compile / download / distribute the GNU GPL application, or publish scary legalish FUD "recommendations" on your own open source version, discouraging its use). I don't think it has to be ethically tainted in theory I guess; some projects are better at this than others. – jrh Apr 15 at 14:34
  • 1
    @aroth It makes more sense if you dive a bit deeper into the ideas. The main mover behind the FSF was to fight the software providers who were/are trying to limit the rights of users - e.g. the right to modify the software for your own purposes. Their core idea is that since it's running on your computer, you should have control. Of course, they're not exactly happy about the move to cloud either (with their wonderful "Service as a Software Substitute" jab :)). They're not against commercial software, they're against software you cannot change (hence why they always repeat "free as in speech") – Luaan Apr 16 at 11:07

When you use any source code, no matter where from, the copyright holder can sue you for copyright infringement if you do it without their permission, or if you don’t fulfil any conditions that the copyright holder sets. That principle is the same for open source, closed source, any source. People other than the copyright holder have no standing to sue you.

If you are the sole copyright holder, nobody other than yourself can sue you. So nobody can sue you. You are free to do with your own source code whatever you like. But of course that’s only the case if you are the sole copyright holder, with no copyrightable contributions by anyone else.

| improve this answer | |
  • 2
    Your argument seems to be based on the mechanics of enforcement, whereas the actual answer is that no enforcement even comes into it because no constraint or law has been violated. – Asteroids With Wings Apr 15 at 15:17
  • @AsteroidsWithWings The question of enforcement comes before the question of license content, not after. If an action is unenforceable, the content of the license is meaningless. All copyright licenses (such as the GPL) are built upon copyright law, not the other way around. So this answer is the most straightforward and correct. – Vortico Apr 15 at 22:05
  • @Vortico On the contrary: if the content of the license is meaningless, there's nothing to enforce. First you say what the rules are, then you work out what you're going to do about people who break them. This answer has nothing to do with copyright law; it's saying "you can't sue yourself so don't worry about it". That's true, but not the important angle. – Asteroids With Wings Apr 15 at 22:06
  • @AsteroidsWithWings When I say "enforcement", I mean the ability to enforce default copyright liability. Copyright licenses can only add permissions for what non-copyright-owners can do. Since there is no enforcement of copyright liability for copyright owners themselves, the content of the license is meaningless to that question. I think we may be in agreement overall, but remember, the OP is the copyright holder, so the license text (such as the GPL) is irrelevant to the question. – Vortico Apr 15 at 22:13
  • @Vortico Exactly, and that is the key point here, not whether you are legally able to sue yourself :) Even if you could, there would be nothing to sue for. – Asteroids With Wings Apr 15 at 22:21

The sole purpose of a copyright license is to allow certain parties (e.g. everyone, for the GPL) to not be liable for copyright infringement provided they follow the terms of the license. Only parties other than the copyright owner have copyright liability in the first place. This means that the copyright owner has no copyright liability for works they own, regardless of the content of the license they apply for others to follow.

In other words, the text of the GPL is irrelevant to your question. You can do anything you want with a work, provided you own its copyright.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.