| Summary: | xinit forces .xinitrc to run with /bin/sh | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | Carlo von Loesch <lynx> |
| Component: | Current packages | Assignee: | Gentoo X packagers <x11> |
| Status: | RESOLVED FIXED | ||
| Severity: | minor | Keywords: | Inclusion |
| Priority: | Normal | ||
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
Fixed, finally! In xinit-1.0.2-r1. |
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 ...