Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keyboard layout indicator in tray shows "??" instead of flag for Russian #2165

Closed
ssrublev opened this issue Dec 19, 2021 · 24 comments
Closed

Comments

@ssrublev
Copy link

Keyboard layout indicator in tray shows "??" instead of "RU" for Russian when Russian is added to keyboard layouts. Impossible to use flags because flag directory is also refers to "??" in path.

Affected both Ubuntu and Fedora. Ubuntu bug filed at https://bugs.launchpad.net/ubuntu/+source/lubuntu-meta/+bug/1955179

@tsujan
Copy link
Member

tsujan commented Dec 19, 2021

I'm afraid this is a downstream issue. As far as upstream is concerned, you could put any flag there. The code is so flexible that you could change a flag to an image too.

Ubuntu bug filed at....

You did the right thing. We have no control over distros here.

I close this but if you think there's a problem with a certain flag in LXQt, please tell us by describing a way of reproducing it; then the issue will be reopened.

@tsujan tsujan closed this as completed Dec 19, 2021
@stefonarch
Copy link
Member

In Lubuntu 21.10 VM I cannot see any issue with RU, so I think there are other settings involved. Type of keyboard?

@tsujan tsujan changed the title Keyboard layout indicator in tray shows "??" instead of "RU" for Russian Keyboard layout indicator in tray shows "??" instead of flag for Russian Dec 19, 2021
@tsujan
Copy link
Member

tsujan commented Dec 19, 2021

@stefonarch
The title @ssrublev chose was misleading. He meant Russian flag (in Ubuntu/Fedora), not Russian keyboard layout.

I'm changing the title....

@stefonarch
Copy link
Member

I understood both, flag and text.

@tsujan
Copy link
Member

tsujan commented Dec 19, 2021

I understood both, flag and text.

Yes, they have no problem on our side; hence closing the issue.

@stefonarch
Copy link
Member

I can reproduce a similar thing with "MacIntosh" keyboard for example, adding more language one of them will reproduce ?? and not neccessary russian, with and without flags (move mouse cursor out of the video)

vokoscreenNG-2021-12-19_19-06-12.mp4

@ssrublev
Copy link
Author

In Lubuntu 21.10 VM I cannot see any issue with RU, so I think there are other settings involved. Type of keyboard?

Fedora finds it as "Generic 105-key PC".

In LXQt, when I go to settings, I go to "Keyboard layout". I can "Add" new layout. When I add, I can select a layout. I go to "Russian". There is the column "Variant".

Variants of Russian are presented. But I need the variant "None" — the default common layout. All other variants are irrelevant. If I select "Russian (legacy)", the bug is gone. I can switch languages and see in systray indicator "EN" and "RU".

But "Russian (legacy)" is a bad choice. It has wrong keys. I need only "None" variant. The keyboard types correctly then.

But when I do it, systray indicator switches between "EN" and "??". In both distros. That's the problem.

With "??", it is also impossible to use "Flags path pattern" in "Keyboard state settings". Because it goes to use "??.svg" file.

@stefonarch
Copy link
Member

There has to be something else hidden - I cannot reproduce it neither in Lubuntu 21.10 nor on my main machine with git, "none" and every other variant of russian I tested are ok.

@stefonarch
Copy link
Member

stefonarch commented Dec 19, 2021

Because it goes to use "??.svg" file.

Maybe as workaround you could copy ru.svg to ??.svg?

EDIT: what happens if you add a third language?

@ssrublev
Copy link
Author

EDIT: what happens if you add a third language?

When I add "Ukrainian" (variant "None"), it switches between "US", "??", "UA"

When I also add "Belarusian (legacy)", it shows "US", "??", "UA", "BY"

the same for "Belarusian" → "None"

@ssrublev
Copy link
Author

Because it goes to use "??.svg" file.

Maybe as workaround you could copy ru.svg to ??.svg?

Great, it worked!

The path "/usr/share/iso-flag-png/%1.png" can use "??.png" and show the flag, thanks!

@ssrublev
Copy link
Author

Checked in both Fedora and Ubuntu. Workaround works in both.

@tsujan
Copy link
Member

tsujan commented Dec 19, 2021

Yes, it's a good workaround but please note that there's a problem in the system you use that doesn't exist in @stefonarch's and my systems. We still don't know what it is.

@ssrublev
Copy link
Author

Well, I use an alternately modified file "/usr/share/X11/xkb/symbols/ru" in both distros

There are redefined keys for use with Wiki markup, described here https://en.wikipedia.org/wiki/User:Ssr/styledemo#My_custom_Linux_xkb_Cyrillic_keyboard_layout

This may affect.

The "??" issue only concerns LXQt, not MATE, KDE, Gnome or XFCE that I have.

@stefonarch
Copy link
Member

Quite sure this is the cause, you could make a test with the default file but it's 99%

@tsujan
Copy link
Member

tsujan commented Dec 19, 2021

Panel's code only reads /usr/share/X11/xkb/rules/evdev.xml. Even if we don't consider base.extras.xml in the same directory (why?), I think hard-coding /usr/share is suspicious. IMHO, the code isn't optimal.

@tsujan
Copy link
Member

tsujan commented Dec 19, 2021

Another report, at https://github.com/lxqt/lxqt-panel/issues, may be needed but not just for this special case. There should be more issues, that most users don't encounter. I don't know how to describe them; "suboptimal code"?

@ssrublev
Copy link
Author

It is also strange grouping for layouts I see in "Russian" layout section. Under "Russian", it contains languages such as Tatar, Bashkirian, Komi, Udmurt and even Serbian.

Tatar is completely different from Russian. It's Turkic, while Russian is Slavonic. Komi is Finno-Ugric. They are not "Russian".

Most probably, this indicates that they are Cyrillic, per alphabet.

"Russian" here probably means "related to Russia as country", not "Russian as language".

@luis-pereira
Copy link
Member

Panel's code only reads /usr/share/X11/xkb/rules/evdev.xml. Even if we don't consider base.extras.xml in the same directory (why?), I think hard-coding /usr/share is suspicious. IMHO, the code isn't optimal.

Sub-optimal. Will take care (at least) of the hardcoded paths.

@tsujan
Copy link
Member

tsujan commented Dec 20, 2021

Will take care (at least) of the hardcoded paths.

Thanks!

@luis-pereira
Copy link
Member

Fixed the harcoded paths.

On Linux systems, the evdev rules are most commonly used, on other systems the base rules are used.
States the XKB configuation manual. I used XkbRF_VarDefsRec() to get the rule in use, tough.
It seems that lxqt-panel/plugin-kbindicator and the config tool lxqt-config-input need some love.
Will continue on it after Christmas. Will publish after fixing some things found while browsing the code
Merry Christmas!

@stefonarch
Copy link
Member

Merry Christmas!

@tsujan
Copy link
Member

tsujan commented Dec 23, 2021

Merry Christmas to you all!

@ssrublev
Copy link
Author

And Happy Chinese New Year! =))) (February 1)

Just here to say that I now have LXQt 1.0 which is supplied by Fedora Rawhide. This issue still persists there. lxqt-panel.x86_64 version is 1.0.0-2.fc36

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants