Arch Linux

Please read this before reporting a bug:

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!

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


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/ 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);a=blob;f=xinitrc-common;h=888c42a963cbc17d869b31a1ba6c5b1093259a82;hb=master

while other seem to patch the login managers

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):


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

In ~/.xinitrc you just need to put:

It's like 2) but a bit cleaner.