How to add “Refresh Desktop” in context menu of Ubuntu

Ubuntu systems lacks the “Refresh” context menu present in Windows, but you can make one so you wont be troubled hitting F5 manually everytime you want to refresh the desktop (or folder).

1. First, you will be needing packages nautilus-actions and lineakd.

sudo apt-get install nautilus-actions lineakd

2. Now, create a nautilus scripts directory. Example

mkdir /opt/nautilus-scripts

3. Make a script file

gedit /opt/nautilus-scripts/refresh

4. Add the following lines of code

#!/bin/bash
xsendkeycode 71 1
xsendkeycode 71 0

5. Now save the file and change it to be executable

chmod u+x /opt/nautilus-scripts/refresh

6. Open up the nautilus-actions program at System -> Preferences -> Nautilus Actions Configuration.

7. Click Add:

* In Menu Item & Action:
Label: Refresh
Path: /opt/nautilus-scripts/refresh

* Parameters:
Filenames: *
Match Case: selected
Mimetypes: */*
Appears if selection contains: Both

8. Uncheck the “File / Local Files” box. Save and restart the system.

Leave a Reply

Your email address will not be published. Required fields are marked *