Comment 127 for bug 1335492

Revision history for this message
In , Gogo44471 (gogo44471) wrote :

I can confirm that desktop icons order resets. During relogin. As mentioned by Yan Pas in Comment 8.

I do not use any graphical login manager. I start xfce by run startxfce4 from xinit script. I have only one rc file in ~/.config/xfce4/desktop according to my screen size.

Problem does not occur:
- after reboot computer and first time login.
- when I stop and restart xfdesktop (xfdesktop --quit; xfdesktop &)
- when a screen size change.

Problem occurs only when I logout from xfce (AppMenu -> Logout -> Logout) and login again.

After monitoring the problem I found, that rc file contains the correct information about icon positions after log out . But after second login this file is rewrited with incorrect one. I have found a workaround - added this script to Application autostart list:

------------------------------------------------
#!/bin/sh

xfdir="/home/username/.config/xfce4"

# save rc files
rm -rf "/tmp/desktop"
cp -fr "$xfdir/desktop" "/tmp"

# wait xfdesktop starts and rearanges icons
sleep 5

# compare saved files with new
cmp="`diff $xfdir/desktop /tmp/desktop`" #compare

# if xfdesktop rearrange icons, restore rc files
if [ "$cmp" ]; then
 cp -fr "/tmp/desktop" "$xfdir"
 xfdesktop -R #refresh desktop
 notify-send "Icons are restored!"
else
 rm -rf /tmp/desktop-icons
fi
------------------------------------------------