I fix it by setting $HOME in the script, as otherwise it cannot find .Xautorithy
Now I have the files /etc/udev/rules.d/11-docking.rules
ENV{EVENT}=="undock", KERNEL=="dock.0", SUBSYSTEM=="platform", RUN+="/home/vrossum/scripts/disper.laptop_only" ENV{EVENT}=="dock", KERNEL=="dock.0", SUBSYSTEM=="platform", RUN+="/home/vrossum/scripts/disper.dock"
And
/home/vrossum/scripts/disper.dock:
#!/bin/bash export DISPLAY=:0 export HOME=/home/vrossum /usr/bin/disper -i < /home/vrossum/disper.dell
Of course you will have to edit according to your local config.
I fix it by setting $HOME in the script, as otherwise it cannot find .Xautorithy
Now I have the files rules.d/ 11-docking. rules
/etc/udev/
ENV{EVENT} =="undock" , KERNEL=="dock.0", SUBSYSTEM= ="platform" , RUN+="/ home/vrossum/ scripts/ disper. laptop_ only" ="platform" , RUN+="/ home/vrossum/ scripts/ disper. dock"
ENV{EVENT}=="dock", KERNEL=="dock.0", SUBSYSTEM=
And
/home/vrossum/ scripts/ disper. dock:
#!/bin/bash disper. dell
export DISPLAY=:0
export HOME=/home/vrossum
/usr/bin/disper -i < /home/vrossum/
Of course you will have to edit according to your local config.