Maleeq
unread,Jul 23, 2009, 4:26:51 AM7/23/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ubuntunigeria
Hi all,
Ever since I've been using Ubuntu, I never got the "edit menus" option
(from right-clicking the topmost panel) to work.....until now. So I
feel like sharing what I did here, and probably get others view.
1- Invoking the menu editor, alacarte from terminal throws some error
messages:
maleeq@digital-hut:~$ alacarte
Traceback (most recent call last):
File "/usr/bin/alacarte", line 36, in <module>
main()
File "/usr/bin/alacarte", line 32, in main
app = MainWindow(datadir, version, sys.argv)
File "/usr/lib/python2.6/dist-packages/Alacarte/MainWindow.py", line
50, in __init__
self.editor = MenuEditor()
File "/usr/lib/python2.6/dist-packages/Alacarte/MenuEditor.py", line
35, in __init__
self.locale = locale.getdefaultlocale()[0]
File "/usr/lib/python2.6/locale.py", line 478, in getdefaultlocale
return _parse_localename(localename)
File "/usr/lib/python2.6/locale.py", line 410, in _parse_localename
raise ValueError, 'unknown locale: %s' % localename
ValueError: unknown locale: en_NG
2- Observing the error was due to the locale set during Ubuntu
installation (Nigeria, en_NG). To confirm this, I set the enviroment
variable LANG to the generic "en" and re-invoked the menu editor.
maleeq@digital-hut:~$ LANG=en
maleeq@digital-hut:~$ alacarte
This time it worked without the previous error messages.
3- To avoid having to set the variable always, I modified the
locale.py file to include an entry for the Nigerian locale, en_NG,
which AFAIK is same with the british en_GB locale.
maleeq@digital-hut:~$ gksudo gedit /usr/lib/python2.6/locale.py
and inserted the lines:
'en_ng': 'en_GB.ISO8859-1',
'en_ng.iso88591': 'en_GB.ISO8859-1',
And that fixed it. Now, I've been able to simply right-click the top
panel and edit my menus with no issues.....yet atleast and I hope
never!!!!!
Well, thats all folks.! Cheers!!!