[Xquartz-dev] 2.3.2_rc4

Jeremy Huddleston jeremyhu at apple.com
Fri Dec 26 15:24:33 PST 2008


On Dec 26, 2008, at 14:15, Cameron Simpson wrote:

>>>> [...] when bash is run with argument zero equal to -bash it is a
>>>> login shell, however it is not interactive and so it doesn't read
>>>> the login files unless you also supply --login.
>>>
>> Right... But why not do both?
>
> Because it would run bash login stuff for non-bash users,

How would this affect non-bash users:

--- X11.sh.orig	2008-12-26 15:22:19.000000000 -0800
+++ X11.sh	2008-12-26 15:22:37.000000000 -0800
@@ -7,7 +7,7 @@
  fi

  case $(basename "${SHELL}") in
-	bash)          exec    "${SHELL}" --login -c 'exec "${@}"' - "${@}" ;;
+	bash)          exec -l "${SHELL}" --login -c 'exec "${@}"' - "${@}" ;;
  	ksh|sh|zsh)    exec -l "${SHELL}" -c 'exec "${@}"' - "${@}" ;;
  	csh|tcsh)      exec -l "${SHELL}" -c 'exec $argv:q' "${@}" ;;
  	es|rc)         exec -l "${SHELL}" -l -c 'exec $*' "${@}" ;;

> and would run
> bash login stuff twice for bash users. Neither seems desirable when  
> we can
> put the --login option in the bash "exec -l" line in the case  
> statement.

You seem to have missed my question... There was no '-l' in the bash  
exec line... that's why I was wondering why not do it...




More information about the Xquartz-dev mailing list