How to dissuade certain organizations using my open source code?
<p>I want to prevent military, policing, and surveillance companies from using my open source code in their projects, through a custom permissive license.  Of course, I can't tell the military itself what it can and cannot do.  So I think terms such as "this may NOT be used for military or surveillance applications" are pretty pointless.  </p>

<p>Would I be better protected with a statement like "This code may be used for all projects, private and commercial, except when used for ______ purpose, in which case a one-time fee of 5,000,000 USD will be immediately due."?</p>

<p>My theory is that it outlines a path for such organizations to still use it, even if that path is so expensive no rational organization would take it, and acts as a good damages baseline should I ever have to take any such an organization to court.</p>

<p>edit: 
I'm not interested in money and would actually like to avoid mentioning it at all, I'm just trying to lay out the correct legalese to prevent such entities from using my work.  If it's enough to define said entities and say "May NOT use this" I'm happy with that.</p>

<p>You cannot do this through any established public license that I know of, but you could write your own. The model would be any educational use or non-commercial use license, such as <a href="https://wiki.creativecommons.org/wiki/NonCommercial_interpretation" rel="noreferrer">CC NC licenses</a>. The main challenge is defining the excluded classes of usage. That is why you should engage an attorney to draft this for you.</p>

<p>I don't think there is any point in adding a $5M penalty clause. You offer a separate paid license for individuals who do not want to comply with the particular terms of your license, and set the fee to whatever you want. Saying that you're gonna fine violators is a bad idea because penalty clauses are illegal. Instead, the standard approach is a liquidated damages clause, where you state what a reasonable estimate of your damages would be. In the case of software that is available for purchase, illegal copying of the software obviously results at least in the cost of the software <em>qua</em> lost revenue as damages. Plus shipping and handling. </p>

copyright licensing open-source-software