I want to restrict users on changing wallpapers and themes. So can anyone say me how to remove
Change Desktop Background option from right click?
Note:
I just totally want to remove that option from right click.
administrationscriptswallpaper
I want to restrict users on changing wallpapers and themes. So can anyone say me how to remove
Change Desktop Background option from right click?
Note:
I just totally want to remove that option from right click.
Best Answer
If you can live without icons on your desktop, you can disable right click menu entirely through Nautilus' show_desktop option like this:
Edit: Getting rid only of that menu entry would require patching the Nautilus source. The menu definition is in
src/file-manager/fm-desktop-icon-view.c
insidedesktop_view_entries[]
(or just search forChange Desktop _Background
). Edit2: See below for HowTo.Other option would be to use different file manager to draw desktop icons. Maybe PCMan File Manager doesn't have this entry in right-click menu?
Minimal guide to editing & rebuilding Nautilus
As I've noted before, the menu entry is hardcoded to Nautilus, so as far as I know, the only way how to remove it AND keep all other functionality is to edit Nautilus' source and recompile it. Be warned that it will take some time and you'll need some space for all the development packages and compilation itself.
The process was tested with Nautilus Elementary 2.32.2.2, however there shouldn't be any differences for stock Nautilus 2.32.
nautilus-VERSION*
folder (VERSION is, of course some version number, most probably 2.32.something). Get into that folder.src/file-manager/fm-desktop-icon-view.c
Search for
GtkActionEntry desktop_view_entries[]
- in my case it's on line 721 however it may differ for your version. It should look like this:Note that the second array contains
Change Background
- remove it, so you get something like that:Save the file.
$EDITOR
(probably Nano) with the changelog file prepared to input your changes. Write something descriptive after the*
, keep everything else intact. Note that-l local
option is to note local build, you can use anything else instead oflocal
, however it's important to add entry to changelog, otherwise your local build would be overridden by repository version.Look ma', no "Change Background"!
To be 100% sure, it's probably good idea to lock
nautilus
package in Synaptic.Edit: Once you've verified that everything is working fine, you can get rid of build-dep packages using this nifty command. You just need to install
aptitude
...References