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

Not working on OpenSUSE+GNOME #49

Open
mark-gerarts opened this issue Dec 29, 2022 · 11 comments
Open

Not working on OpenSUSE+GNOME #49

mark-gerarts opened this issue Dec 29, 2022 · 11 comments

Comments

@mark-gerarts
Copy link

Hi, thank you for your work on this layout, I have been using it for years!

I switched to OpenSUSE today and followed the installation instructions for other distributions, i.e. unzipping the release in my root dir. After a reboot, I am still not able to select the keyboard layout in the keyboard settings.

Do you have an idea how I can fix this?

Some system info, let me know if you need more:

  • OS: OpenSUSE Tumbleweed
  • GNOME 43.2 (Wayland)
  • Proof the unzip was done correctly:
head -n 3 /usr/share/X11/xkb/symbols/us_qwerty-fr

partial alphanumeric_keys 
xkb_symbols "qwerty-fr"
@devnoname120
Copy link
Member

What's the output of setxkbmap -print -verbose 10?

@mark-gerarts
Copy link
Author

$ setxkbmap -print -verbose 10
Setting verbose level to 10
WARNING: Running setxkbmap against an XWayland server
locale is C
Trying to load rules file ./rules/evdev...
Trying to load rules file /usr/share/X11/xkb/rules/evdev...
Success.
Applied rules from evdev:
rules:      evdev
model:      pc105
layout:     us
Trying to build keymap using the following components:
keycodes:   evdev+aliases(qwerty)
types:      complete
compat:     complete
symbols:    pc+us+inet(evdev)
geometry:   pc(pc105)
xkb_keymap {
	xkb_keycodes  { include "evdev+aliases(qwerty)"	};
	xkb_types     { include "complete"	};
	xkb_compat    { include "complete"	};
	xkb_symbols   { include "pc+us+inet(evdev)"	};
	xkb_geometry  { include "pc(pc105)"	};
};

@mark-gerarts
Copy link
Author

I get this as well, if that helps:

$ setxkbmap -layout "us" -variant "qwerty-fr" -verbose
WARNING: Running setxkbmap against an XWayland server
Warning! Multiple definitions of keyboard layout
         Using command line, ignoring X server
Trying to build keymap using the following components:
keycodes:   evdev+aliases(qwerty)
types:      complete
compat:     complete
symbols:    pc+us(qwerty-fr)+inet(evdev)
geometry:   pc(pc105)
Error loading new keyboard description

In the logs:

Jan 06 17:19:31 whirlpool gnome-shell[19463]: The XKEYBOARD keymap compiler (xkbcomp) reports:
Jan 06 17:19:31 whirlpool gnome-shell[19463]: > Error:            No Symbols named "qwerty-fr" in the include file "us"
Jan 06 17:19:31 whirlpool gnome-shell[19463]: >                   Exiting
Jan 06 17:19:31 whirlpool gnome-shell[19463]: >                   Abandoning symbols file "default"
Jan 06 17:19:31 whirlpool gnome-shell[19463]: Errors from xkbcomp are not fatal to the X server

@devnoname120
Copy link
Member

devnoname120 commented Jan 18, 2023

Could you run setxkbmap us_qwerty-fr -v 10 instead and see if the keyboard works?

If it doesn't work, please give me the output of:

localectl list-x11-keymap-layouts

@mark-gerarts
Copy link
Author

Output of setxkbmap:

$ setxkbmap us_qwerty-fr -v 10
Setting verbose level to 10
WARNING: Running setxkbmap against an XWayland server
locale is C
Warning! Multiple definitions of keyboard layout
         Using command line, ignoring X server
Trying to load rules file ./rules/evdev...
Trying to load rules file /usr/share/X11/xkb/rules/evdev...
Success.
Applied rules from evdev:
rules:      evdev
model:      pc105
layout:     us_qwerty-fr
Trying to build keymap using the following components:
keycodes:   evdev+aliases(qwerty)
types:      complete
compat:     complete
symbols:    pc+us_qwerty-fr+inet(evdev)
geometry:   pc(pc105)

There is no hard error now, but after running the command the layout still doesn't work.

localectl output:

$ localectl list-x11-keymap-layouts
af
al
am
ara
at
au
az
ba
bd
be
bg
br
brai
bt
bw
by
ca
cd
ch
cm
cn
custom
cz
de
dk
dz
ee
epo
es
et
fi
fo
fr
gb
ge
gh
gn
gr
hr
hu
id
ie
il
in
iq
ir
is
it
jp
ke
kg
kh
kr
kz
la
latam
lk
lt
lv
ma
mao
md
me
mk
ml
mm
mn
mt
mv
my
ng
nl
no
np
ph
pk
pl
pt
ro
rs
ru
se
si
sk
sn
sy
tg
th
tj
tm
tr
tw
tz
ua
us
uz
vn
za

@devnoname120
Copy link
Member

I'm not familiar with OpenSUSE. I'd recommend to ask in the community of this distribution, and report back once your issue is fixed so that we can update the documentation.

@mark-gerarts
Copy link
Author

Okay, I've got something working following the instructions from here and here. I'll detail my steps here:

  • $XDG_CONFIG_HOME is not set for me. The default is $HOME/.config, so I'll use that.
  • Make the directory structure as suggested:
    • mkdir -p ~/.config/xkb/symbols
    • mkdir -p ~/.config/xkb/rules
  • Copy the contents of the symbols file to ~/.config/xkb/symbols/us_qwerty-fr
  • Create the file ~/.config/xkb/rules/evdev.lst with the following content:
! layout
  us_qwerty-fr	English (US, qwerty-fr)
  • Create the file ~/.config/xkb/rules/evdev.xml with the following content:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xkbConfigRegistry SYSTEM "xkb.dtd">
<xkbConfigRegistry version="1.1">
  <layoutList>
    <layout>
      <configItem>
        <name>us_qwerty-fr</name>
        <shortDescription>English (US, qwerty-fr)</shortDescription>
        <description>English (US, qwerty-fr)</description>
      </configItem>
    </layout>
  </layoutList>
</xkbConfigRegistry>

Now, I don't know if this is mandatory, but I noticed that /usr/share/X11/xkb/rules has symlinks pointing from base.xml to evdev.xml and from base.lst to evdev.lst, so I did the same in my local config.

cd ~/.config/xkb/rules
ln -s evdev.lst base.lst
ln -s evdev.xml base.xml

You need to logout and back in at this point. Then, go to Gnome: Settings > Keyboard to add a new input source. In the popup window I had to click on the three dots, scroll all the way down to "other", and then choose "English (US, qwerty-fr)".

I will check the following things once I have some more time & report back:

  • Check if the symlinks are actually necessary
  • Check if I can change the config to make it a variant of the regular US layout, since that seems more logical

@devnoname120
Copy link
Member

@mark-gerarts Does it work as well if you do the same steps but this time using /usr/share/X11/xkb/ as a base path instead of ~/.config/xkb/?

@mark-gerarts
Copy link
Author

Yes, that does work as well but requires modifying the existing /usr/share/X11/xkb/rules/evdev.lst and evdev.xml files. During my research I read that those files can get replaced after updates, so that's why I went for the ~/.config route.

@devnoname120
Copy link
Member

devnoname120 commented Feb 22, 2023

Note to self:

Some alternatives

@gdesmott
Copy link

gdesmott commented Dec 9, 2023

Okay, I've got something working following the instructions from here and here. I'll detail my steps here:

For the record those steps worked on Fedora (Silverblue) as well, as long as I'm using Wayland; it doesn't work on X11.

Thanks!

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

No branches or pull requests

3 participants