rvaiya / keyd

A key remapping daemon for linux.
MIT License
2.53k stars 154 forks source link

Unicode in Brave #196

Closed fedoranvar closed 2 years ago

fedoranvar commented 2 years ago

Good day to you!

Unicode characters works good in terminals, telegram, firefox, thunderbird, etc. but for some reason it doesn't work in Brave. (but xkbmap works fine) image

Thank you!

rvaiya commented 2 years ago

Are you using wayland?

fedoranvar commented 2 years ago

Im using wayland

rvaiya commented 2 years ago

It looks like chromium based browsers don't properly handle IMEs when using wayland. Apparently chrome was relying on gtk for its IME processing.

Using --gtk-version=4, should restore support for this, provided you have gtk4 installed , though it seems to choke on the currently generated file. Running it under XWayland should also fix the problem. I will have to investigate the gtk issue further.

fedoranvar commented 2 years ago

@rvaiya thank you!

i'll try it!

fedoranvar commented 2 years ago

--gtk-version=4 - didn't worked. also tried GDK_BACKEND=x11 - still issue persist.

rvaiya commented 2 years ago

Can you clarify by what you mean by 'doesn't work'? Adding --gtk-version=4 should cause it to try and use gtk to parse the compose file (provided you have gtk4 installed), which will in turn cause it to crash since the parsing logic doesn't like something about keyd's compose file.

I am in the process of trying to figure out what this is, but you can temporarily fix the issue by manually trimming the file to include only the definitions of interest.

fedoranvar commented 2 years ago

Can you clarify by what you mean by 'doesn't work'?

i've installed gtk4 and launched brave --gtk-version=4 - and issue persist.

rvaiya commented 2 years ago

Does brave crash? (it should). If not, then it seems it isn't using gtk4 for parsing. It may be that you are running under X wayland. Can you try the following flags?

--enable-features=UseOzonePlatform --ozone-platform=wayland --gtk-version=4
fedoranvar commented 2 years ago

tried

 brave --enable-features=UseOzonePlatform --ozone-platform=wayland --gtk-version=4

didn't crashed and issue still persist here logs from terminal:

logs ``` (brave:10260): Gtk-WARNING **: 21:47:04.824: Could not load a pixbuf from icon theme. This may indicate that pixbuf loaders or the mime database could not be found. [10260:10304:0430/214704.838417:ERROR:object_proxy.cc(623)] Failed to call method: org.freedesktop.DBus.Properties.Get: object_path= /org/freedesktop/portal/desktop: org.freedesktop.DBus.Error.InvalidArgs: No such interface “org.freedesktop.portal.FileChooser” [10260:10304:0430/214704.838447:ERROR:select_file_dialog_linux_portal.cc(242)] Failed to read portal version property [10313:10313:0430/214704.843533:ERROR:egl_util.cc(74)] Failed to load GLES library: libGLESv2.so.2: libGLESv2.so.2: cannot open shared object file: No such file or directory [10313:10313:0430/214704.845106:ERROR:viz_main_impl.cc(188)] Exiting GPU process due to errors during initialization [10342:10342:0430/214704.928753:ERROR:egl_util.cc(74)] Failed to load GLES library: libGLESv2.so.2: libGLESv2.so.2: cannot open shared object file: No such file or directory [10342:10342:0430/214704.930411:ERROR:viz_main_impl.cc(188)] Exiting GPU process due to errors during initialization [10260:10390:0430/214705.113894:ERROR:object_proxy.cc(623)] Failed to call method: org.freedesktop.DBus.Properties.Get: object_path= /org/freedesktop/UPower: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.UPower was not provided by any .service files [10260:10390:0430/214705.114814:ERROR:object_proxy.cc(623)] Failed to call method: org.freedesktop.UPower.GetDisplayDevice: object_path= /org/freedesktop/UPower: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.UPower was not provided by any .service files [10260:10390:0430/214705.115720:ERROR:object_proxy.cc(623)] Failed to call method: org.freedesktop.UPower.EnumerateDevices: object_path= /org/freedesktop/UPower: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.UPower was not provided by any .service files [10397:10397:0430/214705.127249:ERROR:egl_util.cc(74)] Failed to load GLES library: libGLESv2.so.2: libGLESv2.so.2: cannot open shared object file: No such file or directory [10397:10397:0430/214705.128871:ERROR:viz_main_impl.cc(188)] Exiting GPU process due to errors during initialization [10450:10450:0430/214705.173745:ERROR:egl_util.cc(74)] Failed to load GLES library: libGLESv2.so.2: libGLESv2.so.2: cannot open shared object file: No such file or directory [10450:10450:0430/214705.175319:ERROR:viz_main_impl.cc(188)] Exiting GPU process due to errors during initialization [10486:10486:0430/214705.207143:ERROR:egl_util.cc(74)] Failed to load GLES library: libGLESv2.so.2: libGLESv2.so.2: cannot open shared object file: No such file or directory [10486:10486:0430/214705.208701:ERROR:viz_main_impl.cc(188)] Exiting GPU process due to errors during initialization [10519:10519:0430/214705.228498:ERROR:egl_util.cc(74)] Failed to load GLES library: libGLESv2.so.2: libGLESv2.so.2: cannot open shared object file: No such file or directory [10519:10519:0430/214705.230199:ERROR:viz_main_impl.cc(188)] Exiting GPU process due to errors during initialization [10542:10542:0430/214705.240179:ERROR:egl_util.cc(74)] Failed to load GLES library: libGLESv2.so.2: libGLESv2.so.2: cannot open shared object file: No such file or directory [10542:10542:0430/214705.241757:ERROR:viz_main_impl.cc(188)] Exiting GPU process due to errors during initialization [10584:10584:0430/214705.259047:ERROR:egl_util.cc(74)] Failed to load GLES library: libGLESv2.so.2: libGLESv2.so.2: cannot open shared object file: No such file or directory [10584:10584:0430/214705.260680:ERROR:viz_main_impl.cc(188)] Exiting GPU process due to errors during initialization [10606:10606:0430/214705.278481:ERROR:egl_util.cc(74)] Failed to load GLES library: libGLESv2.so.2: libGLESv2.so.2: cannot open shared object file: No such file or directory [10606:10606:0430/214705.280014:ERROR:viz_main_impl.cc(188)] Exiting GPU process due to errors during initialization [10620:10620:0430/214705.292247:ERROR:egl_util.cc(74)] Failed to load GLES library: libGLESv2.so.2: libGLESv2.so.2: cannot open shared object file: No such file or directory [10620:10620:0430/214705.293879:ERROR:viz_main_impl.cc(188)] Exiting GPU process due to errors during initialization [10627:10627:0430/214705.305481:ERROR:egl_util.cc(74)] Failed to load GLES library: libGLESv2.so.2: libGLESv2.so.2: cannot open shared object file: No such file or directory [10627:10627:0430/214705.307105:ERROR:viz_main_impl.cc(188)] Exiting GPU process due to errors during initialization [10634:10634:0430/214705.317439:ERROR:egl_util.cc(74)] Failed to load GLES library: libGLESv2.so.2: libGLESv2.so.2: cannot open shared object file: No such file or directory [10634:10634:0430/214705.318994:ERROR:viz_main_impl.cc(188)] Exiting GPU process due to errors during initialization [10641:10641:0430/214705.343608:ERROR:egl_util.cc(74)] Failed to load GLES library: libGLESv2.so.2: libGLESv2.so.2: cannot open shared object file: No such file or directory [10641:10641:0430/214705.345287:ERROR:viz_main_impl.cc(188)] Exiting GPU process due to errors during initialization [10648:10648:0430/214705.356937:ERROR:egl_util.cc(74)] Failed to load GLES library: libGLESv2.so.2: libGLESv2.so.2: cannot open shared object file: No such file or directory [10648:10648:0430/214705.358429:ERROR:viz_main_impl.cc(188)] Exiting GPU process due to errors during initialization [10655:10655:0430/214705.371682:ERROR:egl_util.cc(74)] Failed to load GLES library: libGLESv2.so.2: libGLESv2.so.2: cannot open shared object file: No such file or directory [10655:10655:0430/214705.373293:ERROR:viz_main_impl.cc(188)] Exiting GPU process due to errors during initialization [10662:10662:0430/214705.384202:ERROR:egl_util.cc(74)] Failed to load GLES library: libGLESv2.so.2: libGLESv2.so.2: cannot open shared object file: No such file or directory [10662:10662:0430/214705.385735:ERROR:viz_main_impl.cc(188)] Exiting GPU process due to errors during initialization [10669:10669:0430/214705.398402:ERROR:egl_util.cc(74)] Failed to load GLES library: libGLESv2.so.2: libGLESv2.so.2: cannot open shared object file: No such file or directory [10669:10669:0430/214705.400463:ERROR:viz_main_impl.cc(188)] Exiting GPU process due to errors during initialization [10681:10681:0430/214705.411832:ERROR:egl_util.cc(74)] Failed to load GLES library: libGLESv2.so.2: libGLESv2.so.2: cannot open shared object file: No such file or directory [10681:10681:0430/214705.414060:ERROR:viz_main_impl.cc(188)] Exiting GPU process due to errors during initialization [10688:10688:0430/214705.421631:ERROR:egl_util.cc(74)] Failed to load GLES library: libGLESv2.so.2: libGLESv2.so.2: cannot open shared object file: No such file or directory [10688:10688:0430/214705.423312:ERROR:viz_main_impl.cc(188)] Exiting GPU process due to errors during initialization [10695:10695:0430/214705.431051:ERROR:egl_util.cc(74)] Failed to load GLES library: libGLESv2.so.2: libGLESv2.so.2: cannot open shared object file: No such file or directory [10695:10695:0430/214705.432974:ERROR:viz_main_impl.cc(188)] Exiting GPU process due to errors during initialization [10702:10702:0430/214705.465038:ERROR:sandbox_linux.cc(377)] InitializeSandbox() called with multiple threads in process gpu-process. [10376:7:0430/214705.495893:ERROR:command_buffer_proxy_impl.cc(125)] ContextResult::kTransientFailure: Failed to send GpuControl.CreateCommandBuffer. [10260:10260:0430/214707.502596:ERROR:CONSOLE(1)] "[Shields]: Can't request shields panel data for tabId: 63. Error: No tab url specified", source: chrome-extension://mnojpmjdmbbfmejpflffifhffcmidifd/out/brave_extension_background.bundle.js (1) [10260:10260:0430/214707.502686:ERROR:CONSOLE(1)] "[Shields]: Can't request shields panel data for tabId: 63. Error: No tab url specified", source: chrome-extension://mnojpmjdmbbfmejpflffifhffcmidifd/out/brave_extension_background.bundle.js (1) Fontconfig error: Cannot load default config file: No such file: (null) Fontconfig error: Cannot load default config file: No such file: (null) [10260:10260:0430/214723.073042:ERROR:CONSOLE(14)] "Failed to handle media duration metadata: missing publisher key for media key youtube_K-588vDB8bQ", source: chrome-extension://mnojpmjdmbbfmejpflffifhffcmidifd/out/brave_extension_background.bundle.js (14) ```
rvaiya commented 2 years ago

What distro are you using? What version of brave are you running? (brave --version). Are you sure you have gtk4 installed?

fedoranvar commented 2 years ago

version: Brave Browser 100.1.37.109 distro: NixOS installed gtk4 by installing unstable.gtk4

rvaiya commented 2 years ago

I'm not terribly familiar with NixOS, but my understanding is that packages are hermetically sealed and contain all of their dependencies. Would your brave package have access to gtk4 on the system? I assume you would need to add gtk4 to the brave package itself.

rvaiya commented 2 years ago

Closing due to inactivity. Feel free to reopen it.

rvaiya commented 1 year ago

Were you ever able to get this to work? Another solution might be to try looking for any --ozone-* flags in the brave wrapper scripts and removing them, or alternatively explicitly specifying --ozone-platform=x11. See also #273.