I worked at a public university (math dept) in the US, where all salaries were a matter of public record. Specifically one could go to the library and look up anyone's salary. In 30 years I never cared to do so and never knew anyone else's salary. In fact for years I didn't even know my own gross salary, especially once it began to be automatically deposited, minus deductions, except that it seemed inadequate to my needs.
Later at the end of my career I was tasked with reviewing performance of colleagues and making salary recommendations, whence I learned many others' salaries. I tried to evaluate the salary relative to performance and recommend raises when appropriate (almost always), but was usually unsuccessful, due to inadequate raise money being made available.
One principal reason was that I considered people deserving who made strong academic contributions, in teaching, research, and governance, whereas the higher administration primarily valued generation of outside grant dollars as significant. Since at that time, according to public data, 51% of federal grant money was awarded to biological and medical sciences, and 1.7% to mathematical and physical sciences, this did not help.
My attitude was that a salary is intended to pay my living expenses and make it possible to focus on my work. This was not always the case in some sense, for example neither my colleague nor I felt able to afford buying lunch at work, but we did not starve. Maybe this example is not relevant to this discussion of salaries "at work", if work is thought of as a profit making enterprise, but in academia, salary is not the main focus, and someone especially concerned with salary is advised to look elsewhere for employment.
In answer to question about sharing in the royalties for ones inventions, the university considered the on campus work of developing such inventions as having been funded by the employer, hence they claimed the lion's share of royalties after a certain initial shared portion. Some faculty however generated profitable creative works such as textbooks, by writing them at home on personal computers and working on them only "off the clock", in order to maintain full possession of profits.