Other Help Topics :: removing desktop icons...i searched



I think I know what's happening (although it's just a theory).

When you backup files in .xtdesktop you are adding all the files which are in there at the time.
The key word here, however, is 'adding'.  You said you removed icons from the directory, but what you are overlooking is that these icons are automatically installed into ramdisk when the system is started up.  Your backup cannot remove files...it can only overwrite or add to them.
If you want to remove things from the system you can do that from /opt/bootlocal.sh
For example, if you want to remove the Dillo icon you can do something like this in bootlocal:
rm -f /home/dsl/.xtdesktop/dillo.{lnk,gif}
or
rm -f /home/dsl/.xtdesktop/dillo.*
or
rm -f /home/dsl/.xtdesktop/dillo.lnk
rm -f /home/dsl/.xtdesktop/dillo.gif

You'd think it would be easier just to remove the whole directory and let the backup put in fresh ones, but that won't happen.  bootlocal.sh isn't run until after your backups are restored (or so i assume, since bootlocal can be included in filetool.lst)

ah, you are very wise sir...your intuition was correct, i put the rm lines in my bootlocal.sh file and everything worked as planned...makes sense with your explanation and now that i think about it from that angle...

thanks for the help,
phillip

Might be messy but couldn't you put the command to remove the dir contents in bootlocal and then add the restore command again to the end of bootlocal? That would be running it twice but would give you the desired result.

Also you could make a .dsl package of the .xtdesktop dir and have it load it at the end of bootlocal. You could store it in a /icons dir or something on the root of the partion and then at the end of bootlocal you could have something like 'mydsl-load icons.tar.gz" or something like that.

Or even have a command at the end of bootlocal that opens the backup.tar.gz and copies the contents of .xtdesktop to the .xtdesktop you just cleared out from the remove command.

There's probably many ways to do it.

Chris

Quote
Might be messy but couldn't you put the command to remove the dir contents in bootlocal and then add the restore command again to the end of bootlocal? That would be running it twice but would give you the desired result.

Interesting.....I thought that would start a loop at first, but no, it makes sense.
Bash is great...there are many ways to get things done through some simple scripting.


original here.