xfdesktop doesn't save the arrangement of desktop icons after a resolution change

Bug #1307251 reported by amigamagic
54
This bug affects 11 people
Affects Status Importance Assigned to Milestone
Xfce4 Desktop
Fix Released
Low
xfdesktop4 (Ubuntu)
Fix Released
Undecided
amigamagic
Nominated for Trusty by Jackson Doak
Nominated for Utopic by Jackson Doak

Bug Description

PACKAGE: xfdesktop
VERSION: 4.11.6-1ubuntu1
(tested on xubuntu 14.04 LTS)
_____________________________

Given that the process "xfdesktop" creates/updates 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".

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: xfdesktop4 4.11.6-1ubuntu1
ProcVersionSignature: Ubuntu 3.13.0-24.46-generic 3.13.9
Uname: Linux 3.13.0-24-generic x86_64
ApportVersion: 2.14.1-0ubuntu2
Architecture: amd64
CurrentDesktop: XFCE
Date: Mon Apr 14 02:34:52 2014
InstallationDate: Installed on 2014-04-12 (1 days ago)
InstallationMedia: Xubuntu 14.04 LTS "Trusty Tahr" - Daily amd64 (20140411)
ProcEnviron:
 LANGUAGE=it
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=it_IT.UTF-8
 SHELL=/bin/bash
SourcePackage: xfdesktop4
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
In , amigamagic (debianmaverick) wrote :

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

Revision history for this message
amigamagic (debianmaverick) wrote :
description: updated
description: updated
Changed in xfdesktop:
importance: Unknown → Low
status: Unknown → Confirmed
Changed in xfdesktop4 (Ubuntu):
status: New → Confirmed
Changed in xfdesktop4 (Ubuntu):
assignee: nobody → amigamagic (debianmaverick)
Revision history for this message
amigamagic (debianmaverick) wrote :

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.

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 othes could try it.

Revision history for this message
In , amigamagic (debianmaverick) wrote :

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. :)

Revision history for this message
In , Eric Koegel (eric-koegel) wrote :

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.

Revision history for this message
In , amigamagic (debianmaverick) wrote :

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. ;)

Revision history for this message
In , Eric Koegel (eric-koegel) wrote :

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.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "bug1307251_patchfix" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
In , amigamagic (debianmaverick) wrote :

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! :)

Revision history for this message
In , Eric Koegel (eric-koegel) wrote :

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 :)

Revision history for this message
In , amigamagic (debianmaverick) wrote :

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. :)

Revision history for this message
In , Eric Koegel (eric-koegel) wrote :
Changed in xfdesktop:
status: Confirmed → Fix Released
Revision history for this message
Thaddaeus Tintenfisch (thad-fisch-deactivatedaccount) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. However, I am closing it because the bug has been fixed in the latest development version of Ubuntu - Utopic Unicorn.

If you need a fix for the bug in previous versions of Ubuntu, please follow the instructions for "Requesting a Backport" at https://wiki.ubuntu.com/UbuntuBackports#Requesting_a_Backport

Changed in xfdesktop4 (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Jussi (jussi-lahtinen-gmail) wrote :

According to Ubuntu policy backports are not for bug fixing.

"The Backports Project is a means to provide new features to users. Because of the inherent stability risks in backporting packages, users do not get backported packages without some explicit action on their part. This generally makes backports an inappropriate avenue for fixing bugs. If a package in an Ubuntu release has a bug, it should be fixed either through the Security Update or the Stable Release Update process, as appropriate."

So, please reopen this and mark it "Fix Committed".

Revision history for this message
tomsam (tomsam) wrote :

This bug has not been fixed for years now (I saw first reports of this from 2010 in the net).
And __no__, it is definitely not fixed.

I just (Sep 4th, 2014) installed a brand new Xubuntu

$cat /etc/os-release
NAME="Ubuntu"
VERSION="14.04.1 LTS, Trusty Tahr"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 14.04.1 LTS"
VERSION_ID="14.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"

$xfdesktop -V
This is xfdesktop version 4.11.6, running on Xfce 4.10.
Built with GTK+ 2.24.23, linked with GTK+ 2.24.23.

and the issue is still there. After a very short time, I have 6 resolution files with resolutions I never used.

~/.config/xfce4/desktop$ ls -1 icons*

icons.screen0-1894x1100.rc
icons.screen0-1904x1097.rc
icons.screen0-1904x1098.rc
icons.screen0-1904x1100.rc
icons.screen0-1904x1147.rc
icons.screen0-1904x1184.rc

but the one with my screen resolution, i.e..

icons.screen0-1920x1080.rc

is still missing.

xfdesktop4 developers: Please, if you are not able to fix this in a normal time frame, how about an option that instructs xfdesktop to just use a plain single name (instead of one with resolutions)

Thanks
tomsam

Revision history for this message
Jussi (jussi-lahtinen-gmail) wrote :

@tomsam
Correct, the fix exist, but it is not released. This bug report has wrong status, it should have "fix committed".

Revision history for this message
Thaddaeus Tintenfisch (thad-fisch-deactivatedaccount) wrote :

An updated package is now available in trusty-proposed. Please look at bug 1365965 and follow the instructions to test the new version.

Revision history for this message
Martin Spacek (mspacek) wrote :

I just tried installing the proposed xfdesktop 4.11.8 package from bug 1365965, and so far, it seems to work. I'm not exactly sure what triggered the icon rearrangement on reboot (it wasn't necessarily a screen resolution change), so I'll report back if I have any further problems.

Revision history for this message
Martin Spacek (mspacek) wrote :

I just had icon positions reset on me on reboot, so it seems this bug is not fixed after all in xfdesktop 4.11.8.

Revision history for this message
Martin Spacek (mspacek) wrote :

Also, note that I have "Save session for future logins" disabled in the log out dialog. Not sure if that should matter. I imagine it shouldn't. Icon positions should always be saved between reboots.

Revision history for this message
Yetisaurus Akjas (eduard-budai) wrote :

I can confirm that the icons' position is not remembered after reboot(restart) on a laptop with Xubuntu 14.04 with xfdesktop4 4.11.8-0ubuntu0.1 i386, although it is remembered after logout&login.

Revision history for this message
Goth Queen (artistbraab) wrote :

I'm afraid I too have to report that I had rearranging icons (back to left in default position) after reboots on 2 boxes for a week or so now. I'm on Xubuntu 14.04.2 LTS, Linux version 3.13.0-46-generic, with xfdesktop 4.11.8-0ubuntu0.1 amd64.

In addition to my icons resetting to default position after every (re)boot, I'm afraid I also have to report that, although my desktop dimensions are icons.screen0-3824x1039, I'm only able to place icons ("make them stick") on the left screen/ desktop of the two 1920x1080 screens.

Revision history for this message
bheka (bheka) wrote :

Yesterday I upgraded my xubuntu 13.10 to 14.04.2 LTS and my icons also rearranging every reboot but not at relogin.

Revision history for this message
Jonners59 (jonathan-l-harrison) wrote :

I have the same issues. I raised a Question on the Ubuntu Forum some weeks ago but no one has sent any help, then I found this.. It is so annoying!!!! Based on what I have read here, I am going to try deleting all the conf files and so a save session, see if that works.

Revision history for this message
Jonners59 (jonathan-l-harrison) wrote :

Interestingly. I tried that. I had to create a folder and delete it and then it saved a new config. Shall reboot and see what happens.

Revision history for this message
Jonners59 (jonathan-l-harrison) wrote :

That worked. It seems, for now, to load as I had set everything out. Thanks guys.

Revision history for this message
tomsam (tomsam) wrote :

Not really know, what you thank for, Jonathan. I just installed a distro with xfdesktop 4.12.2 on it, and the wrong behaviour (incorrect icon arrangement) is still there. So, nothing has been done to fix this problem, neither have I gotten an answer to my proposal to have an option for a single icons.rc file (see above), which might solve the issue for the most of us.

Revision history for this message
Beth (beth-arronaz) wrote :

I'm facing the same problem with Manjaro 15.12. The icons get rearranged at every reboot, but keep their positions when simply logging out.

Revision history for this message
FerVira (vira) wrote :

Bug still present in 16.04. The icons get rearranged at every reboot, but keep their positions when simply logging out.
I agree that this bug report has wrong status, it should have "fix committed". Please anyone who can, change it!

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

Other bug subscribers

Remote bug watches

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