When the .xinitrc has mode +x, xinit will traditionally exec the script rather than launch /bin/sh on it. So you can use perl or in my case a #!/bin/tcsh with the purpose of having all my tcsh environment variables properly set up for all X applications. With the current /etc/X11/xinit/xinitrc this feature is broken. Reproducible: Always Steps to Reproduce: 1. put #!/usr/bin/perl in your .xinitrc 2. xinit Actual Results: syntax errors because /bin/sh cannot parse perl I changed /etc/X11/xinit/xinitrc like this, and thus fixed the bug: if [ -f "$HOME/.xinitrc" ]; then XINITRC="$HOME/.xinitrc" if [ -e $XINITRC ]; then # if the x bit is set on .xinitrc # it means the xinitrc is not a # shell script but something else exec $XINITRC fi exec /bin/sh $XINITRC # If not present, try the system default ...
Fixed, finally! In xinit-1.0.2-r1.