Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Failed to execute process:startx #1281
You are right! Two blank lines before #!/bin/sh. Respectively
I deleted - now
It is strange that with tcsh it was launched with blank lines.
Many thanks and with the best regards!
referenced this issue
Jul 3, 2016
Someone was asking about this on IRC/Gitter recently because they were seeing the same error. Albeit with different scripts created at their company that did not contain a shebang line. They noticed that those scripts ran just fine when launched from sh/bash and therefore didn't understand why fish reported an error.
The answer is that the Bourne shells and those derived from it like Bash and Zsh contain a compatibility shim that is no longer necessary. There is a common misconception that the shebang line is read by the shell. That isn't true: it's read by the kernel. Specifically, whatever part of the kernel implements the
There is a kernel of truth to the notion that the shebang line is read by the shell. Long ago the Bourne shell would look to see if the file began with
Bottom line is that today you should not rely on that compatibility shim. Every script must have a shebang line. Full stop. Anyone telling you it's okay to omit the shebang line is propagating a dangerous practice.