I'm wondering if is there any way to have a functionality like in KDE: I can set icons to be "locked", so they will not change of location. But in XFCE when I start a game in 800*600 resolution and then return to the desktop it's all messed up. Any solution to this?

Thank's for your time

  • It seems like a size of desktop icons have influence on this issue. I've got 1920x1080 resolution on my Xubuntu 14.04 and I've changed desktop icons size to 41, for better look and properly arrange of icons position. It looks like this is a reason of my problem with icons on desktop. – user440821 Aug 18 '15 at 11:07

I found a solution on the Ubuntu forums (it's a link from the link Michael Barlach provided).

  • First run this in a terminal:

    sudo chattr +i ~/.config/xfce4/desktop/icons*
  • This will lock your icon placement, so that when the desktop is resized, your icons technically remain in the same place.

  • When your desktop gets resized, press F5 to reload it.
  • Optionally, you can create a launcher on the panel with this command: xfdesktop --reload which will reload the desktop.

If you need to reverse the lock on your icon placement run:

sudo chattr -i ~/.config/xfce4/desktop/icons*
| improve this answer | |

An alternative approach without the need for repeated use of "sudo chattr" is described here: http://odoepner.wordpress.com/2012/03/08/backuprestore-xfce-desktop-icons/

What that says is:

Create a file (e.g. save-xfce-desktop-icons.sh) with this content:

#! /bin/sh
mkdir -p ~/.config/xfce4/desktop.bak
cp -f ~/.config/xfce4/desktop/icons* ~/.config/xfce4/desktop.bak

and another one (e.g. load-xfce-desktop-icons.sh):

#! /bin/sh
cp -f ~/.config/xfce4/desktop.bak/icons* ~/.config/xfce4/desktop

Make the scripts executable and in the XFCE start menu, go to “Settings” – “Keyboard” – “Application Shortcuts” and configure 2 keyboard shortcuts for them.

| improve this answer | |

Here is something that worked for me.

I noticed that the problem appeared when I created a panel along the upper side of the screen. When I changed this panel from 32 pixels to 40 pixels, it solved the issue. I noticed that the icons sometimes got slightly under the panel what gave me the idea of trying to change the size of the panel. Hope this can help others and maybe help identify the origin of the bug.

| improve this answer | |

I had the same issue on my Xubuntu 14.04 (Italian GUI). Obviously the other solutions in this page work, but they're a workaround. Surprisingly I was able to solve it by logging out after having checked the checkbox ("Save the session for next accesses"), disabled automatic logon (i.e. the feature that allows to log on without typing the password) and the relogging on. After this, I disabled automatic logon, logged out and then logged in again, choosing this time not to use the saved session. From then, all my desktop icons remain in the places I need them to be at each reboot, relog, etc.

Don't ask me why this happens, I'm happy enough to have solved my issue.

All the best

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.