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:
static const GtkActionEntry desktop_view_entries[] = {
/* name, stock id */
{ "New Launcher Desktop", NULL,
/* label, accelerator */
N_("Create L_auncher..."), NULL,
/* tooltip */
N_("Create a new launcher"),
G_CALLBACK (action_new_launcher_callback) },
/* name, stock id */
{ "Change Background", NULL,
/* label, accelerator */
N_("Change Desktop _Background"), NULL,
/* tooltip */
N_("Show a window that lets you set your desktop background's pattern or color"),
G_CALLBACK (action_change_background_callback) },
/* name, stock id */
{ "Empty Trash Conditional", NULL,
/* label, accelerator */
N_("Empty Trash"), NULL,
/* tooltip */
N_("Delete all items in the Trash"),
G_CALLBACK (action_empty_trash_conditional_callback) },
};
Note that the second array contains Change Background
- remove it, so you get something like that:
static const GtkActionEntry desktop_view_entries[] = {
/* name, stock id */
{ "New Launcher Desktop", NULL,
/* label, accelerator */
N_("Create L_auncher..."), NULL,
/* tooltip */
N_("Create a new launcher"),
G_CALLBACK (action_new_launcher_callback) },
/* Change Background was here */
/* name, stock id */
{ "Empty Trash Conditional", NULL,
/* label, accelerator */
N_("Empty Trash"), NULL,
/* tooltip */
N_("Delete all items in the Trash"),
G_CALLBACK (action_empty_trash_conditional_callback) },
};
Save the file.
Best Answer
eog (eye-of-gnome)
11.04 and previous versions of ubuntu
When you mentioned that you can right-click an image and set as wallpaper, this answer assumes you meant - open the jpeg image into eog, right-click and choose "set as desktop background".
With this answer, you can remove this option:
With this assumption in mind, you can remove the menu-option AND right-click option by either editing the source directly (if you want to distribute a package) or on a per-client modify the GTK window data.
solution 1 - edit GTK window data
First backup the GTK window data:
Now search for "wallpaper" - delete each line that contains this keyword and save.
To revert the changes:
solution 2 - distribute deb package
This can be done with this recipe:
If it asks to configure your mail - select no configuration
Now search for "wallpaper" - delete each line that contains this keyword.
Save.
add
+ppakarthick
to the first line so that it reads something like:eog (2.32.1-0ubuntu2+ppakarthick) natty; urgency=low
Note - there is only one deb package to install - either 32bit or 64bit depending upon the ubuntu architecture you have installed. The other deb's produce is a debug package and a development package, both of which you can ignore.
To revert the changes:
This will remove the complete eog package. Then, the second command will re-download from the repositories, the current eog package.
Note - it may want to remove the meta package
ubuntu-desktop
. The only affect this has is if you intend to upgrade to Natty. If you want to upgrade, simply installubuntu-desktop
before the upgrade.Gnome-Control-Center background tab
The GTK Window data for this tab is in the file
/usr/share/gnome-control-center/ui/appearance.ui
but I have not found a convenient place in this file that you can hide the background tab itself.With a source-code change - you can get the background tab and its buttons to both not display wallpaper and do nothing when the buttons are clicked.
This solution is very similar to solution 2 above.
If it asks to configure your mail - select no configuration
Now look for the following function and add
return;
as shown:Save.
add
+ppakarthick
to the first line so that it reads something like:gnome-control-center (1:2.30.1-0ubuntu2+ppakarthick) lucid-proposed; urgency=low
To revert the changes:
This will remove the complete gnome-control-center package and a few other packages. Then, the second command will re-download from the repositories, all the packages previously removed.