Years ago I released a program called Banshee Screamer Alarm and at the time it included the full source code, ‘for educational purposes only.’ You couldn’t extend it to make your own version, but you could learn from it. It actually helped somebody fix a bug in wine.
If I release more software like this (open source, but copyrighted and non-free), are there any legal thorns that I should know about? Are there any suitable licenses for this purpose?
I don’t see any problems, but then I’m not a lawyer and have no real interest in proprietary software licenses. You should be able to just ship source without trouble, much like the old days of interpreted BASIC. There were plenty of proprietary programs distributed that way.
However, quite a few people would appreciate it if you’d call it ‘source included’ or something like that rather than ‘open source’. The Open Source Initiative has a clear meaning for ‘open source’, and you aren’t coming anywhere near their definition.