XQuartz: Try harder to get the user's login environment
(cherry picked from commit 6bedaddd78aa04bd303df434a4c49bb87bd7deaa)
This commit is contained in:
		
							parent
							
								
									ae8dc47fd9
								
							
						
					
					
						commit
						997e8c321b
					
				| 
						 | 
					@ -1,8 +1,15 @@
 | 
				
			||||||
#!/bin/bash --login
 | 
					#!/bin/bash
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					set "$(dirname "$0")"/X11.bin "${@}"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if [ -x ~/.x11run ]; then
 | 
					if [ -x ~/.x11run ]; then
 | 
				
			||||||
	exec ~/.x11run "$(dirname "$0")"/X11.bin "${@}"
 | 
						exec ~/.x11run "${@}"
 | 
				
			||||||
else
 | 
					 | 
				
			||||||
	exec "$(dirname "$0")"/X11.bin "${@}"
 | 
					 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					case $(basename "${SHELL}") in
 | 
				
			||||||
 | 
						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 $*' "${@}" ;;
 | 
				
			||||||
 | 
						*)             exec    "${@}" ;;
 | 
				
			||||||
 | 
					esac
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue