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

[Bug]: tigervnc: Unable to setup a Compose Key #14491

Closed
2 tasks done
Iey4iej3 opened this issue Jan 12, 2023 · 12 comments
Closed
2 tasks done

[Bug]: tigervnc: Unable to setup a Compose Key #14491

Iey4iej3 opened this issue Jan 12, 2023 · 12 comments
Labels
enhancement x11 Issue is related to stuff requiring X11 environment or x11-packages

Comments

@Iey4iej3
Copy link

Iey4iej3 commented Jan 12, 2023

Problem description

The compose key is not working properly.

There are two issues, as far as I see:

  • Emptiness of Compose files: the Compose files in ${PREFIX}/share/X11/locale are all empty for all locales. It seems that the package libx11 is not built correctly;
  • TigerVNC does not work even with Compose file: I copied a Compose file from my Debian Linux to $HOME/.XCompose. Then under termux-x11, the compose key is activated after setxkbmap -option "compose:ralt". However, under TigerVNC, it does not work.

What steps will reproduce the bug?

  1. vncserver :0;
  2. export DISPLAY=:0;
  3. setxkbmap -option "compose:ralt";
  4. Try to press a compose sequence, say, Alt_R+'+e

What is the expected behavior?

Produce é

System information

termux-info:

Termux Variables:
TERMUX_API_VERSION=0.50.1
TERMUX_APK_RELEASE=F_DROID
TERMUX_APP_PACKAGE_MANAGER=apt
TERMUX_APP_PID=30173
TERMUX_IS_DEBUGGABLE_BUILD=0
TERMUX_MAIN_PACKAGE_FORMAT=debian
TERMUX_VERSION=0.118.0
Packages CPU architecture:
aarch64
Subscribed repositories:
# sources.list
deb https://packages-cf.termux.dev/apt/termux-main stable main
# x11-repo (sources.list.d/x11.list)
deb https://packages-cf.termux.dev/apt/termux-x11 x11 main
Updatable packages:
All packages up to date
termux-tools version:
1.35.0
Android version:
12
Kernel build information:
Linux localhost 4.14.299-gcd41c6b2be18 #1 SMP PREEMPT Sun Dec 18 22:07:16 UTC 2022 aarch64 Android
Device manufacturer:
samsung
Device model:
SM-P610
@Iey4iej3 Iey4iej3 added bug report Something is not working properly untriaged labels Jan 12, 2023
@xtkoba xtkoba added the x11 Issue is related to stuff requiring X11 environment or x11-packages label Jan 12, 2023
@xtkoba
Copy link
Contributor

xtkoba commented Jan 12, 2023

Partially a duplicate of #13362 I suppose.

@Iey4iej3
Copy link
Author

Iey4iej3 commented Jan 12, 2023

I don't see how that one is related. If I understand correctly, that issue is about a different keyboard layout under which one could input accents directly, and the x11 captures the signal but failed to deal with it.

I am talking about a different issue: the compose key is not recognized at all. It is not a low-level issue: the Alt_R is recognized by xev, and if I understand correctly, it is treated as a normal Alt by x11, but not as a compose key.

@xtkoba
Copy link
Contributor

xtkoba commented Jan 12, 2023

In that locale support is broken in libX11. So I thought the first one of the two issues might be related. I suppose the second one is not much related.

Of course I might be wrong, but the directory name $PREFIX/share/X11/locale suggested that.

@xtkoba
Copy link
Contributor

xtkoba commented Jan 12, 2023

Some observation:

  • $PREFIX/share/X11/locale/C/Compose being empty seems to be normal, as that is the same as in my Gentoo GNU/Linux environment.

  • Bionic libc does not have proper locale support. Other than C (POSIX) locale, only C.UTF-8 is supported. But directory $PREFIX/share/X11/locale/C.UTF-8/ does not exist.

@xtkoba xtkoba removed the untriaged label Jan 12, 2023
@Iey4iej3
Copy link
Author

  • $PREFIX/share/X11/locale/C/Compose being empty seems to be normal, as that is the same as in my Gentoo GNU/Linux environment.

What is abnormal is that all of them are empty. I checked by find -name Compose -exec ls -l {} \;.

@xtkoba
Copy link
Contributor

xtkoba commented Jan 12, 2023

What is abnormal is that all of them are empty. I checked by find -name Compose -exec ls -l {} \;.

I'm aware of it. As I wrote above, Bionic can only handle C or C.UTF-8 locales. Directories for other locales are not supposed to be handled in the first place.

xtkoba added a commit that referenced this issue Jan 22, 2023
termux-pacman-bot added a commit to termux-pacman/termux-packages that referenced this issue Jan 22, 2023
@xtkoba
Copy link
Contributor

xtkoba commented Jan 22, 2023

The first issue has been resolved. It was due to misconfiguration of RAWCPP. My guess in the discussion above was completely wrong, to my shame.

@xtkoba
Copy link
Contributor

xtkoba commented Jan 22, 2023

Is TigerVNC/tigervnc#962 related to the second issue?

@Iey4iej3
Copy link
Author

-RawKeyboard (or -RawKeyboard=1) does not seem to work (on AVNC or MultiVNC).

I tried to see what happens under xev. Without extra setup, when I press right Alt, it is recognized as Alt_R. If setxkbmap -option "compose:ralt" is run, when I press right Alt, it shows as Alt_L (on a Linux device, when the compose key is correctly set, it should be MultiKey).

@xtkoba xtkoba changed the title [Bug]: X11: Unable to setup a Compose Key [Bug]: tigervnc: Unable to setup a Compose Key Jan 23, 2023
@xtkoba
Copy link
Contributor

xtkoba commented Jan 23, 2023

Quoted from TigerVNC/tigervnc#962 (comment):

Fortunately there is also an extension that allows switching to a key based system. You can enable it by setting -RawKeyboard=1 on the server. It requires support in the client though.

So presumably those VNC viewer apps for Android do not support this extension. In fact, I can make some key (Left Control; because Right Alt does not exist on my keyboard) shown as Multi key in xev with TigerVNC viewer 1.12.90 from Gentoo GNU/Linux.

@xtkoba xtkoba added enhancement and removed bug report Something is not working properly labels Jan 23, 2023
@xtkoba
Copy link
Contributor

xtkoba commented Jan 23, 2023

Enhancement on the client side. Strictly this is a third-party issue unless we provide a VNC viewer app on our own.

FYI, there is another issue in which the situation is similar: #14647.

@Iey4iej3
Copy link
Author

Iey4iej3 commented Mar 6, 2023

I confirm that Compose Keys are working with RawKeyboard parameter and a compatible client.

@Iey4iej3 Iey4iej3 closed this as completed Mar 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement x11 Issue is related to stuff requiring X11 environment or x11-packages
Projects
None yet
Development

No branches or pull requests

2 participants