16

I found this im-launch startup entry after installing Ubuntu 19.10 which executes sh -c 'if ! [ -e "/usr/bin/ibus-daemon" ] && [ "x$XDG_SESSION_TYPE" = "xwayland" ] ; then exec env IM_CONFIG_CHECK_ENV=1 im-launch true; fi'

I want to know the purpose of this entry and what would happend if i disabled it ?

19

-e check the file /usr/bin/ibus-daemon exists or not? exist means true does not exist means false.

! wants to confirm above value is false if above value is true, it will not execute anything.

[ "x$XDG_SESSION_TYPE" = "xwayland" ] this can have either one of below values based on how you choose to login at the login screen. which session you will choose x11 or wayland.

"xx11" = "xwayland" "xwayland" = "xwayland"

example output of $XDG_SESSION_TYPE

administrator@pratap:~$ echo $XDG_SESSION_TYPE
x11

another example:

administrator@pratap:~$ echo $XDG_SESSION_TYPE
wayland
administrator@pratap:~$ 

if the first expression is false and x$XDG_SESSION_TYPE = xwayland then exec the command env IM_CONFIG_CHECK_ENV=1 im-launch true

if the first expression is true or x$XDG_SESSION_TYPE is not equal to xwayland then don't do anything.

see man test

! EXPRESSION
              EXPRESSION is false

and

   -e FILE
          FILE exists

you can read more about what this command does then exec env IM_CONFIG_CHECK_ENV=1 im-launch true;

see man env & man im-launch


By default in Ubuntu 19.10 /usr/bin/ibus-daemon exists. so the command will not be executed.

env IM_CONFIG_CHECK_ENV=1 im-launch true

when there is the file /usr/bin/ibus-daemon and my session is x11

here is something about IM

enter image description here

when there is no file /usr/bin/ibus-daemon and my session is wayland

here is the thing which is different from above, which means the env is applied and then a chain reaction followed.

enter image description here

so, if you disable or enable this from startup list nothing happens unless no existence of this file /usr/bin/ibus-daemon and your session is wayland conditions are met.

| improve this answer | |
  • 5
    Thank you . I appreciate your detailed answer for my doubt . People like you makes askubuntu.com awesome . – Afsal Nov 30 '19 at 9:21
  • 3
    Well, I can underdstand the syntax of the command - but in simple words: what does it do in the end? What is im-launch? – foobar Apr 24 at 6:56
  • 1
    I know how to use manpages... But man im-launch does not enlighten me. It seems very low level. Why does Ubuntu put this into my user-space start programs? – foobar Apr 24 at 6:59
  • its kind of thing related to multi languages, keyboard layouts.. specially some kind of chinees, japanees.. etc. – UnKNOWn Apr 24 at 7:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.