Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question
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*
share|improve this answer

An alternative approach without the need for repeated use of "sudo chattr" is described here:

What that says is:

Create a file (e.g. 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.

#! /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.

share|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.

share|improve this answer Gives the answer

share|improve this answer
Welcome to Ask Ubuntu! Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. – RolandiXor Feb 10 '12 at 16:09

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

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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