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: raf <email@hidden>
- Date: Thu, 24 Jun 2010 12:36:19 +1000
Jeremy Huddleston wrote:
> On Jun 21, 2010, at 18:09, raf wrote:
>
> > Jeremy Huddleston wrote:
> >
> >> On Jun 20, 2010, at 19:55, raf wrote:
> >>
> >>> hi richard,
> >>>
> >>> what i've always done on all x11 systems is to have my own
> >>> ~/.xinitrc (or ~/.xsession) file that gets run instead of
> >>> the systetem's default xinitrc. then you get to control the
> >>> sequence of things.
> >>>
> >>> for example, my ~/.xinitrc does the following
> >>> (among other things):
> >>
> >> This is very much not recommended by me because it means you won't
> >> benefit from fixes and changes to the global xinitrc. The recommended
> >> approach to customizing your startup is to use a ~/.xinitrc.d
> >> directory. Scripts in there will be executed after the system startup
> >> scripts but before the WM starts.
> >
> > i don't need any fixes or changes to the global xinitrc
> > since i have my own ~/.xinitrc.
>
> But then you'll need to check to see if you need to update it
> periodically.
correct. but i don't see that as a problem. i usually have
to make tweaks whenever i port my configuration to a new
system (or even a new monitor resolution). that's normal
and it's not something that anyone else can do for me no
matter how good their intentions are. nobody else knows
exactly how i want my environment set up.
> For example, you may have had issues with key repeats
> in the past because you were not including that xinitrc.d fix ... and
> you may have incorrect font dirs now because you don't have that one
> either...
not that i've noticed. i set the key repeat rate myself and
don't use many fonts.
technically, i do have a wierd key repeat issue that
involves the capslock key remapped to be underscore but
i'll leave that for another message as lots of strange
things happen when you remap capslock to underscore on
macosx and it has nothing to do with this topic.
> > also, your method doesn't sound like it would let me run the
> > window manager of my choosing. but perhaps it only sounds like
> > that.
>
> 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).
> > also, and the system's xinitrc runs programs that i don't
> > want it to run so replacing it entirely is the correct solution
> > for me.
>
> what don't you want it to run?
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
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. 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.
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. 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.
in reality, i only had to stop X11 from running a single xterm
by default with: "defaults write org.x.X11 app_to_run /usr/bin/true"
> > it's not meant to be a straight-jacket that everyone has to
> > fit in.
>
> Right, but you may miss out on fixes and workarounds for issues if you choose to go your own route.
thanks. i'll be careful out there :)
cheers,
raf
_______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list (email@hidden)
This email sent to email@hidden