5

I'm really confused..

I'm looking into making a commercial program and there are a few open source, GPL covered components i'd like to use..

Am I allowed to sell my product with the components in without distributing my source?

For example.. say i was making a commecial text editor, and my friend has a really awesome GPL free-software text editor..

But i wanted to make a text editor like his but with special features..

Am I allowed to fork his text editor add all my special features and sell it on without having the source code to my special features available to my users?

1
  • 23
    Your question is basically, "Can I do <thing the GPL is explicitly intended to forbid>?" No, you can't. Commented May 27, 2011 at 18:41

4 Answers 4

19

In a word, No. In fact, you can't even distribute it for free without releasing your code. The reason you even have access to all of that nice code is because of the GPL and its requirements.

There are loopholes, such as the method TiVo used to release their version of the Linux kernel while withholding their core-code, but that was one of the things that GPL v3 closed.

Of course, you can always look at the GPL code and use that as a learning tool as you write all of it over from scratch, but there is thing called Time To Market.

7
  • Ah ok.. Thanks @Peter Quick question.. How is this governed? Say if i were to make a fork of a very popular library but went through renamed the namespaces and classes and "mix it up a bit".. how would a breech of the GPL come to light if i don't distribute my source? (I'm not suggesting i ever would.. just curious!) Commented May 27, 2011 at 15:52
  • 10
    @Daniel: "I'm not suggesting I ever would ..." Uhm, I think you just did. Can you get away with it? Maybe. On the other hand, it means you will constantly be looking over your shoulder, waiting for the GPL police to arrive, perhaps in the disguise of a disgruntled employee. Life's too short for stuff like that. Note that a number of companies have played footsie with the GPL and lost, some of them quite publicly. Commented May 27, 2011 at 15:58
  • 1
    @Daniel - Why not just write your own code instead of working off the backs of others without giving them credit?
    – Ramhound
    Commented May 27, 2011 at 16:28
  • 7
    @Daniel - "how would a breech of the GPL come to light if i don't distribute my source?" Because you just made a post on a public forum describing your plans to violate the GPL? Commented May 27, 2011 at 16:51
  • 1
    Ratz my plans foiled by my big mouth! Jokin' i was never planning on doing it! @Ramhound it's not that I don't wanna give them credit.. It's just me not wanting to show off my code! Commented May 28, 2011 at 2:16
4

No, not if the code is distributed under GPL. GPL is a restrictive or copy-left licence. If you distribute the code at all, even for free, you must distribute your source code too (and you must require the recipient of the code to be bound by the GPL).

There are two types of open source code that you could use:

  • Code distributed under a business-friendly (aka permissive aka unrestrictive) open source license such as MIT, Apache, or BSD. These licenses allow you to fork the code and declare your fork as closed-source.
  • Libraries that are licensed under the LGPL. You are allowed to distribute a closed-source program that uses these libraries, as long as you haven't modified the source code of the library. If you modify the source code of the library, you must make those modifications available when you distribute the library (but not your other code).

See also this StackOverflow question

4
  • 2
    Regarding your second point, even if you don't modify the library, you must make it possible for the end user to replace the library with a modified version. This is something often missed. It means if you have a statically linked program, you have to provide object files and instructions on how to re-link. If dynamically linked, you can't use hard references to restrict the version of the library it will run against. Commented May 27, 2011 at 17:34
  • @Scott Whitlock - Interesting, I'd never noticed that. Presumably though, a supplier of a commercial product which incorporated an LGPL library could stipulate 'use of a library other than the one supplied with this product is not supported' though.
    – Mark Booth
    Commented May 27, 2011 at 22:25
  • @Mark Booth - The LGPL doesn't require you to support it, but it does require you to maintain the user's "freedom" when it comes to the library, which includes the ability to change it. Although TiVo had to do with the GPL, it's the same spirit of "freedom to modify" that caused the creation of the GPLv3 to make this explicit. Commented May 28, 2011 at 2:25
  • While you have to allow the user to relink... you are not on the hook for the application to work after being relinked. Commented Aug 24, 2015 at 18:03
3

In short, the answer is no.

I'd dare add this small twist, however: the obligations set out by the GPL begin and end when you distribute the software... to your customer. You are in no way obligated to post the source code for the public at large to see. Place it in a src folder as you install it and begone with it; it's there.

In practice, nobody will bother asking you for the source code unless they are a) programmers or b) your competition or c) unsatisfied to the point that they feel like posting it on a file sharing site.

Lastly, as much as you cannot prevent your customers from getting your source code, you can prevent them from getting updated source code (until they pay for it, that is) as you continue developing your app. The part about getting updates is not part of the GPL, and you're perfectly entitled to refuse business from anyone you don't feel like working with.

So at length, no, but with a big twist: it won't prevent you from running a business based on GPL software. And at the end of the day, hey, don't worry about it. It's fun to share code, and there's so much of it around that one more one less won't make much difference.

5
  • Identifying loopholes and exploiting them ... I wouldn't do that without this: Lawyer up!
    – Sub S
    Commented May 28, 2011 at 3:20
  • 1
    @Subu: No loopholes here, just stating the obvious... the GPL applies when you distribute the software. It has to be distributed for the license to apply. If I write GPL code and don't distribute it to you, you've no right to see the slightest bit of it. If I sell and distribute it to you, by contrast, you've every right to see the code and distribute it all over the place under the same terms, even for free. And some do. What I'm merely pointing out is that, well... most won't. Commented May 28, 2011 at 8:30
  • Do you know about someone who used this approach in practice ? I understand your point but this doesn't seems to be common way how to read GPL license. I would be worried about possible legal consequences. Commented Jan 3, 2017 at 13:42
  • 2
    @truthseeker Yes, this is first hand experience - I've run a business based on this for years. This reading of the GPL is that of GNU itself, btw. The reading that you regularly hear again and again online actually is the reading of not-so-well informed script kiddies. Commented Jan 3, 2017 at 13:54
  • I think you'd need to make the customers aware that they can find source code in the 'src' folder. Just placing it there might not be enough, unless it's in a conspicuous location. And once they have it your customer is within their rights to post the source code publicly on the internet.
    – bdsl
    Commented Mar 3, 2019 at 19:24
1

If your friend wrote the entire editor himself, and didn't link any third-party GPL libraries into it, then you could try to get him to license the code to you under a different license, at which point you would be bound by that other license, instead of the GPL.

Chances are that he did use some GPL code, since he released his editor under the GPL as well. It's also likely, if it's any sort of popular editor, that others have contributed code to it, at which point you'd have to get their permission too, or remove their code.

1
  • Thanks @pib the editor was a forinstance.. But still a very useful spin! Commented May 28, 2011 at 2:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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