im-launch in Ubuntu startup
-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
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.
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.