[ Language select: 日本語 ]

1. Client environment

In the seminar room, Xubuntu is installed on ThinkPad as a terminal for working.

  • OS: Xubuntu (Distribution with lightweight desktop environment using Xfce instead of Ubuntu’s Gnome3) Distribution) (LTS) with lightweight desktop environment using

  • Packages: ibus, language-pack-en, docker, kubectl, etc.

For Network environment such as IP address, please refer to link:. /servers[about network configuration] page.

The ThinkPad and other computing environments located in Seminar Room 10 are built by Abe on his own.
If you notice any glitches or anything after you log in, please let me know right away.
(e.g. I logged in, but there is no home directory, no application, I don't know how to use it, etc.)

2. How to log in

On the Xubuntu login screen, select "Other…​" and enter your AINS ID and password in the same way as in the exercise room.

client.xubudesk login user switch

3. How to start the application

General applications such as web browsers and terminals (Terminal Emulator) should be launched from the menu in the upper left corner of the screen.

client.xubudesk top left menu

3.1. Terminal application

The terminal application is listed by default in the menu window.

client.ubuntu menu terminal

If you would like to use other terminal application, please type the keyword, such as terminal, at the top search window.

4. How to check available commands

Some operations can be executed by root (privileged) user. Specify the content you wish to execute following the sudo command as an argument.

## How to check which commands can be executed by sudo
$ sudo -l

The sudo command can be used to check the contents of files that can only be read by the root user.

$ ls -l /etc/sudoers
-r--r----- 1 root root 779 May 2 2018 /etc/sudoers
$ sudo cat /etc/sudoers

5. Main customization method

The configuration means other than brightness adjustment can be accessed from the Settings menu of the menu.

Alternatively, you can enter the word "mouse" in the text window at the top of the menu to refine the settings.

client.xfce4 menu

5.1. Adjustment of screen brightness

If the screen is dark, etc., hold down the Fn key on the keyboard and press the F5, F6 keys to adjust the screen brightness.

client.20230214 screen brightness

The Fn key is located in the lower left corner of the keyboard.

5.2. Mouse operation (touchpad, track pointer)

By default, both touchpad and track pointer are enabled.

In the "Mouse and Touchpad" settings screen, you can enable or disable them, change the cursor speed, etc.

The figure below shows the TouchPad disabled.

client.mouse touchpad

The TrackPoint is easy to use once you get used to it, but you should adjust the "Acceleration" setting so that the cursor speed is appropriate for your finger strength.

client.mouse trackpoint

5.3. Resolution setting

A screen resolution of Full HD (1920x1080 pixel) can be set for x270, t430(s). If you have a problem with a narrow screen or, conversely, a screen that is too wide and the text is too small, please set the resolution individually. Please set the screen resolution individually.

client.xfce4 display

5.4. Japanese input method

First, we will explain the change operation up to inputting Japanese.

5.4.1. Selecting Input Method

Open the "Language Support " menu and set IBus to Input Method.

client.language ibus

5.4.2. Selecting a Japanese conversion engine

Open the "IBus Preferences " menu, open the Input Method tab, and press the "Add" button.

Select "Japanese" and choose either Anthy (continuous phrase conversion) or Mozc (Google Japanese Input compatible).

client.ibus pref engine selecter

5.4.3. Remove unwanted conversion engines

After adding Anthy or Mozc, remove the English input (English - English(US)) item.

client.ibus pref delete english

5.4.4. Switching Japanese input method after setting

Immediately after changing the settings, Japanese input is not yet enabled.

The fastest way is to log out. No need to reboot.

5.4.5. Behind the Japanese Switching

To enable Japanese input without logging out, you need to change environment variables appropriately and then restart the process.

The main environment variables are as follows

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

Since these are automatically set based on the settings in the Language Support menu, they are set in the parent process by re-logging in, and are passed on to the child processes, so that Japanese input method is possible in each application without awareness.

6. Japanese input in UNIX environment

In the UNIX environment, the mechanisms related to the language input are layered as follows, with multiple applications in each layer.

Basically, Japanese input is realized by selecting and combining the applications you want to use from each layer.

+---------------------+
|  Conversion Engine  | <-- Anthy, Mozc, SKK, Canna, etc. (Japanese-specific functions such as consecutive clause conversion, predictive conversion, etc.)
+---------------------+
|    Input Method     | <--- ibus, fcitx, iiimf, etc. (control of input independent of languages other than Japanese, Shift+Space to start input, etc.)
+---------------------+
| Desktop Environment | <-- Xfce, GTK/Gnome, QT, etc. (focus management of Text widget in Web browser, interface to XIM/immodule, etc.)
+---------------------+
|         X11         | (provides the lowest level of functionality, e.g. displaying text on the screen)
+---------------------+

Note that on Windows and macOS, all layers other than the Conversion Engine can only be used as provided only by the OS, so the system is practically not so much customizable.

6.1. Language input mechanism in X11 environment

You may not be aware of the Japanese input mechanism, but here is an overview of the Japanese input in the X11 environment.

6.1.1. Mechanism for receiving input from the keyboard (functionality provided by the X server)

Since X11 needs to support various languages other than Japanese, it provides a mechanism to convert characters input from the keyboard into other characters (data) by some program.

The basic mechanism is called XIM (X Input Method), which provides only a mechanism for the X11 server to pass input from the keyboard to another program.

The other program to which the X11 server passes data, i.e., another program to process input from the keyboard, is called Input Method Library/Server, and a variety of programs are provided. (e.g. uim, ibus, scim, fcitx)

Then, there are generally conversion programs that take care of the actual processing from these IM servers, i.e., convert keyboard input into each language, including Japanese. (e.g. fcitx-anthy, fcitx-mozc, ibus-skkk, scim-canna)

6.1.2. Mechanisms for converting to characters of each language

There are mechanisms (conversion engines) to convert keyboard input received by an IM server into Japanese and other languages. Common conversion engines for Japanese available on Linux include anthy, mozc, skk, and canna.

Since the supported conversion engines vary depending on the using IM server, there are limitations on the combinations that can be used.

  • anthy - A common Japanese conversion engine that performs serial clause conversion (supported by IM servers such as fcitx, ibus, scim, etc.)

  • mozc - Predicts from input characters like Google Japanese Conversion (supported by IM servers like fcitx, ibus, uim, etc.)

  • skk - Japanese conversion engine originated from Emacs. It is very powerful when you type a lot of text, such as when writing a paper (supported by IM servers such as fcitx, ibus, uim, scim, etc.).

  • canna - Japanese conversion engine that has been around for a long time along with Wnn (supported by IM servers such as uim, scim, etc.)

The combination of IM servers and these Japanese language engines provides the Japanese input environment in X11.

This division of labor provides the ability to support other languages and new languages that do not yet exist.

6.2. Mechanism for Japanese input by X11 applications (clients side)

First, X11 is the foundation on which desktop environments such as Gnome and QT are built, and older X11 applications that do not use these environments are run. Each level handles Japanese input slightly differently, but they all use XIM or their own mechanism using environment variables.

You can check the relevant environment variables in the following ways

$ env |egrep 'ibus|IM' |sort
CLUTTER_IM_MODULE=xim
GTK_IM_MODULE=ibus
## omit
QT4_IM_MODULE=ibus
QT_IM_MODULE=ibus
## Omit
XMODIFIERS=@im=ibus

GTK and QT are built on top of the X11 library, but they also provide their own way of doing things without using XIM for fine control. If you use the GTK/QT proprietary settings, X11 applications that do not use those widgets will not be able to input Japanese.

Conversely, if an application handles its own Japanese input, the GTK/QT Japanese input may get in the way. In such cases, launching emacs as follows will disable Japanese input via XIM.

$ env XMODIFIERS=@im=none GTK_IM_MODULE=xim emacs

Emacs invoked this way will not allow Japanese conversion via ibus.

Use this setting if you want to communicate with a Japanese conversion engine written in Emacs-Lisp or an other Japanese conversion engine from Emacs-Lisp.

6.3. When using your own Japanese conversion engine in Emacs

Even when activated as described above, Emacs has its own Japanese conversion function, so Japanese conversion itself is possible.

  1. To prepare for inputting characters, press C-x b to create an appropriate Buffer or open an empty file

  2. Press C- ↓ and type "japanese" when asked "Input Method:". 3.

  3. Perform the conversion by roman input.

Another well-known Japanese conversion engine is ddskk. In addition, you can use other Japanese conversion engines different from ibus on Emacs by using anthy.el or mozc.el from Emacs.

In this case, it is also possible to communicate directly with the Conversion Engine if Emacs provides the Input Method functionality.

6.3.1. When using Anthy with Emacs

Start emacs and then invoke anthy-mode as follows.

M-x load-library
anthy

Once the anthy library is loaded, Japanese input can be toggled on and off in the following way

M-x anthy-mode

6.3.2. Using Mozc with Emacs

The basic procedure is the same as for anthy, but the library names are slightly different.

M-x load-libarary
emacs-mozc/mozc.el

Thereafter, you can switch between them with M-x mozc-mode as in Anthy.

6.3.3. Using SKK with Emacs

Since the library is already installed, you can use it in the same way as anthy and mozc.