Posts: 91
dirkd
Joined: 30 May 2014
#1
Hi,

In a previous test I had already experienced a broken fluxbox after configuring locales. I can now reproduce the problem.
  • Open Antix CC | System | Configure System
  • In tab |Locale|, check the buttons [Enable locale options] (heading), [Enable locale options] (in right hand panel) and [enable language select]. Press [OK]
  • In the ROXTerm window, change one locale option, e.g. enable or disable one of the nl_BE locales.
  • Press <Enter> on the textbutton [OK]
Now beware! If you have not backupped your .fluxbox folder you can get yourself in big trouble.

Image

The default locale is already highlighted. If you just press <Enter> here, I find that 4 or 5 files in the .fluxbox folder (in your HOME-folder) are wiped out. However, if you are careful, press [Tab] to highlight the text-button <Ok> en THEN press <Enter> on your keyboard, no harm seems to be done.

Nonetheless, even then the results are not what I expect. I want to be able to switch keyboard layouts with the <Alt-Shf> key combination. I have been unable to do so, even when I get the message that the necessary locales have been generated, and even when I check the button [select keyboard map]. I seem to remember that Antix 13.2 behaved better when configuring multiple keyboard layouts.
Posts: 1,308
BitJam
Joined: 31 Aug 2009
#2
dirkd wrote:Nonetheless, even then the results are not what I expect. I want to be able to switch keyboard layouts with the <Alt-Shf> key combination. I have been unable to do so, even when I get the message that the necessary locales have been generated, and even when I check the button [select keyboard map]. I seem to remember that Antix 13.2 behaved better when configuring multiple keyboard layouts.
I don't fully understand everything that is involved in generating locales. The /etc/locale.gen file indicates that nl_BE is already enabled even though there is no /usr/share/locale/nl_BE/ directory. This may be perfectly normal. In addition, I believe the number of locales is larger than the number of keyboard layouts. For example, if I look in the file /usr/share/X11/xkb/rules/xorg.lst, I see there is an"nl" keyboard layout but no"nl_BE" keyboard layout. There is not even a Belgian variant to the nl layout. This file is independent of what locales you have on your system.

Assuming the keyboard layouts you want to use are available then it should be easy to select them with a command like:

Code: Select all

setxkbmap nl,us
After I do that I can switch between the two layouts with <Alt><Shift> and I can also switch between them by clicking on the flag in the system-tray/tool-bar. If there is no flag and you want one then run:

Code: Select all

fbxkb&
and add this line to one of your startup files.

To make the keyboard layout change permanent, you are supposed to be able to edit /etc/default/keyboard but that does not seem to be working here. An alternative is to add the setxkbmap command to one of the startup files. We used to always add the setxkbmap command by default but, of course, it interferes with /etc/default/keyboard so we took it out. We made sure the keyboard file was controlling the keyboard layout during development but something may have changed recently.

I did all of the above on a live system. It is possible the installed system behaves differently.

HTH
Posts: 1,445
skidoo
Joined: 09 Feb 2012
#3
I'm posting to confirm a bug exists. It might be separate from, unrelated to, what dirkd reported.
It's not specific to"nl_BE" and, when triggered, it affects _all_ sessions (IOW, not specific to fluxbox).

TO CONSISTENTLY REPRODUCE / TRIGGER THE BUG:
In the yad dialog, titled"Choose your locale for antiX applications"
click OK, without choosing (focusing/highlighting) any listed entry

After the fact, in fluxbox, launching the menu produces:
"Fluxbox Default Menu"(header)
xterm(menu item)
Reload Config (menu item) ------- no effect (er, does not resolve the problem)
Restart (menu item) ----- no effect (does not resolve the problem)
Exit (menu item) ------------} leads to slim login screen, no logout/shutdown dialog is offered

Via the slim login F1 session chooser, I chose iceWM. Launching iceWM menus produces:
Run (menu item)
Settings (menu item)
Logout (menu item)

JWM menu displays a single entry:"Logout"


After the operation -- if controlCentre is still open -- I was able to quickly recover/fix, by re-running the"Configure System".
Otherwise (if user has closed controlCentre prior to discovering problem) ouch, that would amount to a not-easily-recoverable scenario.

===============

dirkd, the screen (displayed to a roxterm window) is simply running"sudo dpkg-reconfigure locales".
As you pointed out,"the current default locale is (was) already highlighted"; are you certain your choice there ("clicking OK or being careful and tabbing") triggers the menus problem?
dpkg-reconfigure locales just regenerates the content of a configuration file, so that when you install (or REinstall) individual debian packages...
... at time of installation, _if_ the package provides translation files for your previously missing locale(s) those will be installed to your system.
(related note:"sudo dpkg-reconfigure locales" does not thouroughly cleanup/remove files for recently unselected locales. Use 'bleachbit' program to remove those.)
-=-
The antixCC wrapper script (separate from running 'dpkg-reconfigure locales') handles the immediate task of adjusting the DE/menu language labels.

===============

dirkd wanted to select"nl_BE"...
but the"Choose your locale for antiX applications" doesn't offer an exact match and, even if it did, fluxbox does not have a"nl_BE" translation file.
-=-
Prior to today, I've never tested the controlCentre locales tool.
I would have chosen"en_US", but that's not an available choice in the yad dialog, so I chose"en"...
and I noted the displayed confirmation"language has changed to LANG=en_US.UTF-8". Result: no bug -- menus contain expected content.
(Arguably, may have been no change, so"lang is now set to" vs"lang has been changed to" might be preferable wording)
I repeated the operation, forcibly closing the roxterm window without making any 'dpkg-reconfigure locales' changes... then chose"en". Same result: no menus bug

edit: fixed typo
Last edited by skidoo on 18 Jul 2015, 02:35, edited 1 time in total.
Posts: 91
dirkd
Joined: 30 May 2014
#4
@skidoo: I didn't try any and all combinations of going through the locale settings procedure. I just tried to find one reproducable scenario that would destroy the fluxbox configuration files.

I'm pretty shure that hitting the return key immediately in the roxterm window that I took a screenshot of, always wipes out the fluxbox menu. In the previous dialog, where you actually choose the locales you want on your system I alway changed at least one option, like choosing Armenian locale or whatever.

If instead of hitting the return key immediately, I activate the <Ok> text button in that roxterm window en THEN hit the return key, the fluxbox menu's still work. I then recover by logging in as root and overwriting my .fluxbox folder (in my home folder) with a backup copy I put aside for that purpose.

It's too late now to do further experiments, but I will tomorrow. From your description I'm sure we are seeing the same bug. I just didn't try other then fluxbox sessions.

@bitjam: thanks for the keyboard instructions. I can live without full nl_BE locale to start with. But I do need either the belgian keyboard or the us international keyboard, besides the standard us keyboard layout.
Posts: 1,308
BitJam
Joined: 31 Aug 2009
#5
dirkd wrote:@bitjam: thanks for the keyboard instructions. I can live without full nl_BE locale to start with. But I do need either the belgian keyboard or the us international keyboard, besides the standard us keyboard layout.
By far the easiest way would have been to have used the F2-Language menu in the live bootloader and selected"Nederlands (BE)". This would have set:
  • The locale to nl_BE.UTF-8
  • The Debian mirror to the one in Belguim
  • The antiX mirror to the one in the Netherlands
  • The main desktop menu translated into Dutch
  • The time zone to Europe/Brussels, and
  • The keyboard layouts to be,fr,us
We do try to make localization very easy for international users but our main thrust has been to have users use the live bootloader menus to customize the system however they want and then carry over these settings during the install. Trying to make all of these changes manually after an install will probably be much more difficult and frustrating.

Some of our more advanced Live features such as persistence and remastering make it easy to customize a LiveUSB so that it has the package selection you want but still has the run-time customization offered in the live bootloader menu. The F8-Save menu on the LiveUSB even allows you to set the default language and timezone (and other things) in the bootloader menus.
Posts: 1,445
skidoo
Joined: 09 Feb 2012
#6
dirkd, I repeated exactly what you described and it doesn't trigger the bug for me.
-- in roxterm window, add an asterisk for nl_BE.UTF-8
-- tab, to move focus to OK button and press enter (also tested: omit tab and just press enter)
-- next screen displays"choose your system default locale". Just press enter.

Neglecting to select an entry in the yad"Choose your locale for antiX applications" dialog is the only way I've found to trigger the bug.
Posts: 91
dirkd
Joined: 30 May 2014
#7
Skidoo, it seems you are right. It's the YAD window that triggers the problem, and not the previous ROXTerm window. Sorry if I have wasted your time.

BitJam: I realise I'm a difficult customer. Sorry about that too. I don't like a translated interface. More often than not the translation is sloppy or inconsistent, and then I have to guess what is meant by this or that element of the interface. Also, I'm used to qwerty-layout, even if the standard in Belgium is azerty. However, I do produce quite some text in Dutch, and then I need at least US-international keyboard layout. Full locale can be handy for spellchecking software and the like, but in a pinch, I can do without. Btw., it seems the keyboard layouts are now properly installed, and I CAN switch with <Alt-Shft>. Don't know precisely when that happened.

I dawned upon me that I might have jumbled up my IceWM configuration too, without noticing it. And shure enough, the menu there is gone, and I can't get it back. While I'm not planning to use IceWM, one never knows what tomorrow may bring. So I guess I will start over with a clean slate. Maybe it's a bit early to install Antix15 on my main machine (thank God I used a dedicated hard disk, so I can return to my not so terribly beloved Ubuntu for the moment). I'll do some further virtual testing first.
Posts: 1,445
skidoo
Joined: 09 Feb 2012
#8
Doesn't seem like a waste of time. Pinning down an exact bug/trigger often requires testing by multiple people.
After the operation -- if controlCentre is still open -- I was able to quickly recover/fix, by re-running the"Configure System".
Just to clarify:
re-running the operation and supplying the expected choice in yad dialog immediately fixed ALL menus for me (including iceWM menus)
Posts: 91
dirkd
Joined: 30 May 2014
#9
Skidoo: that's great! All menus fixed, as you said! Thanks.
Posts: 91
dirkd
Joined: 30 May 2014
#10
Just for completeness sake: although I have my menu's back, something is still broken. It seems I only got the default menu's back, as they appear right after a fresh installation. Programs that were added afterwards (I had SMPlayer and q4wine added) are missing from the fluxbox menu (and probably from the other ones too). Reinstalling the apllications didn't help. Clicking 'Update menu' in the fluxbox root menu didn't help either.

I also tested adding one more new application, and althought the installation was succesful, it too didn't appear in the fluxbox menu.

Added note: the missing menu choices WERE present in IceWM, but still not in fluxbox, even after reboot, reconfigure fluxbox, update menu.