alacarte "Edit Menus" Doesn't Work : (Fixed)

125 views
Skip to first unread message

Maleeq

unread,
Jul 23, 2009, 4:26:51 AM7/23/09
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!!!


Bobby

unread,
Jul 23, 2009, 5:21:59 AM7/23/09
to ubuntu...@googlegroups.com
Great the bug has been in ubuntu since forever now, and my way of just getting round it was to just change my system language to English Uk which is the same with English Nigeria. On hardy heron the bug even affect the printer config tool which is a huge deal breaker. I have to say your approach attacks the root of the problem and would be the preferred fix. but for those who have a phobia for terminal, you can always get round the problem by going to system/administration/language and change from English Nigeria to English Uk and reboot the system.


Thanks once again Maleeq
--

A player that makes a team great is better than a great player

Nnamdi Zobeashia

unread,
Jul 23, 2009, 4:33:55 AM7/23/09
to ubuntu...@googlegroups.com
Great job maleeq well done

Fanen A.

unread,
Jul 24, 2009, 7:32:26 AM7/24/09
to ubuntu...@googlegroups.com
The right way to fix this is to file a bug in launchpad. The program
is supposed to work under any locale, or fall back to it's default
locale, it needs to be fixed, not python :)

Pls endeavour to file a bug report. My current situation doesn't permit me to

On 7/23/09, Nnamdi Zobeashia <nzobe...@gmail.com> wrote:
>
> Great job maleeq well done
>
>
> >
>

--
Sent from my mobile device

bigbrovar

unread,
Jul 24, 2009, 8:18:14 AM7/24/09
to ubuntunigeria
AFAIK there are about two bugs in launchpad concerning this issue most
of them are still marked undecided. and because of the relative small
percentage of people affected., i guess there is little motivation for
fixing the problem (from ubuntu). i will file a bug again later today
lets hope we can put enough momentum on it launchpad to evevtually get
it fixed from upstream

On Jul 24, 12:32 pm, "Fanen A." <afane...@gmail.com> wrote:
> The right way to fix this is to file a bug in launchpad. The program
> is supposed to work under any locale, or fall back to it's default
> locale, it needs to be fixed, not python :)
>
> Pls endeavour to file a bug report. My current situation doesn't permit me to
>

Fanen A.

unread,
Jul 24, 2009, 10:37:05 AM7/24/09
to ubuntu...@googlegroups.com
when you file the bug report, say that "Alacarte fails to run under
unpopular Locales." for instance. attache the output of the error when
you launch from the terminal.

Sys-config-printer had such a bug in hardy heron, I filed it, it got
fixed in about a day or so.

Bobby

unread,
Jul 24, 2009, 10:50:58 AM7/24/09
to ubuntu...@googlegroups.com
its the same bug that causes the system-config-printer to mess up in hardy. this bug affects many applications written in python on ubuntu. I know for sure that it affects Elisa media player, Alacarte, calibre (on kde 4.3 jaunty) and even when i tried installing MIE (mobile internet experience) the hp custom interface which was built on top of ubuntu for their mini netbooks. the thing wont start until i changed the language to eng_uk
and i never have same issue in fedora or other linux distros .. the printer issue was fixed but the fix needed is something wholistic that strikes at the root cause of the problem . i will try to file a bug again and see how far it goes .

Nnamdi Zobeashia

unread,
Aug 19, 2009, 3:48:03 AM8/19/09
to ubuntu...@googlegroups.com
Good day
Am mailing concerning the Ubuntu loco team Nigeria, would like to know
how active the team is cos i spoke to bobby "bigbrovar" i think we
should have a meeting Online so we could contribute to karmic which is
suppose to come out soon, sorry am so jumpy about these in my mail. i
suggest we create an irc channel and send it out to Ubuntu Nigeria
mailing list. waiting for your suggestion

thanks


--
Zobeashia Nnamdi aka Pradeep

Reply all
Reply to author
Forward
0 new messages