ibus-uniemoji icon indicating copy to clipboard operation
ibus-uniemoji copied to clipboard

Install as user?

Open ldotlopez opened this issue 1 year ago • 4 comments

It's possible to install as user?

I recall doing it but that configuration was lost long time ago.

I can test it if someone points me the right paths.

ldotlopez avatar Jun 30 '23 08:06 ldotlopez

I see code in ibus to scan user directories, but it's disabled: https://github.com/ibus/ibus/blob/18f0d9f5f245f92dee086ce57a5bb94e63f1c222/src/ibusregistry.c#L270

Otherwise, you have to set IBUS_COMPONENT_PATH before starting ibus.

If you find anything, please let me know :)

salty-horse avatar Jun 30 '23 08:06 salty-horse

First attempt: installed ibus-uniemoji with make install -i DATADIR=$HOME/.local/share

On Debian 12 ibus seems to ignore IBUS_COMPONENT_PATH

$ export IBUS_COMPONENT_PATH=$HOME/.local/share/ibus/component
$ strace -f /usr/bin/ibus-daemon  -v  2>&1 | grep component
newfstatat(AT_FDCWD, "/usr/share/ibus/component", {st_mode=S_IFDIR|0755, st_size=4096, ...}, 0) = 0
openat(AT_FDCWD, "/usr/share/ibus/component", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 3
newfstatat(AT_FDCWD, "/usr/share/ibus/component/gtkextension.xml", {st_mode=S_IFREG|0644, st_size=461, ...}, 0) = 0
newfstatat(AT_FDCWD, "/usr/share/ibus/component/memconf.xml", {st_mode=S_IFREG|0644, st_size=437, ...}, 0) = 0
newfstatat(AT_FDCWD, "/usr/share/ibus/component/simple.xml", {st_mode=S_IFREG|0644, st_size=452075, ...}, 0) = 0
newfstatat(AT_FDCWD, "/usr/share/ibus/component/gtkpanel.xml", {st_mode=S_IFREG|0644, st_size=424, ...}, 0) = 0
newfstatat(AT_FDCWD, "/usr/share/ibus/component/dconf.xml", {st_mode=S_IFREG|0644, st_size=417, ...}, 0) = 0
[pid 84635] statx(AT_FDCWD, "/usr/share/ibus/component", 
AT_STATX_SYNC_AS_STAT|AT_SYMLINK_NOFOLLOW|AT_NO_AUTOMOUNT, STATX_ALL,  <unfinished ...>
...

No access to $HOME/.local/share/ibus/component are logged

ldotlopez avatar Jun 30 '23 10:06 ldotlopez

No attempts to read that environment variable either :-/

$ ltrace  -e getenv ibus-daemon 2>&1  | grep IBUS
libglib-2.0.so.0->getenv("IBUS_ADDRESS")         = nil
libglib-2.0.so.0->getenv("IBUS_ADDRESS_FILE")    = nil
libglib-2.0.so.0->getenv("IBUS_KEYMAP_PATH")     = nil
libglib-2.0.so.0->getenv("IBUS_KEYMAP_PATH")     = nil
libglib-2.0.so.0->getenv("IBUS_KEYMAP_PATH")     = nil
libglib-2.0.so.0->getenv("IBUS_ADDRESS_FILE")    = nil

ldotlopez avatar Jun 30 '23 10:06 ldotlopez

Solved!

  1. Delete generated files from ibus-uniemoji: make clean
  2. Install as user: make install -i DATADIR=$HOME/.local/share (for now I'm using -i to ignore some stuff)
  3. You need to remove the cache before adding anything to the IBUS_COMPONENT_PATH envvar: rm -r $HOME/.cache/ibus
  4. Export IBUS_COMPONENT_PATH to both paths (system and user): export IBUS_COMPONENT_PATH=/usr/share/ibus/component:$HOME/.local/share/ibus/component
  5. Replace running daemon: ibus-daemon --panel=disable --daemonize --replace
  6. Now you can see the uniemoji input method in ibus-setup

imagen

  1. Then you can use it in Gnome (after some delay?) under "Other" category

imagen

TODO

  • Figure out how to tweak custom.json

ldotlopez avatar Jun 30 '23 10:06 ldotlopez