Mailing List Archive

purpose of /etc/X11/xinit/xinitrc.d/
Hi

Reporter of https://bugs.gentoo.org/270250 suggests (via his patch), that
/etc/X11/xinit/xinitrc.d/ should be utilized like "autorun" and that
xinitrc.d/* should be sourced by startkde script (and presumably any other DE
initialization script as well).
Judging by location it should belong rather to xinit (and be sourced somewhere
in initrc maybe), yet, this directory is provided by dbus and at least on my
box only contains script to launch dbus session instance (in user mode, so
possibly could be utilized by KDE - I have no idea whether there is any point
in launching user dbus session for any other DE).
So the questions are still valid for me:
- what's the purpose of /etc/X11/xinit/xinitrc.d/
- what kind of applications are supposed to use it
- what else (apart from mentioned dbus launch) is expected to land there

Thanks

--
regards
MM
Re: purpose of /etc/X11/xinit/xinitrc.d/ [ In reply to ]
090520 Maciej Mrozowski wrote:
> Reporter of https://bugs.gentoo.org/270250 suggests (via his patch)
> that /etc/X11/xinit/xinitrc.d/ should be utilized like "autorun"
> and that xinitrc.d/* should be sourced by startkde script
> (and presumably any other DE initialization script as well).
> Judging by location it should belong rather to xinit
> (and be sourced somewhere in initrc maybe),
> yet this directory is provided by dbus and at least on my box
> only contains script to launch dbus session instance in user mode
> (so possibly could be utilized by KDE - I have no idea
> whether there is any point in launching user dbus session for another DE).
> So the questions are still valid for me:
> - what's the purpose of /etc/X11/xinit/xinitrc.d/
> - what kind of applications are supposed to use it
> - what else (apart from mentioned dbus launch) is expected to land there

The dir belongs to Dbus

root:509 xinitrc.d> equery belongs /etc/X11/xinit/xinitrc.d
[ Searching for file(s) /etc/X11/xinit/xinitrc.d in *... ]
sys-apps/dbus-1.2.3-r1 (/etc/X11/xinit/xinitrc.d)

so it is unlikely to have any relevance for any other part of the system.

'man dbus-launch' & 'man dbus-daemon' have a lot of info.

HTH

--
========================,,============================================
SUPPORT ___________//___, Philip Webb
ELECTRIC /] [] [] [] [] []| Cities Centre, University of Toronto
TRANSIT `-O----------O---' purslowatchassdotutorontodotca
Re: purpose of /etc/X11/xinit/xinitrc.d/ [ In reply to ]
On Wed, May 20, 2009 at 8:17 AM, Philip Webb <purslow@ca.inter.net> wrote:
> 090520 Maciej Mrozowski wrote:
>> Reporter of https://bugs.gentoo.org/270250 suggests (via his patch)
>> that  /etc/X11/xinit/xinitrc.d/  should be utilized like "autorun"
>> and that  xinitrc.d/*  should be sourced by startkde script
>> (and presumably any other DE initialization script as well).

AFAIK /etc/X11/xinit/xinitrc.d/ works like this already.

--
Fabio Erculiani
Re: purpose of /etc/X11/xinit/xinitrc.d/ [ In reply to ]
Philip Webb <purslow@ca.inter.net> posted
20090520061752.GA4750@ca.inter.net, excerpted below, on Wed, 20 May 2009
02:17:52 -0400:

> The dir belongs to Dbus
>
> root:509 xinitrc.d> equery belongs /etc/X11/xinit/xinitrc.d
> [ Searching for file(s) /etc/X11/xinit/xinitrc.d in *... ]
> sys-apps/dbus-1.2.3-r1 (/etc/X11/xinit/xinitrc.d)

Yes, but note how dirs in general "belong" to packages. Unlike files and
file collision, dirs don't collide, they're simply shared.

Try equery b /usr/share/doc for instance... or in a more directly
parallel to our current dir comparison, /etc/init.d .

The idea is that when a package owning a dir is removed, if the dir is
empty, it too is removed. That's also why certain system dirs have
.keep-<pkg> files in them, so they won't be removed as empty dirs until
that package is removed.

This behavior is actually very handy in some cases, tho. It's easy to
determine how many packages have contents in a particular directory
without equerying every file therein. Especially for long lasting
installations that have been continuously upgraded for years, with
portage's behavior on owned and orphaned files changing a bit over the
years, it's possible various obscure dirs will have content the user
doesn't remember putting there and no package owns. I expect there'll be
several files left over in /usr/kde/3.5 when I finally remove it, for
instance, and being able to confirm for sure that no packages own the dir
any more, or finding the stray KDE 3.5 packages I didn't remove and still
need to, can be very useful before I actually manually delete the
directory and any remaining content itself. This was certainly the case
with /usr/kde/3.4 I know, as I remember cleaning it up.

So, just because dbus owns the dir doesn't mean a thing, in terms of
whether other packages can own and put stuff in it too. Note that I
really don't know much bout /etc/X11/xinit/xinitrc.d and its purposes.
I'm just saying that you can't use the fact that it currently just
happens to belong to dbus, to assume that it's dbus specific. It's quite
possible other packages could make use of it too, but don't on your
system, either because it's a new feature nothing else is using yet, or
because you simply don't have merged any of the other packages that make
use of it.

--
Duncan - List replies preferred. No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master." Richard Stallman
Re: purpose of /etc/X11/xinit/xinitrc.d/ [ In reply to ]
Maciej Mrozowski wrote:
> Hi
>
> Reporter of https://bugs.gentoo.org/270250 suggests (via his patch), that
> /etc/X11/xinit/xinitrc.d/ should be utilized like "autorun" and that
> xinitrc.d/* should be sourced by startkde script (and presumably any other DE
> initialization script as well).
> Judging by location it should belong rather to xinit (and be sourced somewhere
> in initrc maybe), yet, this directory is provided by dbus and at least on my
> box only contains script to launch dbus session instance (in user mode, so
> possibly could be utilized by KDE - I have no idea whether there is any point
> in launching user dbus session for any other DE).
> So the questions are still valid for me:
> - what's the purpose of /etc/X11/xinit/xinitrc.d/
> - what kind of applications are supposed to use it
> - what else (apart from mentioned dbus launch) is expected to land there

Everything that needs to run scripts at X start-up puts those scripts in
/etc/X11/xinit/xinitrc.d/. Also, ConsoleKit places files there too, but
makes them non-executable and the files claim they will be sourced
rather than executed (/etc/X11/xinit/xinitrc.d/90-consolekit).

Maybe you should ask an X.Org list about this.
Re: purpose of /etc/X11/xinit/xinitrc.d/ [ In reply to ]
On Wednesday 20 of May 2009 08:39:35 Fabio Erculiani wrote:
> On Wed, May 20, 2009 at 8:17 AM, Philip Webb <purslow@ca.inter.net> wrote:
> > 090520 Maciej Mrozowski wrote:
> >> Reporter of https://bugs.gentoo.org/270250 suggests (via his patch)
> >> that /etc/X11/xinit/xinitrc.d/ should be utilized like "autorun"
> >> and that xinitrc.d/* should be sourced by startkde script
> >> (and presumably any other DE initialization script as well).
>
> AFAIK /etc/X11/xinit/xinitrc.d/ works like this already.

Only in KDE3 session so far (which is pretty useless for it - it does know
nothing about dbus or consolekit).
If it's about to be executed - is there any corresponding "cleanup" directory?
You know:
- XDG has it's ${XDG_CONFIG_DIRS}/{startup,shutdown}
- KDE has its own private ${KDEDIR}/{env,shutdown}
- there is possibility to use ${KDEDIR}/etc/xdg/{startup,shutdown} as well
(it's not being used yet - maybe we should migrate to XDG completely for KDE -
it's an easy change)

So I guess we already have enough of "autostart" locations - so imho NO
desktop environment should even try to touch xinitrc.d - it belongs to xinit
(even if it's installed by dbus) and xinit should do something with this if it
cares (so far it doesn't).
Therefore I'm removing sourcing of xinitrc.d/* from all startkde scripts
(change will be in overlay for some time).

--
regards
MM