Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This is my first question here, I'm trying to create a little script, that change icons shown in Desktop. I mean, when I Click on a button, I would launch this simple script

cp $HOME/.config/Desktop5/user-dirs.dirs $HOME/.config

in Desktop5/user.dirs i wrote:


I wrote 5 script for each most used folder: Downloads, Pictures, Music, Desktop and Videos

It works, but unfortunately, sometimes the desktop doesn't refresh soon and I have to click several time the same button before than see desktop icons, change.

How can I resolve this problem?


I thanks for the answer, i substituded

`cp $HOME/.config/Desktop5/user-dirs.dirs $HOME/.config`

with this two command: rm -r ~/Desktop ln -s ~/Downloads ~/Desktop

I Couldn't use rm -r-i ~/Desktop

because this command was launched by a script now it works!

share|improve this question

Instead of writing a script for that, remove the actual ~/Desktop folder (if it is empty), and create a link to ~/Downloads in its place:

rm -r -i ~/Desktop
ln -s ~/Downloads ~/Desktop
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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