Typing emoji in Lubuntu 18.10 using ibus
Hey there 👋. Sometimes I just want to add an emoji (emoticon, whatever you want to call it) to some text. By default, I do not know of a simple way to do this in my Lubuntu installation. Either I search for it online and copy paste from some website or I have to count on remembering the unicode number. Neither of them are really a nice solution. I had read that there was a workaround using ibus, but found it a bit tricky to set up the first time just because I had no experience with ibus. Thus, I am jotting down my experience here.
Usually, ibus is used by people wanting to write in different scripts. From what I gather, you can set it up for your favourite language so that you can type things on a regular QWERTY keyboard and it will give you suggestions of other characters. I assume this is in the manner of typing in something in Chinese using Latin script and ibus suggesting the proper Chinese characters.
So, naturally, somebody decided to apply this to typing in emoji. Type in
wave
and it will suggest 👋, ⬿, ⤳, and other similar emojis. This way you
only need to remember the name of an emoji to type it out and without the need
to switch to a different window or application like you would if needing to
search for it online.
Here are the steps I used to get things set up nicely on both a Lubuntu 18.04 install and an 18.10 install that I had upgraded from an 18.04 install.
First, we install some packages. ibus
, naturally, and gir1.2-ibus-1.0
to
get the emoji library working. You will also need to have a python
installation, but as far as I am aware the various Ubuntus still ship with
that.
apt install ibus gir1.2-ibus-1.0
Next, download the latest release from
salty-horse/ibus-uniemoji.
Unzip or untar it and follow the directions from that GitHub page. At the time
of writing that means: go into the directory and run sudo make install
, then
start (or restart) ibus
(ibus restart
).
In your notification panel, there should be an icon for ibus now. Likely a keyboard or the language you are typing in. Right click the icon and go to Preferences. Select the Input Method tab and check the list of, well, input methods listed there. Ensure your regular one is there (e.g., in my case that means “English - English (international AltGr dead keys)”). Next, add the emoji input. Click Add, expand the choices and scroll down to Other. Click it, then select uniemoji. It should appear in the list.
Next you need to ensure that ibus
starts when you boot up. In 18.04 you can
do this through the “Default Applications for LXSession” system preference, the
autostart tab in it. For 18.10 this is in the session settings. No matter which
of the two, add ibus --xim
to the autostart. On 18.10 I made it wait for the
system tray. Note that I am unsure whether that is required. Similarly, I am
unsure whether I need the --xim
option or whether it will do without it.
Finally, you need Lubuntu to accept that ibus is taking over. Just pick Preferences → Language Support and select IBus in the Keyboard input method system dropdown. Note that as far as I am aware this is a configuration application from 18.04 that I happened to still have on my upgraded 18.10 installation. I did not test a situation with a fresh 18.10 installation. Do you need to install this particular configuration application? Do you not need it at all? This was not necessarily clear to me.
After all this, you will want to restart your computer. I know I know, a pain.
The apt install
from before triggered this, I was just postponing it till
after we set up everything. This way, your session can start afresh with the
changes you made.
When you have logged in, the ibus icon should once again appear in your notification panel.If everything went right, you should still be able to type as you always do in your layout of choice. However, now press Super+Space (Super is often “the Windows button”) and a little window should pop up in the middle of your screen showing your input methods. A bit like what happens when pressing Alt+Tab to switch programs. Press Super+Space to select the uniemoji input. Now when you start typing, a window should pop up showing different emoji. Pick the one you want. When you are done typing emoji, press Super+Space again to go back to your regular input method (e.g., English).
Success! 🎉🥂💃🎊🙌