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

For Linux users without privileges, advise to use xkbcomp tool #83

Open
JulioJu opened this issue Jun 3, 2019 · 11 comments
Open

For Linux users without privileges, advise to use xkbcomp tool #83

JulioJu opened this issue Jun 3, 2019 · 11 comments

Comments

@JulioJu
Copy link

JulioJu commented Jun 3, 2019

Hi !

On https://qwerty-lafayette.org/#_lafayette , For Linux users who have not root privileges, it could be cool to advise to use the xkbcomps tool. For Wayland users, it could cause problems but often in computers without privileges right it's still the X-Org server who is installed (at least at my university).

@fabi1cazenave
Copy link
Owner

I agree we should have a “portable” Linux layout, as we now have a portable Windows one (PKL). There’s no such issue on OSX, as any keyboard layout can be installed either in user-space or system-wide.

My main worry is that the .xkb layout raised a lot of bug reports (mostly about media keys not working, sometimes worse) — and there are good chances to believe it won’t be supported any more in the near future.

If we publish an .xkb again, we should probably add some instructions and disclaimers in the “Download” section and/or in the file header.

@JulioJu
Copy link
Author

JulioJu commented Jun 3, 2019

Lot of warnings are shown, but don't cause any problem for me and at least for French and English. Could you confirm again @GuillaumeSeren (see #73 ) ? As you said « It's just a warning », could you confirm it? I use only this way, every day since many year to change my layout and it works very well. It works well even on Unity Desktop at the University.

Media keys works perfectly with xkbcomp.

The only problem is with Wayland, as it doesn't support to customize the keyboard layout without privileges and will never support it for security reason. They say that it's the job of the the client (i.e. the Desktop Manager) to do that. See https://news.ycombinator.com/item?id=16406829 .or https://askubuntu.com/questions/991742/modifying-keyboard-layout-in-wayland )

@GuillaumeSeren
Copy link

hello ! ☕

Could you confirm again @GuillaumeSeren (see #73 ) ?

Yes !
I still use it, on both laptop and desktop using that trick, thats not the cleanest (I get some warnings),
but thats worked well,

└─> ~/.local/bin/xkalamine apply ~/src/free/github/guillaumeseren/qwerty-lafayette/layouts/qwerty.yaml 

Warning:          Unsupported high keycode 372 for name <I372> ignored
                  X11 cannot support keycodes above 255.
                  This warning only shows for the first high keycode.

@JulioJu
Copy link
Author

JulioJu commented Jun 3, 2019

@GuillaumeSeren thanks to confirm it ;-) So cool !

I use the old command

$ xkbcomp -w9 /opt/lafayette_linux_v0.6.xkb $DISPLAY 

As it even on a computer without Python 3 installed, we could use Lafayette very easy ! 

Actually I use https://raw.githubusercontent.com/fabi1cazenave/qwerty-lafayette/master/releases/lafayette_linux_v0.6.xkb

@jreybert
Copy link

jreybert commented Jun 3, 2022

I see this issue has not been updated since 2019.

I never had to go into keyboard mapping until I tried (and adopted) lafayette, and I was mentally fine until then.

I work with a rootless linux environment (Rocky 8.5). I blindly tried tried a lot of combination from this thread and from xkb web page, the only working setup is from @julio, with a lot of warning. At a first glance, it seems to work.

xkbcomp -w9 /opt/lafayette_linux_v0.6.xkb $DISPLAY 

Would it be possible to publish a .xkb file for the last 0.6.1. Or to highlight a safer method?

Futhermore, I would like to keep it userland, because in the next month I think I will adapt the mapping a bit for me.

@maggick
Copy link
Contributor

maggick commented Jun 5, 2022

Not the latest version but still: https://github.com/maggick/dotfiles/blob/master/lafayette.xkb

@fabi1cazenave
Copy link
Owner

In my understanding, xkbcomp will only work on Xorg environments… so it feels like it’s doomed.

Is there still a use case for a version that requires non-root privileges on non-Wayland systems?

@fabi1cazenave
Copy link
Owner

I totally missed that, but it looks like there’s a non-privileged option nowadays: https://xkbcommon.org/doc/current/md_doc_user_configuration.html

If that works, the installer could be modified to store the layout either in $XDG_CONFIG/xkb (when run as user) or in /usr/share/X11/xkb (when run as root). I’ll have a look.

@Delapouite
Copy link
Contributor

I confirm that my custom-layout has been living inside $XDG_CONFIG/xkb for a while without noticable issue.

@fabi1cazenave
Copy link
Owner

@Delapouite your help would be appreciated here. ;-)

I’ve copied the relevant parts of /usr/share/X11/xkb/rules/{base,evdev}.xml into ~/.config/xkb/rules/, and the layout definition in ~/.config/xkb/symbols/fr. Now what should I do ?

Is there a setxkbmap command I can run to apply the layout ? (Even if it only works on Xorg ?)

@fabi1cazenave
Copy link
Owner

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

6 participants