Hi Rijnsma,
I stumbled across this post on xcfe.org. The entire thread is here (
https://forum.xfce.org/viewtopic.php?pid=30881#p30881), this part seems most relevant.
Here is a kludge that I did. You are welcome to it if you want:
I put a desktop icon on my desktop that has a script that will lock/unlock my icons when I
get them where I want. Unlock, then open up all your devices you have, set the icons where you
want, then lock them down. If you want to re-arrange ... unlock them, re-arrange, then lock
them down again. Also, after you set your icons where you want, it is a good idea to make a
back-up of your settings, per whatever
screen resolution you use, in ~/.config/xfce4/desktop/backup
I use icons.screen0-1280x720.rc, therefore I have it backed up in folder
"backup" under ~/.config/desktop
Put this in your Desktop folder:
Code:
[Desktop Entry]
Version=1.0
Type=Application
Name=IconLockSet
Comment=
Exec=/home/xxx/scripts/iconlockset.sh
Icon=/home/xxx/Linux_stuff/Icons/icon-lock.png
Path=/home/xxx/Desktop
Terminal=true
StartupNotify=false
LockStatus=Locked
GenericName=
In the properties:
It should be named "IconLockSet" ( no quotes )
command should be: "/home/xxx/scripts/iconlockset.sh" ( no quotes & your home folder instead of xxx )
check "run in terminal"
Put this script in your scripts folder:
It should be named "IconLockSet.sh"
Code:
#!/bin/bash
if grep -q "LockStatus=Locked" "/home/xxx/Desktop/IconLockSet.desktop"; then
echo "It is Locked...we will Unlock it"
sudo chattr -i ~/.config/xfce4/desktop/icons*
sed '/Icon=/ c\Icon=\/home\/xxx\/Linux_stuff\/Icons\/icon-unlock.png' < /home/xxx/Desktop/IconLockSet.desktop > /home/xxx/Desktop/tmp.desktop
rm /home/xxx/Desktop/IconLockSet.desktop
sed '/LockStatus=/ c\LockStatus=Unlocked' < /home/xxx/Desktop/tmp.desktop > /home/xxx/Desktop/IconLockSet.desktop
rm /home/xxx/Desktop/tmp.desktop
else
if grep -q "LockStatus=Unlocked" "/home/xxx/Desktop/IconLockSet.desktop"; then
echo "It is UnLocked...we will Lock it"
sed '/Icon=/ c\Icon=\/home\/xxx\/Linux_stuff\/Icons\/icon-lock.png' < /home/xxx/Desktop/IconLockSet.desktop > /home/xxx/Desktop/tmp.desktop
rm /home/xxx/Desktop/IconLockSet.desktop
sed '/LockStatus=/ c\LockStatus=Locked' < /home/xxx/Desktop/tmp.desktop > /home/xxx/Desktop/IconLockSet.desktop
rm /home/xxx/Desktop/tmp.desktop
sudo chattr +i ~/.config/xfce4/desktop/icons*
fi
fi
exit
Note:
1) change xxx to your home folder name.
2) you will need a folder ~/scripts to put IconLockSet.sh in ( or change the
code to your folder to suit )
3) you will need a folder ~/Linux_stuff/Icons to put the icons "icon-lock.png"
and "icon-unlock.png" in ( or change the code to your folder to suit )
4) Go to the icon database and grab a couple of icons you want to use and
put them in the ~/Linux_stuff/Icons folder ( or whatever folder you use ).
Rename one "icon-lock.png" and rename the other "icon-unlock.png"
( I used the closed lock png for "icon-lock.png", it looks good )