I can reload the Caja desktop by clicking anywhere on the desktop pressing F5. Is there any way to do this programmatically?

For example, I have a user script copies some files to the $HOME/Desktop directory. I'd like the script to be able to do an F5 so the user can immediately see these files instead of them having to manually do an F5.

I can do

caja -q && caja -n &

This works, but has the side-effect of killing all other caja windows that happen to be open.


Answering because I stumbled upon the same issue and found a solution

To stimulate refresh you can:

  1. Install xautomation by sudo apt install xautomation (you will need xte feature provided by it)

  2. Create a file named refresh and add the following in it:


xte "key F5"
  1. Finally right click refresh file, go to properties and check all Execute options inside Permissions tab It can now refresh whenever called

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.