Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 499738 - x11-misc/slim should not run xinitrc.d* files
Summary: x11-misc/slim should not run xinitrc.d* files
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Robert Pearce
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-30 06:37 UTC by Gino McCarty
Modified: 2023-03-14 19:39 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gino McCarty 2014-01-30 06:37:18 UTC
Slim should not be executing xinitrc.d* prior to running /etc/Session/foo files.

This causes xinitrc.d file to be executed twice.. which can cause issues.
it also causes dbus and *kit modifications to $command variable to appear invalid

For example with slim Xsession $command becomes

exec dbus-launch --sh-syntax --exit-with-session /etc/Session/awesome

but it in fact should be processed inside /etc/Session/awesome which results in

exec dbus-launch --sh-syntax --exit-with-session /usr/bin/awesome
the correct result..

Also depending on what your xinitrc.d* files are doing executing them twice can cause undesirable behavior..

It makes sense the /etc/X11/Session/* should be doing this, it also helps non - DM users, who will need these files processed..

please modify /usr/share/slim/Xsession and remove parsing of /etc/X11/xinit/xinitrc.d/* section

Reproducible: Always
Comment 1 Gino McCarty 2014-01-30 06:39:14 UTC
this bug also effects lxdm and lightdm
Comment 2 Ian Stakenvicius (RETIRED) gentoo-dev 2014-01-31 03:16:59 UTC
Do you have any reference as ro why yoi think the issue is with virtually all of the DM's in the portage tree rather than with the awesome /etc/X11/Sessions/ script?

I havent done a full audit of all session scripts but the ones i have checked do not source the xinitrc.d files.
Comment 3 Gino McCarty 2014-01-31 19:37:23 UTC
(In reply to Ian Stakenvicius from comment #2)
> Do you have any reference as ro why yoi think the issue is with virtually
> all of the DM's in the portage tree rather than with the awesome
> /etc/X11/Sessions/ script?
> 
> I havent done a full audit of all session scripts but the ones i have
> checked do not source the xinitrc.d files.

I originally agreed with you and filed the bug against awesome,

https://bugs.gentoo.org/show_bug.cgi?id=498976

but it turns out that it makes sense for users of startx should want to run these files.  This cannot occur with xinitrc.d/* being processed only by DM

In the past /etc/X11/xinit/xinitrc.d/* just contained environment variable assignment, which wasn't a huge issue to execute twice. But lately it execute some processes.. without this proper distinction, these things execute twice.

This bug post here also outlines a valid issue with dbus and DM execution of xnitrc.d/* 
unless the /usr/share/sessions/* file directly references an executable and not another shell script, dbus will modify the WM execution line improperly.

I haven't checked all WM's for this behavior... not all WM's use Session files
Comment 4 Ian Stakenvicius (RETIRED) gentoo-dev 2014-06-09 19:52:34 UTC
(In reply to Harvey Mittens from comment #3)
> (In reply to Ian Stakenvicius from comment #2)
> > Do you have any reference as ro why yoi think the issue is with virtually
> > all of the DM's in the portage tree rather than with the awesome
> > /etc/X11/Sessions/ script?
> > 
> > I havent done a full audit of all session scripts but the ones i have
> > checked do not source the xinitrc.d files.
> 
> I originally agreed with you and filed the bug against awesome,
> 
> https://bugs.gentoo.org/show_bug.cgi?id=498976
> 
> but it turns out that it makes sense for users of startx should want to run
> these files.  This cannot occur with xinitrc.d/* being processed only by DM
> 

Users of startx are already sourcing these files -- if you look at /etc/X11/xinit/xinitrc (which is used by xinit/startx) , it sources all of the xinitrc.d/* files.  Slim doesn't use xinit, which is why these files need to be sourced by it's session script.

However, I do think I see the issue now -- the double-sourcing is occurring because xinitrc.d/* is actually only supposed to run when $command *isn't* a session script (ie, isn't from /etc/X11/Sessions/).  Since recently slim changed to use session *.desktop files by default instead of only /etc/X11/Sessions scripts, I expect this code is now running even when it shouldn't.

I'll see if I can figure something out.