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
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
|
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.
Thursday, 10 March 2011, 19:12 GMT
Reason for closing: Fixed
Additional comments about closing: Fixed in xorg-xinit 1.3.0-3.
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.
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.
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.
xinitrc.patch (0.3 KiB)
#!/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.