views:

762

answers:

3

Hello,

This question has been asked multiple times I know. From what I understand, broadly speaking, if I include a GPL module in my app, I have to also release my app's source code for free.

Now if the module is a java app (which I have modified) and included in my own java app, and say I use it as an applet on my website, do I need to distribute the source code to all the users visiting the website? Can I distribute the code only to people who ask for it?

If I sell my applet, do I need to distribute the source code to all the users or ONLY to the users who purchase my applet?

Thank you very much for your time.

A: 

A software component released in GPL also propagates the GPL to any app that uses it, and therefore is useless in any closed source software. That is, even if you sell your applet, you must give the source code to anyone who asks for it (and he's free do anything with it). So, trying to sell it makes little sense.

Luckily, for modules, components, libraries and such there's LGPL (Lesser GPL), which allows you to use the module in your app with not so strict requirements - one requirement being that the LGPL'd part must be swappable by the end user.

In a nutshell, while GPL is completely useless for closed source software, LGPL may be useful.

Joonas Pulakka
LGPL only applies if the original author put the library under LGPL of course. And there are some special requirements - broadly speaking, there needs to be a way for the user to swap out the LGPL component for their own version.
bdonlan
True; it's the library author's choice of course. Fixed the LGPL swap requirements now.
Joonas Pulakka
nitpicky: There is quite some commercial GPLed software available. I'd replace "useless in commercial software" with "useless in closed source software" - be it commercial or not.The license is not about the underlying business model, it's about the availability of the code. These aspects are often mangled.
Olaf
Nitpicky, but right :-) Fixed it now. Though, the usual business model seems to be that there's GPLed "basic version" and closed source "advanced version"; it's a possible combination, because the original author can release the GPLed part also under some other (e.g. closed) license.
Joonas Pulakka
+3  A: 

If you use it on your website, you are distributing the binary code, which means you are required to also make available the source code. (GPLv2 3, GPLv3 6)

If you sell it, you need only distribute source to the users who purchase the applet. If you do not distribute source at the time of purchase, you may be required to distribute it to others, see GPLv2 3.b or GPLv3 6.b-6.e

I am not a lawyer; this is my understanding of what the GPL means based on a lay interpretation. Your mileage may vary. This is not intended as legal advice; contact an actual, honest-to-goodness, expensive lawyer if you want some of that (and you probably do!). Choking risk: not for use by small children.

bdonlan
+1  A: 

This question has been asked multiple times I know. From what I understand, broadly speaking, if I include a GPL module in my app, I have to also release my app's source code for free.

That's not quite right.

If you include a GPL module in your app, then:

  • Your app must itself be GPL (except in certain cases, like LGPL, modified GPL, or if the module meets the legal definition for being a "separate program")

... and any GPL code is subject to the condition that

  • If you sell or distribute the program, then you must make the source code available to the recipients of the program, and confer them rights to further modify/sell/distribute it under the same conditions.

So you are allowed to sell GPLed code, however whomever you sell it to can then start giving it away for free (if you inform them otherwise, then you are violating the GPL).

Now if the module is a java app (which I have modified)

The modified module is definitely GPL.

and included in my own java app, and say I use it as an applet on my website, do I need to distribute the source code to all the users visiting the website? Can I distribute the code only to people who ask for it?

If the code runs server-side, you do not need to make source available. If it runs client-side, then you must basically offer "equivalent access" to the binaries and the source, though they do not need to be packaged together. However as I understand it, if the client didn't contact you in order to get the applet, then he shouldn't have to contact you to get the source.

If I sell my applet, do I need to distribute the source code to all the users or ONLY to the users who purchase my applet?

Only those who purchase the applet. However, they must have the right to modify and redistribute it, under the terms of the GPL.

Note: I am not a lawyer.

Artelius