SUSE Conversations

Alacarte 3.7.90-1.2 (Gnome menu editor) , Unable to add new menu items [Fixed]


By: nkuneng

November 21, 2013 11:15 am




I switched repositories for my Gnome installation to the LATEST STABLE GNOME 3.8

After updating to Gnome 3.8, I was then unable to edit my Gnome menu via the alacarte program/script. I then decided to query the forums, and found a link to this one here:

When clicking on the “New Item” button, there was no response from Alacarte. I then went about debugging, executing the program via a terminal, to investigate program output.

The error I was getting was getting was as below:

File "/usr/lib/python2.7/site-packages/Alacarte/", line 258, in on_new_item_button_clicked
editor = LauncherEditor(self.main_window, file_path)
AttributeError: 'MainWindow' object has no attribute 'main_window'

I then went about editing the script /usr/lib/python2.7/site-packages/Alacarte/

Use vi to edit the script as below

sudo vi /usr/lib/python2.7/site-packages/Alacarte/

Add a new line after line 54, to define the missing main_window member:

55 self.main_window = None
Added new member to MainWindow class (main_window)

Added new member to MainWindow class (main_window)

Edit the Run method, to initialize the new member as below. Add a new line after line 66. The number displayed in the code is just a line number, please omit that in your edit

67 self.main_window = self.tree.get_object('mainwindow')
Assigned the Gtk main window to the newly added main_window member

Assigned the Gtk main window to the newly added main_window member

Save and exit the script. Now execute the alacarte program, and attempt to edit your menus

NB: What I did find though is that the newly added menu items, via this procedure, aren’t displayed in alacarte main window, but you’re able to find them in your start/activities menu.

VN:F [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)

Tags: ,
Categories: Desktop, SUSE Linux Enterprise Desktop, Technical Solutions

Disclaimer: As with everything else at SUSE Conversations, this content is definitely not supported by SUSE (so don't even think of calling Support if you try something and it blows up).  It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test, test, test before you do anything drastic with it.