Breaking News

HOW TO ADD REFRESH BUTTON IN RIGHT CLICK IN LINUX


1) Download nautilus-actions and lineakd either by Synaptic, or via the command line:
Code:
sudo apt-get install nautilus-actions lineakd
2) create a nautilus scripts directory. For example:
Code:
mkdir nautilus-scripts
3) make a file to hold your script:
Code:
gedit nautilus-scripts/refresh_desktop
4) add the following lines of code:
Code:
#!/bin/bash
xsendkeycode 71 1
xsendkeycode 71 0
This essentially sends the F5 command (the refresh command) to wherever you're clicking. "71" is the key number on my particular computer for F5. The "1" sends the signal that the key is being pressed, and then the "0" says that the key is no longer being pressed.

If for some reason this doesn't work, try using xev to figure out what your particular keycode is (follow steps 6-9, but mentally replace "hotkey" with "F5").
5) save the file and change it to be executable:
Code:
chmod u+x nautilus-scripts/refresh_desktop
6) open up the nautilus-actions config dialog at System -> Preferences -> Nautilus Actions Configuration. (If for some reason it doesn't show up in the menu yet, try logging out and logging back in.)
7) click Add.
In Menu Item & Action:
Label: Refresh Desktop
Tooltip: Refresh the Desktop Display
Icon: (whatever you like, or blank)
Path: /home/{put your user name here}/nautilus-scripts/refresh_desktop
Parameters:

In Conditions:
Filenames: *
Match Case: [selected]
Mimetypes: */*
Appears If Selection Contains: [Both]
When you want to use the script, right click on any file or folder on your desktop (not the desktop background, alas!) and "Refresh Desktop" should now appear in the context menu.

No comments

please write your mail id for contact: