Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Is there any license meeting the following criteria:

  • source code available (users allowed to browse the source)
  • users are allowed to modify the code with credits to the original author
  • not allowed to sell the software itself or any other program using code from it
  • can be sold by original author
share|improve this question
    
How does a user use the code if he cannot modify or copy it, but is allowed to "use it"? –  Matsemann Nov 4 '12 at 12:11
    
I mean that he is allowed to "see" the code and use it with credits to the original author, but not allowed to modify it –  Nickolas Nov 4 '12 at 12:16
    
Are you talking about a library, then? As a program where one is not allowed to copy or edit code, one can really do nothing with it other than compiling it. –  Matsemann Nov 4 '12 at 12:20
    
Hmm... I'll state it differently. What if he is allowed to view the code, copy the code(with credits to the original author) edit it(again with credits to the original author) but unable to sell it? Nice avatar btw. –  Nickolas Nov 4 '12 at 12:28
    
I edited my question. –  Nickolas Nov 4 '12 at 12:55
show 2 more comments

3 Answers

  1. If you wrote the software, then you own the copyright. Anyone can look at it, but they can not "use" it in any way unless they contact you and get an explicit permission.

  2. if you do not want lots of people to explicitly contact you and get a permission, you can make your and their job easier, by providing your permission with your rules over the "usage" of the code in what is called a "license".

  3. It will be better if there was already a license template that provided usage rules exactly the same way that you want. In your case, there isn't, so you have to spell out your terms yourself. That is then your "license".

  4. your terms can be written in complex, lawyery, format. Or you can write it in simple terms the way you have explained it. The former is expensive, but makes sure you cover every eventuality, loop hole, and withstands a court challenge if you have to. The latter costs less to write up (30 minutes of your time?) but could be full of legal holes.

Now choose your pick!

share|improve this answer
    
+1. But item 4 maybe could be better worded. Whether you use simple terms, or lawyerly terms, you still need to get your licence checked by a lawyer with knowledge of the relevant law in your jurisdiction. Even then, you don't really know until it has been tested in court (lawyers can be wrong too). –  MarkJ Nov 5 '12 at 15:30
    
Fair enough- you can's add terms that could be unlawful, such as "you can use this code in your application only if you bang your neighbour's head with a hammer every time you run your application". If in doubt (whether your demand is in line with the laws in your jurisdiction), please contact your friendly lawyer :) –  Protecode Nov 5 '12 at 16:33
add comment

For starters, the original author doesn't need a license to do anything with the program. They own it outright, including it in your requirements just complicates the issue.

With that out of the way, you're not looking for an "open source" license, just a source license. Lots of 'enterprise' software is distributed this way, allowing for site-specific customization to the software. You'll see licenses that authorize "research and personal use only" but explicitly denying redistribution rights. Early versions of Unix were basically distributed this way.

What you're asking for isn't novel or new but there aren't exactly standard, public licenses floating around that say what you want. Time to lawyer up and write your own.

share|improve this answer
add comment

If you go by the definition of "open source" by The Open Source Initiative, then no you will not find a licence that fits your terms.

From the Open Source Definition:

3. Derived Works

The license must allow modifications and derived works, and must allow them to be distributed under the same terms as the license of the original software.

The second item in your original question is incompatible with that definition.

The "no commercial use" term you state is also incompatible with the OSD definition. Check for instance this FAQ item:

Can Open Source software be used for commercial purposes?

Absolutely. All Open Source software can be used for commercial purpose; the Open Source Definition guarantees this. You can even sell Open Source software.

However, note that commercial is not the same as proprietary. If you receive software under an Open Source license, you can always use that software for commercial purposes, but that doesn't always mean you can place further restrictions on people who receive the software from you. In particular, so-called copyleft-style Open Source licenses require that when you distribute the software, you do so under the same license you received it under.

Your last item isn't something that would be governed by the licence you choose to distribute your code. If you have the copyright to the code, you do whatever you want with it, including selling it and/or distributing it under a variety of licences.

share|improve this answer
    
If it's not open source, then what is it? –  Nickolas Nov 4 '12 at 12:05
1  
Allowing changes is a core part of the usual definition of open source people have in mind. You can probably do a Creative Commons licence variant (creativecommons.org/choose) that matches your requirements. Microsoft has something like that license for some of the code they expose I think (en.wikipedia.org/wiki/Shared_source). –  Mat Nov 4 '12 at 12:09
1  
Note that the CC guys recommend using a dedicated software license rather than CC licenses (e.g. MIT instead of CC-BY-SA) for software, with the exception of CC0 for public domain. –  delnan Nov 4 '12 at 12:49
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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