Re: What's the Right Way to read resources on X startup?
Re: What's the Right Way to read resources on X startup?
- Subject: Re: What's the Right Way to read resources on X startup?
- From: Jeremy Huddleston <email@hidden>
- Date: Wed, 23 Jun 2010 21:59:43 -0700
On Jun 23, 2010, at 19:36, raf wrote:
>> No, that is what is meant by the "before the WM starts", so you can
>> hijack it if you want. You can either set the USERWM environment
>> variable, or exec it yourself.
>
> that has its own problems. execing the wm means nothng can be
> executed after the wm terminates (see below).
which is more or less the way it should be... if you want to do something "after", you can always have it exec a shell script and run the WM in that shell script.
> i looked at /usr/X11/lib/X11/xinit/xinitrc and saw the
> following after the code that runs after
> /usr/X11/lib/X11/xinit/xinitrc.d/*
>
> twm &
> xclock -geometry 50x50-1+1 &
> xterm -geometry 80x50+494+51 &
> xterm -geometry 80x20+494-0 &
> exec xterm -geometry 80x66+0+0 -name login
That doesn't even get run. The default just execs quartz-wm.
> these are what i was referring to. the system xinitrc
> doesn't know where i want my xterms or how many or what
> options i need to pass to them. it doesn't know where i want
> my xclock.
then put all that stuff that you want in ~/.xinitrc.d/99-custom_exec.sh as I had mentioned.
> like i said, it's just a default setup. also i
> think the wm should be in the process foreground, not one of
> the xterms. i'd hate to be logged out of X just because i
> closed one of 3 xterms.
Uhm, the WM is in the foreground. Look at the scripts in /usr/X11/lib/X11/xinit/xinitrc.d/
> however, at the time i didn't realise that it never gets to
> execute that code because /usr/X11/lib/X11/xinit/xinitrc.d
> execs the wm. that introduces another problem. i want to
> kill my ssh-agent (among other things) after the wm quits
> which is impossible when the wm has been execed because
> nothing runs after that.
ssh-agent is managed by launchd and has nothing to do with X11. If you really want to kill it after, you can do:
mkdir -p ~/bin
mkdir -p ~/.xinitrc.d
echo > ~/bin/wm.sh <<EOF
/opt/X11/bin/quartz-wm
launchctl stop org.openbsd.ssh-agent
EOF
echo > ~/.xinitrc.d/99-wm.sh <<EOF
exec ${HOME}/bin/wm.sh
EOF
chmod 755 ~/.xinitrc.d/99-wm.sh ~/bin/wm.sh
> of course, i could create a script
> that runs the wm and then cleanup stuff and exec that "as"
> the wm but i'd rather do what i'm doing because it does
> exactly what i want on every platform that i use.
Right, but then you don't inherit system-specific changes from the different platforms which you could by using ~/.xinitrc.d
_______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list (email@hidden)
This email sent to email@hidden