I have a script which deletes files from my desktop. But after the files are deleted they continue to show as desktop icons. I have to refresh the desktop manually (F5) to get them to go away. I'd like to refresh the desktop from my BASH script. Anyone know how I can do that for a KDE Plasma Desktop on Debian Wheezy?


In the end this worked:

if [ -d "$HOME/desktop" -a -f "$HOME/desktop/finish.desktop" ]; then
  touch "$HOME/desktop/finish.tmp"
  rm "$HOME/desktop/finish.tmp"

I.e. creating a temp file in the desktop and then deleting it...

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.