Cool VL Viewer forum

View unanswered posts | View active topics It is currently 2025-02-12 05:16:39



Reply to topic  [ 7 posts ] 
Ibus and the viewer 
Author Message

Joined: 2011-09-27 11:18:31
Posts: 220
Reply with quote
I installed ibus recently on my gentoo linux box. I set
Code:
GTK_IM_MODULE=ibus
QT_IM_MODULE=ibus
XMODIFIERS=@im=ibus

and
Code:
export XMODIFIERS=@im=ibus
export GTK_IM_MODULE=ibus
export QT_IM_MODULE=ibus

in ~/.bashrc for good measure. I added ibus-daemon -dr --panel=/usr/libexec/kimpanel-ibus-panel in /usr/lib64/libexec/kimpanel-ibus-panel as per the Gentoo instructions (I use KDE) and everything works fantastic throughout the system… except for the viewer. The viewer takes my xkb settings (so it changes layouts and uses the Compose key properly), as it did without ibus, with proper xim, but the ibus special features don't work, therefore I assume the viewer still uses xim.

I thought to export the variables in ~/.secondlife/cool_vl_viewer.conf too, but that didn't change anything. I checked the cool_vl_viewer script for any similar setting, but all it has is the
Code:
if [ "$GTK_IM_MODULE" == "scim" ]; then
    export GTK_IM_MODULE=xim
fi

lines (121­–123), which are not relevant, but still I tried removing to no avail.

I should note that ibus does not work for me on Firestorm either (I cannot test Alchemy, since I do not have systemd, and there is no native LL viewer currently for me to test). Ironically, it does work on LL viewer under wine.

I would be grateful for any ideas. Thanks!

EDIT: ibus works on CoolVLViewer on Windows under Wine too.


2024-09-17 16:50:28
Profile

Joined: 2009-03-17 18:42:51
Posts: 5912
Reply with quote
Wine is likely compiled with ibus support for the Windows DLLs it uses/emulates... The Linux viewers are not: they use SDL2 for keyboard input.

It might be possible to compile SDL2 with ibus support (but I won't do it for the official builds, since it would involve making the viewer depend on exotic libraries, while 99% of the users do not use ibus), or you might be able to use a SDL2 library with ibus support from your distribution.

You could try and install the SDL2 library packages from your distro (they will need to provide libSDL2-2.0.so.0 for the viewer to work with them), then delete or move lib/libSDL2-2.0.so.0 from the viewer installation directory...

On a side note, GTK_IM_MODULE is not even needed any more (I got rid of the GTK dependency for the viewer years ago), so I will remove this deprecated stuff from the wrapper script in next release. Only export XMODIFIERS=@im=ibus would be needed, and you could set it via cool_vl_viewer.conf, like so:
Code:
echo "export XMODIFIERS=@im=ibus" >>~/.secondlife/cool_vl_viewer.conf


2024-09-17 18:40:02
Profile WWW

Joined: 2011-09-27 11:18:31
Posts: 220
Reply with quote
Henri Beauchamp wrote:
Wine is likely compiled with ibus support for the Windows DLLs it uses/emulates... The Linux viewers are not: they use SDL2 for keyboard input.

It might be possible to compile SDL2 with ibus support […] You could try and install the SDL2 library packages from your distro (they will need to provide libSDL2-2.0.so.0 for the viewer to work with them), then delete or move lib/libSDL2-2.0.so.0 from the viewer installation directory...

Is it that simple!? I have /usr/lib/libSDL2-2.0.so.0.2800.5 (with its links). All right, I'll try it tomorrow :)

I thought it was something wrong with my system, because, according to this post the control-alt-u combination should not work in the viewer to reload the selected texture, being withheld by ibus, while on my viewer it works. Therefore, I assumed that ibus should work with the viewer.

Henri Beauchamp wrote:
On a side note, GTK_IM_MODULE is not even needed any more (I got rid of the GTK dependency for the viewer years ago), so I will remove this deprecated stuff from the wrapper script in next release. Only export XMODIFIERS=@im=ibus would be needed, and you could set it via cool_vl_viewer.conf, like so:
Code:
echo "export XMODIFIERS=@im=ibus" >>~/.secondlife/cool_vl_viewer.conf

All right. Thanks!


2024-09-17 18:56:52
Profile

Joined: 2011-09-27 11:18:31
Posts: 220
Reply with quote
Henri Beauchamp wrote:
I got rid of the GTK dependency for the viewer years ago.

Indeed you have. Which raises the question: what are the current dependencies of the viewer? Only the ones the --check-libs switch looks for?


2024-09-17 18:59:34
Profile

Joined: 2009-03-17 18:42:51
Posts: 5912
Reply with quote
g0rd0ngrfr33mailgr wrote:
Which raises the question: what are the current dependencies of the viewer? Only the ones the --check-libs switch looks for?
Yes: this check uses ldd, which will find all dependencies recursively (meaning that if you replace one of the bundled libraries with one from your system, the dependency tree will change but will be checked just fine too).


2024-09-17 19:02:25
Profile WWW

Joined: 2011-09-27 11:18:31
Posts: 220
Reply with quote
It works blindly, in the sense that you don't see what you're typing until you've finished typing it and it appears (the xim way when we use, say, the compose key to type ⇒), but it works. And that is a native way to write emojis (and CJK, but I'm not interested in them) in the viewer :D Thanks, Henri! For the record, all I did was compile the viewer myself (which I did anyway) and then delete the lib/libSDL2-2.0.so.0 from the viewer installation directory.

I don't understand it, though. I thought I had to compile the viewer against the system SDL2 library, so I ran the build script with the -e switch, but ibus didn't work. I deleted the viewer's libSDL2-2.0.so.0 and it worked, and then I saw that my own self-compiled viewer from Saturday worked with ibus if I deleted the viewer's libSDL2-2.0.so.0. So it doesn't need to be compiled against it, just find it in my system?


2024-09-18 14:53:57
Profile

Joined: 2009-03-17 18:42:51
Posts: 5912
Reply with quote
g0rd0ngrfr33mailgr wrote:
I don't understand it, though. I thought I had to compile the viewer against the system SDL2 library, so I ran the build script with the -e switch, but ibus didn't work. I deleted the viewer's libSDL2-2.0.so.0 and it worked, and then I saw that my own self-compiled viewer from Saturday worked with ibus if I deleted the viewer's libSDL2-2.0.so.0. So it doesn't need to be compiled against it, just find it in my system?
You don't need to recompile the viewer yourself, just to delete lib/libSDL2-2.0.so.0 from the viewer installation directory so that it will search your system's libraries, instead, to get SDL2. The "magic" happens via the LD_LIBRARY_PATH environment variable set by the wrapper script: it gives the priority to the lib/ sub-directory bundled with the viewer, and then falls back to the standard paths (as configured for your distro: usually /lib;/usr/lib; etc).

You may however compile a viewer against your system libraries (where possible, which is the case for SDL2), but you might need to install "devel" packages so that the build system finds them and does not fall back to the pre-compiled libraries: for SDL2, install the corresponding "devel" package(s) provided by your distro, then compile the viewer with the "--usesystemlibs" (or just "-u" for short), passed to the linux-build.sh script.


2024-09-18 16:57:17
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 7 posts ] 

Who is online

Users browsing this forum: No registered users and 71 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.