Re: migrating Tiger -> Snow Leopard -- X11 startup problem
Re: migrating Tiger -> Snow Leopard -- X11 startup problem
- Subject: Re: migrating Tiger -> Snow Leopard -- X11 startup problem
- From: "Mark E. Perkins" <email@hidden>
- Date: Fri, 19 Nov 2010 15:14:16 -0700
On 2010/11/19 14:09, Jeremy Huddleston wrote:
> On Nov 19, 2010, at 12:39, Mark E. Perkins wrote:
>
>> I should have been clear that in the "free" xterm and any subsequent
>> xterms, the shell starts in $HOME, and that the rest of the environment
>> looks OK even in those (e.g., $USER is me, $PATH is right, other things I
>> set in startup files are OK, ...).
>
> Well xinitrc is launched from your per-user launchd, so it won't have
> your login shell environment (and subsequently neither will processes
> launched from it).
OK. But I'd like to have things "clean" in the xterms I run when I start
X11.app (no need to 'cd', esp. since when I 'cd /' my group is changed to
'admin' and I'm free to make a mess of things in /). Is there a way to
"fix" this? 'xterm -ls' doesn't do the trick.
If I'm putting the pieces together correctly, my per-user launchd does not
know my bash environment (no surprise as I understand things). But if I
run 'xterm -ls' in my ~/.xinitrc.d/<script> the shell in that xterm has my
login environment. In fact the only differences between the environments
in that shell and the shell in the xterm launched by X11.app are (hopefully
the file names are self-explnatory):
-> diff env-xinitrc.d-script-bash env-X11.app-bash
2a3
> COMMAND_MODE=unix2003
4c5
< DISPLAY=:0.0
---
> DISPLAY=/tmp/launch-IEEyrc/org.x:0
17c18
< PWD=/
---
> PWD=/Users/mep
19c20
< SHLVL=3
---
> SHLVL=2
25c26
< WINDOWID=4194317
---
> WINDOWID=8388621
28d28
< XAUTHORITY=/Users/mep/.Xauthority
34d33
< __LAUNCHD_FD=26
The environment differences for DISPLAY and WINDOWID are understood / no
surprise. I'm not bothered by COMMAND_MODE. I don't know where XAUTHORITY
and __LAUNCHD_FD come from, but they don't show in subsequent xterms that I
launch by hand.
The only real differnces are for PWD (the $10k question) and SHLVL (which
is probably the clue, but I'm not seeing a way out).
Am I stuck with this? If I
launchctl unload -w /System/Library/LaunchAgents/org.x.startx.plist
will that let me have it my way? (I can't see how that will change
anything that I'm trying to change.)
> The xterms launched from X11.app have your login shell environment as
> setup by the shell script that launches X11.app.
The differences seem minimal, so I'm missing something.
Thanks for your help (and patience),
Mark
_______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list (email@hidden)
This email sent to email@hidden