Japanese input not working (Linux)

Have you tried putting

GTK_IM_MODULE=ibus
QT_IM_MODULE=ibus
XMODIFIERS=@im=ibus

somewhere? It is described more in this thread: Using Linux/Ubuntu but can't type in Japanese in ANKI

I’m not sure where you need to put those three lines; mine are in the file /etc/environment and ~/.xinitrc because I start my window manager with xinit. You will have to either log out/log back in or restart the OS after adding those lines; I can’t remember which.