Default xinitrc has strange sourcing logic
While investigating the cause of this issue, I had occasion to read through
/etc/X11/xinit/xinitrc. To me it seems a bit to restrictive in the files it will source. After all, read permissions are sufficient to source a file. On my system (Arch Linux), not all of the files installed by packages in
/etc/X11/xinit/xinitrc.d/ are executable. Of course I can raise bugs on those packages as well asking them to fix the permissions, but I think it would be better to change the check here to read permissions. Also, is the question mark in the glob pattern necessary?
if [ -d /home/jordan/etc/X11/xinit/xinitrc.d ] ; then for f in /home/jordan/etc/X11/xinit/xinitrc.d/?*.sh ; do [ -x "$f" ] && . "$f" done unset f fi
Less of an issue, but still worth addressing is the formatting of the script. There are many extra blank lines and inconsistent indentation. Sometimes semicolons are preceded by a space and sometimes they are not. I think it would also be a good idea to quote all of the variable expansions even if not strictly necessary.
if [ -f $sysresources ]; then xrdb -merge $sysresources fi if [ -f $sysmodmap ]; then xmodmap $sysmodmap fi if [ -f "$userresources" ]; then xrdb -merge "$userresources" fi