Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Here is the over-simplified summary: Open-Source says that something that comes to you as open must stay open. I'm not sure how it even applies to scripts, which are open by nature.
If you sell any kind of product, you are responisible for knowing all the license and copyright provisions for the tools you use. Look, for example, at the Qt toolkit: It does (or did) have a provision that you can use it free unless you are writing SW to sell---then you have to pay royalties. (I'm going from memory here, so don't quote me...)
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789
Rep:
Quote:
Originally Posted by pixellany
I'm not sure how it even applies to scripts, which are open by nature.
Released shell scripts are obviously open (ie. readable) but that doesn't means they are open source under the OSI definition. They must comply to several more criteria to be considered as such.
Hello,
thanks for your replies. I'm going to sell a hardware with linux embedded. For several tasks I use shell scripts there.
1. These scripts are written by myself.
2. I use awk, sed, ... and lots of other power unix tools.
3. I don't want customer to read the script contents.
4. Customers should be able to run these scripts.
5. The customer pays for the shell script contents.
So the key problems are points 3 and 5. Do I violate the GPL ?
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789
Rep:
In my understanding, there is no GPL to violate here. Your scripts aren't derived work of GPLd copyrighted material so you are free to use any license of your choice including a proprietary one if you (probably wrongly) believe it is your interest doing so.
That said, I'm not a lawyer. Better to seek an advice from one if you really need a reliable answer.
Scripts, by any nature, are open source. Companies can't say "You can't edit that", because the script is easily read by a text editor.
That's not the case. The copyright owner can place any conditions they wish on a piece of code, once there is no superceding agreement (like the GPL).
Simply because a piece of code is readable doesn't entitle someone to do as they wish with it. Technically, anything might be possible, but that doesn't mean that the same applies in a legal context.
While it may be obvious knowledge to some, I'd personally like to draw attention to this:
Quote:
Originally Posted by Mario Blunk
5. The customer pays for the shell script contents.
Assuming that a bash script were licensed under the GPL (possibly because of its derivation from another GPL-licensed script), this would never violate the GPL because there are no restrictions on selling GPL-licensed works. You are free to charge as much as you'd like and still comply with the terms of the license.
As mentioned previously in the thread, the point is almost not worth making however, because a bash script, by its nature is very hard to publish under a proprietary license. Mostly for the following reasons:
Scripts are almost always human-readable meaning that "stealing" code from them and violating a proprietary license is child's play, and
Proprietary works cannot be trivially reproducible (meaning that you cannot hold a software patent on a "hello, world" program).
Because a bashscript is usually not a [b]very[b] complex program, but can be, I would suppose that the arguments for what is and isn't trivial in them are too diverse to be a healthy environment for a proprietorial-licensed work, which is what you seem to want for your scripts.
If you truly want to maintain a work proprietary, it would be simple to distribute a binary of some sort rather than a script. Perhaps a rewriting of the scripts in some sort of compilable language (such as C/C++) and then distributing the binaries. That would make things much more simple from the point of view of a proprietary-licensed work author.
There seems to be a misconception about how software licensing works. Copyright doesn't need to be enforced by technology to be valid. A piece of code doesn't have to be compiled or obfuscated to be uncopy-able, it just needs to be copyrighted.
If someone wants to copy or reverse-engineer code... no amount of preventative measures will prevent it, however, if they do, they will be outside the terms of the license regardless of whether they had to decrypt the hell out of it first, or it was there in plaintext.
Simply put... if you make it a term of use that the code is not copied or reverse-engineered, that should be enough. Scripts running on Linux are not bound by the GPL or any other licensing scheme.
The whole thing revolves around the concept of "derivative work". As long as the code is yours and doesn't link statically to anything that's not your own work, you can license it in whatever fashion suits you. The fact that your code is readable by bash is only casual. Under that logic, if nothing running under bash could be closed source, then you wouldn't be able to -legally- run any closed software under linux at all. Just think about it.
As nowonmai above said, people seem to confuse concepts like ease of readability and "open source". The fact that you can read the source easily doesn't mean that you can act like the script is licensed under an open licensing model. The fact that the script can be read easily doesn't mean a thing, and it's purely coincidental. Strictly speaking, you can read an hex dump of a compiled application as well, or you can disassemble it and read the asm mnemonics, the fact that you know bash scripting and not assembler is no one else's problem and doesn't make a difference. Of course, the least obfuscation the bigger chance that someone will "steal" your code.
So, I'd say that there's absolutely no legal problem here, as much as I dislike non-free licenses, he has perfect right to use one if that's what he wants.
Disclaimer: bear in mind that I am no lawyer either.
Hello folks,
thank you all for your replies. There is much to read and to understand in your posts. Yes there seems confusion among people in terms of open and readable code.
So my conclusion is: I'm allowed to close my scripts.
That rises the question: How to close a shell script ?
Does clearing the r-Flag by chmod ? From your comments I understand that this is not as easy as it seems to me.
Coburn64 said something about encrypting the script. What do you mean ?
thanks again for your help,
have a great day,
Mario
Hello folks,
thank you all for your replies. There is much to read and to understand in your posts. Yes there seems confusion among people in terms of open and readable code.
Yep.
Quote:
So my conclusion is: I'm allowed to close my scripts.
That rises the question: How to close a shell script ?
Does clearing the r-Flag by chmod ? From your comments I understand that this is not as easy as it seems to me.
-r would imply that the user can't read it, hence, it wouldn't be able to run it either. In other words, to run a script (or a binary program) you need both +r and +x.
Quote:
Coburn64 said something about encrypting the script. What do you mean ?
I didn't read it and I don't have the time today to do so, but maybe he was talking about some of the available bash compilers, like shc.
However, I am not too sure what these programs do. My guess is that they just include the script intro a matrix or something, and then just restore it and run it, hence they still would required bash to run, and a temporary file with the contents of the original script will live somewhere.
What leads me to the *right* question: why the hell are you not coding this in C or another compilable language? Bash is not any easier...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.