25

After running in the terminal ibus exit, it successfully exited in the terminal. It was interfering with a program where it did not allow typing in that program. Or rather maybe the program was interfering with iBus.

Regardless, now that the use of the program is done, ibus restart was entered into the terminal to reactivate it, but now the only thing that comes out is Can't connect to iBus.

The same thing happens for other functional commands of ibus in the terminal.

Grateful for any feedback for how to turn ibus back on and off at will.

fosslinux
  • 3,831
Genesis
  • 251
  • 1
  • 3
  • 4

3 Answers3

26

ibus restart will only reset the internal state of ibus, so it doesn't work if ibus daemon is not running. If you want to start ibus again from the command line or in a shell script,

ibus-daemon &

seems do the trick.

Note that if ibus is already running, this command will automatically terminate the older instance (similar to ibus exit) and the new process will take place, so you probably do not need ibus exit and ibus restart.

fosslinux
  • 3,831
NullNoname
  • 1,391
  • 12
  • 13
6

The man page says that ibus restart restarts the ibus daemon, but this doesn't appear to be a very useful description of what it does. Rather it looks like what it really does is have a running daemon re-read the configuration files.

To start an ibus-daemon, and especially to keep it running even when you close the Gnome Terminal where you started it from, use the -d or --daemonize option like this:

$ ibus-daemon -d

Now you can close the terminal window and the ibus-daemon will continue to run.


I was having trouble with the cinnamon desktop crashing, and going into fallback mode, and then asking if I want to restart cinnamon. If I said yes, then suddenly typing a single quote didn't produce a single quote any more. Instead it produced nothing, that is until another key was struck, and then it produced a Diacritical. To get out of this incorrect (for me) input mode, I needed to restart the ibus daemon (I think*).

((I will probably update this the next time cinnamon crashes with a bit more information now that I've got a handle on what is going wrong.))


WHAT DOESN'T WORK: On Debian Bullseye if I enter:

$ nohup ibus-daemon & 

the ibus-daemon starts, but then stops immediately when I close the terminal window that was used to start it. In other words, the nohup doesn't work for this usage.


Background:

iBus is both for entering foreign languages and for entering emoticons. It uses what they call an 'input method', which is a way to use a keyboard of one sort or another to select from a much larger set of characters or symbols. There are 'input methods' for many different human languages. You can also easily have multiple languages and multiple keyboards that you use (or so it seems).

0
  1. First solution:

You can add these lines to file /home/$USER/.bashrc. First, you open file /home/$USER/.bashrc with this command:

sudo gedit ~/.bashrc

and then you add these lines to the .bashrc file:

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

Then, you logout and login again. This is my solution.

  1. Second solution: you can download the ibus engine that you want to use, example ibus-bamboo

Download ibus-bamboo:

cd Desktop
wget https://github.com/BambooEngine/ibus-bamboo/archive/master.zip -O ibus-bamboo.zip

or clone from github:

git clone https://github.com/BambooEngine/ibus-bamboo.git

Build & install

cd ibus-bamboo
sudo make install
sudo apt install ibus
sudo apt-get install ibus-gtk3

Then you restart ibus (After LOG OUT)

ibus restart
ibus-setup