FS#19038 - [xorg-xinit] Scripts in /etc/X11/Xsession.d are not executed after xorg start

Attached to Project: Arch Linux
Opened by Maciej Sitarz (macieks2) - Sunday, 11 April 2010, 09:52 GMT
Last edited by Jan de Groot (JGC) - Thursday, 10 March 2011, 19:12 GMT
Task Type Feature Request
Category Packages: Extra
Status Closed
Assigned To Jan de Groot (JGC)
Andreas Radke (AndyRTR)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 4
Private No

Details

Description:
I think most distrubutions provide possibility to execute a script after Xorg start (ex. Fedora).
In Arch there's no /etc/X11/Xsession.d directory and after creating it scripts placed there are not executed after xorg start.

Additional info:
* package version(s)
xorg-apps 7.5-3
xorg-server 1.7.6-3
xorg-twm 1.0.4-3
xorg-xdm 1.1.9-3
xorg-xinit 1.2.1-1

Steps to reproduce:
1. Create a simple executable script /etc/X11/Xsession.d/test.sh containing "date > /var/log/test.log"
2. Restart X
3. Check if /var/log/test.log exists
This task depends upon

Closed by  Jan de Groot (JGC)
Thursday, 10 March 2011, 19:12 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed in xorg-xinit 1.3.0-3.
Comment by Neil Munro (niadh) - Friday, 14 May 2010, 23:47 GMT
Is not the Arch equivalent simply /etc/X11/xinit/xinitrc.d?

Update: I can confirm that this worked for me, put an executable script you want to run in this directory, log out then back in again.
Comment by Maciej Sitarz (macieks2) - Tuesday, 20 July 2010, 05:34 GMT
It's not working for me.

There are already some scripts there:
# pacman -Qo /etc/X11/xinit/xinitrc.d/*
/etc/X11/xinit/xinitrc.d/30-dbus is owned by dbus 1.2.24-1
/etc/X11/xinit/xinitrc.d/40-libcanberra-gtk-module is owned by libcanberra 0.23-1

But they are not executed.
Comment by Andreas Radke (AndyRTR) - Sunday, 19 December 2010, 13:28 GMT
I see two possible solutions:

1) we change the upstream behavior in xinitrc.cpp or
2) we source our own what we want in our custom local .xinitrc

Fedora goes 2) http://pkgs.fedoraproject.org/gitweb/?p=xorg-x11-xinit.git;a=blob;f=xinitrc-common;h=888c42a963cbc17d869b31a1ba6c5b1093259a82;hb=master

while other seem to patch the login managers http://bugs.gentoo.org/show_bug.cgi?id=77504

We could also ask upstream to implement it into xinitrc.cpp when this is proved to work well. Please test both solutions with an without display managers.
Comment by Eric Belanger (Snowman) - Tuesday, 08 February 2011, 19:09 GMT
I did the following for the keytouch package. Create a /etc/X11/Xsession script and chmod it 755 (we could also add the /etc/X11/xinit/xinitrc.d directory to loop):

#!/bin/sh

for script in /etc/X11/Xsession.d/*; do
if [ -x $script ]; then
. $script
fi
done
unset script

In ~/.xinitrc you just need to put:
/etc/X11/Xsession

It's like 2) but a bit cleaner.

Loading...