where does linux mint 19.1 xfce save desktop icon order

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
minty_22
Level 2
Level 2
Posts: 97
Joined: Sat Nov 05, 2016 2:07 pm

where does linux mint 19.1 xfce save desktop icon order

Post by minty_22 »

i am finding that often the order of the icons on my desktop loose their order, so i am often rearranging them again, its really annoying, im not sure what's causing this,

anyways, where exactly can i find the config file where it stores the order of the desktop icons,

i want to make a backup and quickly restore it after they loose order, this way i don't spend anymore time rearranging them

is it one of those file fonud in?:

/home/minty/.config/xfce4/xfconf/xfce-perchannel-xml/


help!
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
minty_22
Level 2
Level 2
Posts: 97
Joined: Sat Nov 05, 2016 2:07 pm

Re: where does linux mint 19.1 xfce save desktop icon order

Post by minty_22 »

i found it! its the whole folder called "desktop" in

/home/minty/.config/xfce4/


i made a backup of that folder, then i moved icons around, restarted, then replaced the desktop folder and my icons went back to the normal place

im not sure what's causing it that to happen, possibly, i was messing around with the display settings,

anyways that seems to work! will save me lots of wrist pain from moving icons around
slavko
Level 2
Level 2
Posts: 53
Joined: Thu Mar 24, 2016 4:15 pm

Re: where does linux mint 19.1 xfce save desktop icon order

Post by slavko »

It happens occasionally on every Xfce system I installed. It's a known Xfce problem. I have a script (which I execute with keyboard shortcuts) that fixes icons when it happens. Maybe you will find it useful:

Code: Select all

#!/bin/bash
#
# purpose     : back up & restore desktop icons positions, in case xfdesktop mess them up
# installation: copy to /usr/local/bin; make keyboard shortcuts
# usage       : desktop-icons -b  (back up positions)
#               desktop-icons -r  (restore positions)
# version     : 1.0  (March 2012) - Oliver Doepner, original idea
#               1.1  (January 2016) - unknown author, script
#               1.2  (September 2018) - Slavko, cleaning & documenting


DIR_BACKUP=~/.config/xfce4/desktop.backup
DIR_CONFIG=~/.config/xfce4/desktop

# back up positions

if [ "$1" = -b ]; then
    mkdir -p $DIR_BACKUP
    cp -f $DIR_CONFIG/icons* $DIR_BACKUP
#   notify-send -i gtk-add "Icons positions BACKED UP!" " "
    notify-send -i winecfg "Icons positions BACKED UP!" " "
fi

# restore positions

if [ "$1" = -r ]; then
    cp -f $DIR_BACKUP/icons* $DIR_CONFIG
    xfdesktop -R
    set -- $DIR_BACKUP/icons*
#   notify-send -i gtk-refresh "Icons positions RESTORED!"\
#       "(Using back up from  `date -r $1 +%Y-%m-%d\ \ %H:%M:%S`)"
    notify-send -i wine "Icons positions RESTORED!"\
        "(Using back up from  `date -r $1 +%Y-%m-%d\ \ %H:%M`)"
fi
Obviously, name of the script would be 'desktop-icons' and it takes care of both back-up and restore process.
tovian
Level 5
Level 5
Posts: 630
Joined: Sun Nov 22, 2015 1:17 pm
Location: Heart of Dixie

Re: where does linux mint 19.1 xfce save desktop icon order

Post by tovian »

I am trying to use the script on my system. When I run the script(s) I get the appropriate message in the upper-right corner...
either "icons positions BACKED UP!" or "icons positions RESTORED!"
but nothing actually happens.
Is a re-boot required ?


OS on my "Test" Machine:

System: Kernel: 5.4.0-70-generic x86_64 bits: 64 compiler: gcc v: 9.3.0 Desktop: Xfce 4.14.2
tk: Gtk 3.24.13 wm: xfwm4 dm: LightDM Distro: Linux Mint 20.1 Ulyssa
base: Ubuntu 20.04 focal


EDIT: Nevermind... I will use "Desktop Mavin". If that does not work on a particular DE then I just won't use that DE.
“I think that this situation absolutely requires a really futile and stupid gesture be done on somebody's part"
"We're just the guys to do it”

Animal House
tovian
Level 5
Level 5
Posts: 630
Joined: Sun Nov 22, 2015 1:17 pm
Location: Heart of Dixie

Re: where does linux mint 19.1 xfce save desktop icon order

Post by tovian »

No matter what I do I cannot get XFCE to honor my preference for desktop icon locations... XFCE just re-orders my icons where IT wants them regardless of my preference. I have tried numerous ways to correct this but all to no avail. Oddly, this problem was apparently recognized (AND SOLVED) by Microsoft Windows almost from the first edition over 30 years ago. It seems that a number of Linux distro's have this same issue and cannot (or will not) fix it. I could not be less interested in what THEY think is the right way to order my desktop icons so it's time to move on (there's just too many fish in the sea) !!

So long, XFCE... Good Luck in the future.
“I think that this situation absolutely requires a really futile and stupid gesture be done on somebody's part"
"We're just the guys to do it”

Animal House
minty_22
Level 2
Level 2
Posts: 97
Joined: Sat Nov 05, 2016 2:07 pm

Re: where does linux mint 19.1 xfce save desktop icon order

Post by minty_22 »

Yes. I gave up as well. I dont keep icons on the desktop anymore

Im still using xfce except instead of having icons on the desktop i added extra panel on the sides left and right vertical edge of monitors. Then i added individual lanucher and added icons to them.

Here's how it looks
monitor-right2-min.png

I run many monitors at once so the panels work great. There is still some problems but better then the desktop issue
tovian
Level 5
Level 5
Posts: 630
Joined: Sun Nov 22, 2015 1:17 pm
Location: Heart of Dixie

Re: where does linux mint 19.1 xfce save desktop icon order

Post by tovian »

That's a pretty cool solution. Sadly, I can have but little confidence in a system that is unable to implement a solution to such an old problem. I don't want to "adjust" to one thing just to have some other long-time unsolved problem hit me in the face later on.

Let us all go and seek new problems.
“I think that this situation absolutely requires a really futile and stupid gesture be done on somebody's part"
"We're just the guys to do it”

Animal House
ajgreeny
Level 7
Level 7
Posts: 1641
Joined: Mon Nov 19, 2007 3:27 pm

Re: where does linux mint 19.1 xfce save desktop icon order

Post by ajgreeny »

You can make the files in the .config/xfce4/Desktop which have names starting with icons immutable with command

Code: Select all

sudo chattr +i .config/xfce4/Desktop/icons*
which means that if the icons move you can return them to their correct position simply with F5.

I used to do this but for years now i have also had a left side vertical panel with 20 or so launchers on it leaving the desktop free for useful instances of conky displays of system information.
Reddog1
Level 7
Level 7
Posts: 1903
Joined: Wed Jun 01, 2011 2:12 pm

Re: where does linux mint 19.1 xfce save desktop icon order

Post by Reddog1 »

I'm no help here because I've used Xfce exclusively for over 10 years and I've never seen this (desktop icons moving around on their own). The one exception is if I change Icon size, then they don't rearrange, but will change positions to occupy a different part of the screen. Window manager related, maybe?
User avatar
secureIT
Level 4
Level 4
Posts: 471
Joined: Wed Dec 05, 2018 1:26 pm

Re: where does linux mint 19.1 xfce save desktop icon order

Post by secureIT »

I am on LM 20.1 Xfce and never noticed, that the positions of the desktop-icons were messed up.
(But i have only 2 system-icons on the desktop.)

But anyway : there seems to be a problem with messed up icon-positions for some of you ....

I cleaned up the script from slavko and created a little yad-gui for it.
note: you have to install yad to run it.

put it in your home folder into the directory bin (~/bin) and make it executeable.
then append it to a launcher

if the bin-folder doesnt exist in your home-folder .... simply create it.

If you made a backup before - the restore function will rearrange messed up positions of the desktop-icons on the fly.
so you dont have to reboot.

Code: Select all

#!/bin/bash
#
# purpose     : back up & restore desktop icons positions, in case xfdesktop mess them up
# installation: copy to ~/bin and make it executeable
# dependencies: yad
#
# version : 1.0   (March 2012) - Oliver Doepner, original idea
#               1.1   (January 2016) - unknown author, script
#               1.2   (September 2018) - Slavko, cleaning & documenting
#               1.2.1 (April 2020) LM-Version - secureIT , cleaned for LM Xfce and created a yad-dialog
#
#
DIR_BACKUP=~/.config/xfce4/desktop.backup
DIR_CONFIG=~/.config/xfce4/desktop
yad --title="Xfce-utility" --text="backup or restore positions of desktop-icons" --button=gtk-cancel:1 --button="backup":2 --button="restore":3

choice=$?
#
#   cancel
#
[[ $foo -eq 1 ]] && exit 0
#
#   backup positions of desktop-icons
#
if [[ $choice -eq 2 ]]; then
mkdir -p $DIR_BACKUP
    cp $DIR_CONFIG/icons* $DIR_BACKUP
    notify-send -i gtk-add "icon-positions BACKED UP!" " "
#   notify-send -i winecfg "icon-positions BACKED UP!" " "
#
#   restore positions of desktop-icons ( first check if a backup exists)
#
elif [[ $choice -eq 3 ]]; then
    if [ ! -d "$DIR_BACKUP" ]; then
    notify-send -i gtk-dialog-info "No Backup found !
    For doing a restore
    you first have to create a backup" 
    exit 9999 # die with error code 9999
fi
    cp -f $DIR_BACKUP/icons* $DIR_CONFIG
    xfdesktop -R
    set -- $DIR_BACKUP/icons*
    notify-send -i gtk-refresh "icon-positions RESTORED!"\
        "(Using back up from  `date -r $1 +%Y-%m-%d\ \ %H:%M:%S`)"
#   notify-send -i wine "icons-positions RESTORED!"\
#       "(Using back up from  `date -r $1 +%Y-%m-%d\ \ %H:%M`)"
#
#   reload desktop
#
killall xfdesktop
fi
.
Locked

Return to “Xfce”