Xfce4 mess up with icon positions

Bug #1190990 reported by Jussi on 2013-06-14
70
This bug affects 16 people
Affects Status Importance Assigned to Milestone
xfdesktop
Fix Released
Low
xfdesktop4 (Ubuntu)
Undecided
Unassigned

Bug Description

Everytime when screen resolution changes, or occasionally when rebooted, icons are automatically rearranged.
This is very annoying for people who have a lot of icons on desktop, or for who wants to keep icons in order.

ProblemType: Bug
DistroRelease: Ubuntu 13.04
Package: xfdesktop4 4.10.2-0ubuntu1
ProcVersionSignature: Ubuntu 3.8.0-25.37-generic 3.8.13
Uname: Linux 3.8.0-25-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.9.2-0ubuntu8.1
Architecture: amd64
Date: Fri Jun 14 15:30:13 2013
InstallationDate: Installed on 2010-12-17 (909 days ago)
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Release amd64 (20101007)
MarkForUpload: True
SourcePackage: xfdesktop4
UpgradeStatus: Upgraded to raring on 2013-05-06 (38 days ago)

Jussi (jussi-lahtinen-gmail) wrote :
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in xfdesktop4 (Ubuntu):
status: New → Confirmed
Sean Clarke (sean-clarke) wrote :

I am experiencing this with around 7 Ubuntu (unity) desktop installs - is the bug as reported just affecting XFCE?

Jussi (jussi-lahtinen-gmail) wrote :

This is reported to affect xfdesktop4 (Desktop manager of Xubuntu),
but if it really is problem also with Ubuntu, then I'm not sure what to blame... maybe they are two different bugs?

xfdesktop saves icon positions per screen resolution and should restore the layout once the same resolution is applied again. An upstream bug report (feature request) might be required to fix or improve the current behavior.

https://bugzilla.xfce.org/

Initial upstream report: https://bugzilla.xfce.org/show_bug.cgi?id=6149 (fixed)

So, does xfdesktop not restore the icon layout per screen resolution like it is intended?

Changed in xfdesktop4 (Ubuntu):
status: Confirmed → Incomplete
Jussi (jussi-lahtinen-gmail) wrote :

I haven't experience this problem recently. So it might be fixed. However they say the fixed version is 4.6.1 and bug was reported of 4.10.2 (which is still the recent). So at least it wasn't fixed with that release! Or the bug depends on certain configuration or other component than xfdesktop.

I think it's best to leave this open for awhile to wait potential complaints from other users.

So, anyone still experiencing this problem?

Jussi (jussi-lahtinen-gmail) wrote :

OK, I found this:
https://bugzilla.xfce.org/show_bug.cgi?id=9192

I think the bug really is fixed for all.

Jussi (jussi-lahtinen-gmail) wrote :

No further complains, report in bugzilla claims it's fixed and I can confirm this on my own system.

Changed in xfdesktop4 (Ubuntu):
status: Incomplete → Fix Released
Bart (bart12) wrote :

I'm still affected. (Xubuntu 12.10 / 64). Whenever I reboot all icons on the desktop rearrange themselves to the left side of the screen.

Jussi (jussi-lahtinen-gmail) wrote :

Xubuntu 12.10 is not long term support release, and loses its support tomorrow (1.4). So I don't think the bug fix is going to be backported. Please upgrade your system.

However, what about Xubuntu 12.04? Anyone knows?

Bart (bart12) wrote :

Too bad. But I suppose in 13.04 this issue will sill get fixed? (I don't want 13.10 on my laptop yet). And can the fix somehow be implemented manually in 12.04?
I do have a PC running 13.10. That one seems to remember its icon locations on the desktop.

Elfy (elfy) wrote :

13.04 is EOL. Only current versions are 12.04/12.10/13.10

Jussi (jussi-lahtinen-gmail) wrote :

One option is to uninstall xfdesktop. Get the source code, then compile and install it. I don't know how painful this would be. This also means you would have to update it manually. I don't recommend to do it, unless you really know what to do.

Not sure if there are ready binary packages for xfdesktop, that would be easier way.

I have been on Xubuntu 13.10 quite long time and it has worked fine. So upgrading might be the easiest option.

Bart (bart12) wrote :

Upgrading is not that easy. There's always a lot of re-installing and tweaking of installed software involved and besides that the fan of that laptop needs to be cleaned first (which involves a total dismantling and reassembling of it) as I don't want to it stop half-way during upgrading due to high CPU-temps. That could be pretty disastrous. All that just takes too much time at the moment.
Wouldn't it be possible to just copy and transplant the necessary files from my 13.10/64 desktop to my 12.10/64 laptop and then reboot? I (roughly) compared the dependencies and there doesn't seem to be much difference between them, so this might work. Or am I just being completely clueless here (you wouldn't surprise or upset me if you said I am ;-) ?

Jussi (jussi-lahtinen-gmail) wrote :

Some of your applications might depend on certain version of xfdesktop, but I doubt it would be the case.
Also not sure how update manager would react... I think the biggest worry is about configs, if they have changed with newer version of xfdesktop, you might mess up things. But of course you can try it, just take back up of the original binaries and possible configs.

Upgrading shouldn't require re-installing or tweaking..? You are prompted to keep your old configs. Also I would clean the fan anyway! And there is always the option to just deal with messy icon positions.

But you do as you please. However this is not right place for technical support for such hacking.

-------------------------
PACKAGE: xfdesktop
VERSION: 4.11.6-1ubuntu1
-------------------------

Given that the process "xfdesktop" creates a file in ~/.config/xfce4/desktop whenever the user moves or creates an icon on the desktop, I found the following anomalies:

1) I noticed that if I change the position of an icon, it will not be saved immediately in the appropriate file in ~/.config/xfce4/desktop, but only after about 8 seconds. This delay determines that if I move an icon, and right after that I log out (before 8 seconds have elapsed), after the log in I will find that icon in the position it was before the last placement.

2) Suppose you have a particular personal arrangement of icons. Now, if you set a screen resolution never used so far, bigger than the previous one, the icons will be correctly arranged as they were before the resolution change. However, now if you don't touch the desktop anymore (I mean you don't have to move/edit/create icons) and you log out, at the following log in you will find that the icons have been rearranged on the left side of the screen and reordered alphabetically. It's happened because after the resolution change, xfdesktop did not create the appropriate file in "~/.config/xfce4/desktop". This file was created only after the next login (when it was too late for xfdesktop to know the previous icons placement), so at this point xfdesktop makes an automatic standard arrangement of the icons on the left side of the screen (losing your previous arrangement). This would not have happened if xfdesktop had created the new .rc file immediately after the resolution change.

3) The files that are created in ~/.config/xfce4/desktop should include the resolution values in their names. But actually they ​​do not correspond to the actual res values. For example, if I use a resolution of 1024x768, the file created will be called "icons.screen0-1008x720.rc", instead of "icons.screen0-1024x768.rc".

Created attachment 5435
Proposed patch fix for icon saving problems

Ok, problem n.3 is not a real problem. It's only a cosmetic one, so I tried to solve (1) and (2) myself and created a patch that does the something:

 1) Alter the SAVE_DELAY factor from 7 seconds to 1 second, so that when you
    change/move some icon on the desktop, you don't have to wait anymore 7
    seconds before xfdesktop saves the icons and you can safely logout.

 2) When you change your screen resolution with one never used so far,
    now xfdesktop will save your icon positions even if you don't change
    the icons positions before logout.

These two modifications should solve problem 1 and 2 in the description of the bug.
For now I'm using the patch myself without problems, but I would be glad if others could try it and if the developers could take a look at the patch to confirm that it's all right with my mods. Thanks. :)

Thanks for writing a patch for this! A quick note:

xfdesktop_move_all_cached_icons_to_desktop(XfdesktopIconView *
{
#ifdef ENABLE_FILE_ICONS
    GList *l, *leftovers = NULL;
    XfdesktopFileIconManager *fmanager = NULL;

    TRACE("entering");

    if(XFDESKTOP_IS_FILE_ICON_MANAGER(icon_view->priv->manager))
        fmanager = XFDESKTOP_FILE_ICON_MANAGER(icon_view->priv-

    if(fmanager == NULL)
        return;

+ xfdesktop_file_icon_save(fmanager);

If we add the save function there you won't need the if check.

I don't forsee any issues with your patch, but I won't have time
to fully test this patch until the weekend, I just wanted to provide
some quick feedback. If you're ok with my proposed change, either
you or I can turn the diff into a git formatted patch for inclusion
into xfdesktop.
http://docs.xfce.org/contribute/dev/git/start provides info and
links if you've never worked with git before and want to.

Created attachment 5437
Proposed patch fix for icon saving problems - Version 2 -

Thanks Erik! You are right, we can save a check placing the "xfdesktop_file_icon_save(fmanager)" function call after that if. Nice one! :)

I prepared the diff file as described in that link. It's attached to this message. ;)

Created attachment 5439
Fix icon position saving on resolution change

So I got the time to actually test the patch out and it works great, thanks. I turned it into a full git patch, so instead of doing:
git diff > ~/fix-for-bug-1234.patch

you can do:

git add -u
git commit
git format-patch -1

Those commands will 1) stage your changes, 2) commit them (and allow you to add a header and get credit for your work), and then 3) pull the patch out so it can be added to xfdesktop's code directly. This may be helpful if you write more patches for git based projects in the future.

If ypu're ok with the header I put on your patch, I'll commit it to xfdesktop. Thanks again.

Thanks Eric, I'm glad that it works. :)
Of course you can commit it but, if it's possible, I would ask you to place my real name in the credits beside the nickname. So, instead of just:

From: amigamagic <email address hidden>

I would want it to be something like:

From: Mauro Giubileo AKA amigamagic <email address hidden>

Thanks! :)

Do you want the AKA amigamagic part? Most people seem to
just use their name. You can also do the git add/commit
stuff to format the patch header how you like and I'll
push that to master :)

I'm also experiencing this issue with Xubuntu 14.04 LTS

Ok, you can take out the 'amigamagic' part and keep only my name.
I think the rest of the header is good as it is in your attachment. :)

Jussi (jussi-lahtinen-gmail) wrote :

Please give more details of your problem.
In what situation this occurs? Can you reproduce it? If you can please give exact steps to do so.

Changed in xfdesktop4 (Ubuntu):
status: Fix Released → Incomplete
Alistair Buxton (a-j-buxton) wrote :

This is bug https://bugzilla.xfce.org/show_bug.cgi?id=10813 - which was a recent regression, also fixed in the past couple of days.

Changed in xfdesktop4 (Ubuntu):
status: Incomplete → Confirmed
Changed in xfdesktop:
importance: Unknown → Low
status: Unknown → Fix Released
Jussi (jussi-lahtinen-gmail) wrote :

Rafael Muñoz Rodríguez report this bug to be still issue with 14.04. And according to the comments of bugzilla report the affected version of xfdesktop is 4.11.6-1ubuntu1. Which is still in use in 14.04.

Changed in xfdesktop4 (Ubuntu):
status: Confirmed → Fix Committed
Santiago Romero (sromero) wrote :

Under Linux Mint 17 (based on Ubuntu 14.04), is still happening.

After arranging all the icons in my favourite positions, I pressed F5 and everything moved to the left in vertical lines of icons :-(

I *really* love XFCE over all the things I've used in the past (icewm, kde1b4, kde2 and gnome2) but I really dislike this behaviour :(

Brian Hilmers (bhilmers) wrote :

Problem exists in Unbuntu Studio 14.04 with XFCE 4.10. Hoping to get some sort of fix I can apply to fix this major break in functionality.

gordon (gordon-gunn) wrote :

Okay this is Not a ubuntu bug it is a xfce bug.
I have tried xubuntu 14.04 and first encountered this bug, since then I have tried 12.04 with the new xfce desktop and the bug was there and manjaro xfce is also affected by this bug.
I have not noticed the bug on my medion pc tower (ubuntu studio) but every laptop that I have tried has experienced this bug. I can't confirm if the bug was present in the tower os as I reinstalled 12.04 to get get back features and were disabled in the upgrade.

Jussi (jussi-lahtinen-gmail) wrote :

@gordon
The bug report is written to affect xfdesktop4, which is xfce component. But actually this is ubuntu problem. Since there is fix for xfdesktop4, but no one is willing apply the fix for xubuntu.

Jussi (jussi-lahtinen-gmail) wrote :

PS. Bug duplicate status is removed due incorrectly applied "fix released" status. Fix is committed, not released.

Thomas Schweikle (tps) wrote :

This bug is there now from 12.04.1 up to 15.04. It is not fixed and alive mangeling my desktop icons every start!

Thomas Schweikle (tps) wrote :
Jussi (jussi-lahtinen-gmail) wrote :

An update from Thaddäus Tintenfisch (thad-fisch):
"An updated package is now available in trusty-proposed. Please look at bug 1365965 and follow the instructions to test the new version."

The new version should be available for trusty now.

If you still encounter this bug, please subscribe to bug 1335492.

Changed in xfdesktop4 (Ubuntu):
status: Fix Committed → Fix Released
WhereIsMyMindAT (e8d6dd44) wrote :

This bug is still effecting me (both 14.04.01 and 14.04.02) as of Feb 28th, 2015.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.