Useage of fbxkb [solved]

Using applications, configuring, problems
Post Reply
Message
Author
fobq
Posts: 101
Joined: Mon 19 Aug 2013, 11:41
Location: Hungary

Useage of fbxkb [solved]

#1 Post by fobq »

Hi,

I have just installed fbxkb keyboard layout indicator to my Puppy Precise 5.7.1, but I don't now what the next step would be.
I neither find it in "Utility", nor see it on the taskbar.
How can I open or activate it?

- I can switch layouts (Shift+Alt), but I don't see which one is current.

Bye

The issue has been solved:
I have downloaded it from on other site:
http://www.murga-linux.com/puppy/viewto ... 308#342308

And:

http://murga-linux.com/puppy/viewtopic. ... 882#725882
Last edited by fobq on Wed 27 Aug 2014, 11:48, edited 5 times in total.

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

Re: Usage of fbxkb

#2 Post by musher0 »

fobq wrote:Hi,

I have just installed fbxkb keyboard layout indicator to my Puppy Precise 5.7.1, but I don't now what the next step would be.
I neither find it in "Utility", nor see it on the taskbar.
How can I open or activate it?

- I can switch layouts (Shift+Alt), but I don't see which one is current.

Bye
Hi, fobq.

The flag corresponding to the language should appear in the tray, not in the taksbar. (Slight difference!)

Do you have the flags in /usr/share/fbxkb/mages ?

Bye for now.

musher0
Attachments
flags-fbxkb.jpg
(39.34 KiB) Downloaded 1355 times
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

fobq
Posts: 101
Joined: Mon 19 Aug 2013, 11:41
Location: Hungary

#3 Post by fobq »

I have them but not in the /usr/share... subdirectory, but directly in /fbxkb-0.6/images

fobq
Posts: 101
Joined: Mon 19 Aug 2013, 11:41
Location: Hungary

#4 Post by fobq »

I have just downloaded it from an other web-site, installed it and now it is working.

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#5 Post by musher0 »

fobq wrote:I have just downloaded it from an other web-site, installed it and now it is working.
Great!
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

fobq
Posts: 101
Joined: Mon 19 Aug 2013, 11:41
Location: Hungary

#6 Post by fobq »

It wokrs, but some problems have occured.
I have choosed the Hungarian and the Russian (phonetic) layouts, but when Puppy starts, a US flag appears, however I haven't choosed the US layout. When I press any key, it sudennly changes into Hungarian flag. Then, when I am presssing SHIFT+ALT, US flag does not appear any more (only HU and RU).

When I choose a third (LT) layout I get a "Changes applied successfully" message. When I try to activate the changes clicking on the YES button, an ERROR message (An Error has occuerd. Try again!) appears. I close XKB and restart X server. The US flag appears again, and I can not change it by clicking on it or pressing SHIFT+ALT, however if I open XKB only HU, RU and LT layouts are listed as availiable.

BUT yesterday, I used HU, UA (phonetic), LT and SK layouts without any problem.

How can I check and solve this problem?

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#7 Post by musher0 »

fobq wrote:It wokrs, but some problems have occured.
I have choosed the Hungarian and the Russian (phonetic) layouts, but when Puppy starts, a US flag appears, however I haven't choosed the US layout. When I press any key, it sudennly changes into Hungarian flag. Then, when I am presssing SHIFT+ALT, US flag does not appear any more (only HU and RU).

When I choose a third (LT) layout I get a "Changes applied successfully" message. When I try to activate the changes clicking on the YES button, an ERROR message (An Error has occuerd. Try again!) appears. I close XKB and restart X server. The US flag appears again, and I can not change it by clicking on it or pressing SHIFT+ALT, however if I open XKB only HU, RU and LT layouts are listed as availiable.

BUT yesterday, I used HU, UA (phonetic), LT and SK layouts without any problem.

How can I check and solve this problem?
Don't worry too much about it. I had the same problem with my French-
Canadian keyboard. It was there, but the correct icon only showed up
after I had used the editor for the first time. Until that time, the US flag
was in the tray.

Frustrating ;), but what can we do? :) (Besides checking if the code has errors.)

Bye for now.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#8 Post by musher0 »

Double message. Sorry.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

fobq
Posts: 101
Joined: Mon 19 Aug 2013, 11:41
Location: Hungary

#9 Post by fobq »

I see.
The flag itself doesn't disturb me. The main problem is I can not use three (HU, RU, LT) layouts, only two. If I choose these layouts and restart X, I can use only US layout and I can not switch.
Is it the fbxkb's problem or xkb's? Shouldn't I try to download an other layout indicator?

npierce
Posts: 858
Joined: Tue 29 Dec 2009, 01:40

#10 Post by npierce »

It is unlikely fbxkb's problem; the problem is probably with XKB Configuration Manager.

Please run these two commands in a terminal window and post the output, which should give us a clue as to what is going on:

Code: Select all

setxkbmap -query
grep -C 3 Xkb /etc/X11/xorg.conf
If you are unfamiliar with cutting and pasting from a terminal window, you can use these commands instead, then post the contents of the /tmp/output.txt file:

Code: Select all

setxkbmap -query > /tmp/output.txt
grep -C 3 Xkb /etc/X11/xorg.conf >> /tmp/output.txt

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#11 Post by musher0 »

Here are my results:
rules: xorg
model: pc102
layout: qc
Section "InputDevice"
Identifier "Keyboard0"
Driver "kbd"
Option "XkbRules" "xorg"
Option "XkbModel" "pc102"
Option "XkbLayout" "ca" #xkeymap0
EndSection

Section "InputDevice"
BFN.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

fobq
Posts: 101
Joined: Mon 19 Aug 2013, 11:41
Location: Hungary

#12 Post by fobq »

Hi,
my results:

Code: Select all

# setxkbmap -query
rules:      xorg
model:      pc102
layout:     hu,ru
variant:    standard,phonetic,phonetic,phonetic
options:    grp:alt_shift_toggle


# grep -C 3 Xkb /etc/X11/xorg.conf
Section "InputDevice"
Identifier "Keyboard0"
Driver "kbd"
    Option         "XkbRules" "xorg"
    Option         "XkbModel" "pc102"
	Option      "XkbLayout" "hu,ru" #xkeymap0
	Option      "XkbVariant" "standard,phonetic,phonetic,phonetic"
	Option 		"XkbOptions"   "grp:alt_shift_toggle"
#Option "XkbVariant" "" #xkbvariant0
EndSection

Section "InputDevice"

npierce
Posts: 858
Joined: Tue 29 Dec 2009, 01:40

#13 Post by npierce »

fobq,

XKB Configuration Manager has corrupted your /etc/X11/xorg.conf file.

I am a little dismayed by this, since I submitted patches to fix this a year and a half ago, but those patches apparently never made it into Puppy.

Make a backup of /etc/X11/xorg.conf, then edit the original to change this line:

Code: Select all

   Option      "XkbVariant" "standard,phonetic,phonetic,phonetic"
to this:

Code: Select all

   Option      "XkbVariant" "standard,phonetic"
You should then be able to add a new layout using XKB Configuration Manager.

For the time being, I would advise not to remove any layouts with XKB Configuration Manager. That is one task that XKB Configuration Manager has problems with.

I need to stop here for now, but will get back to you later with more of an explanation.

fobq
Posts: 101
Joined: Mon 19 Aug 2013, 11:41
Location: Hungary

#14 Post by fobq »

Thank you, gentleman, it seems to has been solved.
Now, I can use the following settings properly:

Code: Select all

Section "InputDevice"
Identifier "Keyboard0"
Driver "kbd"
    Option         "XkbRules" "xorg"
    Option         "XkbModel" "pc102"
	Option      "XkbLayout" "hu,sk,ru,lt" #xkeymap0
	Option      "XkbVariant" "standard,qwerty,phonetic,"
	Option 		"XkbOptions"   "grp:alt_shift_toggle"
#Option "XkbVariant" "" #xkbvariant0
EndSection
(LT layout uses standard variant, so it does not appear among XkbVariants.)

Everything is good, till now.

Now, I am trying to change and invoke new characters into RU layout, but it's an other story, an other topic.

Thank you again.

npierce
Posts: 858
Joined: Tue 29 Dec 2009, 01:40

#15 Post by npierce »

fobq,

You're welcome.

I am glad that you got it working.

If you are happy with your configuration now, you don't need to read the remainder of this post. But if you are curious about what happened, how it is supposed to work, why it doesn't, and alternative ways you can work around the problem, read on.

Either way, welcome to the forum!

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
npierce wrote:. . . but will get back to you later with more of an explanation.
Here's what happened.

You have been trying different layouts. As you mentioned, at one time you had four layouts working. You tried the phonetic variant for two of the layouts you tried (ua and ru).

Let's call the four keymaps that you cycle through with Shift+Alt "keymap 1", "keymap 2", "keymap 3", and "keymap 4". At least once while trying these out you had a phonetic variant loaded for "keymap 2", "keymap 3", and "keymap 4" -- maybe not at the same time, but at least once while trying different layouts.

There is nothing wrong with doing that, of course. You should be able to move different layouts and variants around as much as you like while deciding how best to arrange them.

BUT . . .

But the XKB Configuration Manager has a bug which sometimes causes the configuration for the layouts to become out of sync with the configuration of the variants when layouts are removed.

For instance, lets say keymap 1 is "hu: standard", keymap 2 is "ru: phonetic, and keymap 3 is "ua: phonetic". This would give these two lines in the configuration file:

Code: Select all

	Option      "XkbLayout" "hu,ru,ua" #xkeymap0
	Option      "XkbVariant" "standard,phonetic,phonetic"
Note how the order of the layouts matches the order of the variants.

If we were then to use XKB Configuration Manager to remove the ua layout, we would hope that it would also remove the associated variant from the configuration file, since it is pointless for it to be there as an orphan. (We can have a layout without a variant, but we can't have a variant without a layout.)

So we would hope that the configuration file would then look like this:

Code: Select all

	Option      "XkbLayout" "hu,ru" #xkeymap0
	Option      "XkbVariant" "standard,phonetic"
But it doesn't. XKB Configuration Manager neglects to remove the variant that was associated with the ua layout, so the configuration file looks like this:

Code: Select all

	Option      "XkbLayout" "hu,ru" #xkeymap0
	Option      "XkbVariant" "standard,phonetic,phonetic"
That in itself doesn't cause a problem. The orphaned variant is simply ignored.

But if we then were to use XKB Configuration Manager to add the lt layout, the configuration file would look like this:

Code: Select all

	Option      "XkbLayout" "hu,ru,lt" #xkeymap0
	Option      "XkbVariant" "standard,phonetic,phonetic"
This says that for keymap 3 we want the lt layout with its phonetic variant. But that's not what we asked for. We didn't ask for a variant. In fact, there is not a variant for the lt layout named "phonetic".

And that's the problem. If we then click the Yes button to activate the new settings, we get the "An Error has occured! Try again." message, because we are asking it to set a keymap that does not exist. And if we restart the X server, X will see that the keymap doesn't exist, throw up its hands, and load the default us keymap.

In fact, a look at the error log, /var/log/Xorg.0.log, will show a couple of lines like this (but with different timestamps):

Code: Select all

[ 43843.943] (EE) Error loading keymap /usr/X11R7/share/X11/xkb/compiled/server-0.xkm
[ 43843.943] (EE) XKB: Failed to load keymap. Loading default keymap instead.

OK, that's probably more than you want to know about what went wrong. Rather than provide details about what went wrong, you probably wish that I told you how to work around the problem so that you can move on and get some work done.

One thing you can do is to edit the /etc/X11/xorg.conf file yourself, instead of letting XKB Configuration Manager do it. Having looked at the example code blocks above, you probably already understand the format. The Option "XkbLayout" line has a comma-separated list enclosed in quotation marks of from one to four layouts. The Option "XkbVariant" line has a comma-separated list enclosed in quotation marks of from zero to four variants. I should add that if you don't want variants for the first layouts in the list, but do want variants for layouts later in the list, leave the variant names blank, but don't leave out the commas.

For example, if you wanted to use the hu and ru layouts with no variant, but wanted to use the phonetic variant for the ua layout, the configuration file would look like this:

Code: Select all

	Option      "XkbLayout" "hu,ru,ua" #xkeymap0
	Option      "XkbVariant" ",,phonetic"
If you don't know the name of a layout or variant, you could look at the lists in XKB Configuration Manager, or examine the files in the /etc/X11/xkb/symbols/pc/ directory.

Changes you make to xorg.conf will only take effect after you restart the X server. For quick experimentation without repeatedly restarting the X server, you can use the setxkbmap command. The command format is similar to the lines in xorg.conf. This command is equivalent to the xorg.conf example I just gave:

Code: Select all

setxkbmap "hu,ru,ua" ",,phonetic"
To see the current settings:

Code: Select all

setxkbmap -query
Changes made with setxkbmap only last until you restart the X server. Once you have experimented and find a configuration that you like, you'll probably want to edit xorg.conf so that the keymaps are set the way you want them whenever you start the X server.

XKB Configuration Manager is a great little utility -- when it works, which is most of the time. I do hope that this bug will be corrected in future Puppies.

For even more detail, see my bug report and patch from February 2012:

Racy Puppy 5.2.2 Final, 18 Nov. 2011: 4 bugs in the XKB Configuration Manager (xkbconfigmanager)

Post Reply