Wednesday, August 17, 2011

Right Click, Refresh Desktop in Debian/Ubuntu

Windoze users when switching to Debian/Ubuntu or any other flavours of GNU/Linux seem to have a hangover of some futile actions, that one would get used to while being desperate on the Windoze environments :D

And if you seriously are missing the "refresh desktop" options on the GNU/Linux environments, just to demonstrate the power of Free and Open Source Software, and the freedom they provide the users with, here's a small tweak which gives the "Refresh Desktop" option.

By the way, F5 on Debian/Ubuntu still perform the Refresh blink. This tweak is to add the Right Click -> Refresh Desktop option.

1.Open terminal (ctrl+alt+t)
2. Install the the nautilus (default file browser) menu configuration tool and the lineakd is the daemon that runs in the background of an X session and listens to incoming events from multimedia buttons

sudo apt-get install nautilus-actions lineakd

3. Create a directory to dump this and anymore future tweaks you might be performing to nautilus

mkdir nautilus-scripts

4. Enter the new directory,

cd nautilus-scripts

5. Create the script file,

gedit refresh-desktop

6. Copy these contents in the file (this will perform toggling of F5, and hence the refresh !)

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

Save and close.

7. Make the script executable using chmod.

sudo chmod u+x refresh-desktop

8. Now, the script is ready, we need to link it to the action. And to add the right-click -> Refresh Desktop short cut, go to System -> Preferences -> Nautilus Actions configuration,

9. Create a new action


10. Change the context label to "Refresh Desktop", or "Mimic Windoze", or anything that pleases you :P

11. Check all the "Display Item options"

12. In the command tab, click on the browse option of Path, and link the refresh-desktop file in the directory "nautilus-scripts" created in step 5
13. In the conditions tab, select "Both"
14. Record all changes, or Save
15. Logout and login
16. And there you go! No more missing a futile action :P

1 comment: