FS#19649 - [gdm] GDM fails to create ~/.Xautority
Attached to Project:
Arch Linux
Opened by Vladimir (Psycho_zs) - Sunday, 30 May 2010, 12:50 GMT
Last edited by Jan de Groot (JGC) - Monday, 21 February 2011, 07:45 GMT
Opened by Vladimir (Psycho_zs) - Sunday, 30 May 2010, 12:50 GMT
Last edited by Jan de Groot (JGC) - Monday, 21 February 2011, 07:45 GMT
|
Details
Description:
GDM fails to create ~/.Xautority Tested on relatively clean system and with new user. Also tried slim and gdm-old: both correctly create ~/.Xautority Additional info: gdm 2.30.2-2 Steps to reproduce: Start gdm daemon, login. stat ~/.Xauthority - it was not created/updated at login time. switch to virtual console, launch: DISPLAY=:0 some_gui_app - it will not be able to connect to running X server. |
This task depends upon
Then how do I tweak it to be able to use cron and launch gui apps from console on specific disaplay?
I've added user to group gdm, it didn't work...
Making echo $XAUTHORITY from console returns empty string on both ubuntu and arch, but in ubuntu I can launch gui apps from console when using gdm. In arch I can't.
How can I fix that?
Do you mean you were able to launch something from console to display?
Add user to gdm group.
Add this command to gnome session in gnome-session-properties:
sh -c "sleep 5s && ln -sf `echo $XAUTHORITY` ~/.Xauthority"
cat << EOF | sudo tee /etc/gdm/PostLogin/Default
#!/bin/bash
auth=\$HOME/.Xauthority
if [ -e \$auth ]; then
diff <(xauth extract - \$DISPLAY) \\
<(XAUTHORITY=\$auth xauth extract - \$DISPLAY) > /dev/null \\
&& exit 0
fi
xauth extract - \$DISPLAY | XAUTHORITY=\$auth xauth merge -
EOF
sudo chmod +x /etc/gdm/PostLogin/Default