[Desktop-packages] [Bug 1630090] Re: $XMODIFIERS not set correctly

2016-10-04 Thread Launchpad Bug Tracker
This bug was fixed in the package im-config - 0.29-1ubuntu16

---
im-config (0.29-1ubuntu16) yakkety; urgency=medium

  * debian/user/im-config.service: Reverse the order of "initctl set-env" and
"dbus-update-activation-environment". $XMODIFIERS can contain an "=" (its
value might be, for example, "@im=ibus"). upstart forwards "set-env -g"
calls to D-Bus, but it constructs the parameters to the call incorrectly
and splits on "=" characters in the value, discarding anything which
follows. We can work around this bug by calling "initctl set-env -g"
first, and then "dbus-update-activation-environment" to overwrite the
buggy value. (LP: #1630090)
  * debian/user/im-config.service: Get rid of one eval -
"dbus-update-activation-environment" will look up the variable in the
environment if you don't specify a value.

 -- Iain Lane   Tue, 04 Oct 2016 12:28:35
+0100

** Changed in: im-config (Ubuntu)
   Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to im-config in Ubuntu.
https://bugs.launchpad.net/bugs/1630090

Title:
  $XMODIFIERS not set correctly

Status in im-config package in Ubuntu:
  Fix Released
Status in upstart package in Ubuntu:
  Triaged

Bug description:
  When "initctl set-env -g" is called, upstart calls D-Bus to also
  update its activation environment (the environment that D-Bus
  activated services get). There is a bug here:

- SetEnv takes a parameter of the form "VARIABLE=VALUE"
- This is split on "=" to determine the two parts
- If the VALUE has an "=" character in it, everything after the first "=" 
is lost, because all "=" characters are split and not the first one

  In this case, XMODIFIERS=@im=ibus was being turned into
  XMODIFIERS=@im.

  upstart should only split on the first "=", and keep the rest of the
  string unsplit. It doesn't look like nih_str_split is going to be very
  helpful here.

  [ Original description ]

  The XMODIFIERS environment variable is not set correctly.

  $ echo $XMODIFIERS
  @im
  $

  The value should be
  - for ibus:  "@im=ibus"
  - for fcitx: "@im=fcitx"
  - for xim:   "@im=none"

  The issue is present in Ubuntu/Unity 16.10. I don't see it in Ubuntu
  GNOME, neither in Ubuntu 16.04.

  Actually I don't think the affected package is im-config, because the
  issue is present also after having downgraded im-config to
  0.29-1ubuntu12 (the Xenial version). But I wanted to file the bug
  somewhere, so here it is.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/im-config/+bug/1630090/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp


[Desktop-packages] [Bug 1630090] Re: $XMODIFIERS not set correctly

2016-10-04 Thread Iain Lane
Just updated the description. The problem is now understood, and we
worked around the upstart bug in gnome-session and im-config.

** Description changed:

+ When "initctl set-env -g" is called, upstart calls D-Bus to also update
+ its activation environment (the environment that D-Bus activated
+ services get). There is a bug here:
+ 
+   - SetEnv takes a parameter of the form "VARIABLE=VALUE"
+   - This is split on "=" to determine the two parts
+   - If the VALUE has an "=" character in it, everything after the first "=" 
is lost, because all "=" characters are split and not the first one
+ 
+ In this case, XMODIFIERS=@im=ibus was being turned into XMODIFIERS=@im.
+ 
+ upstart should only split on the first "=", and keep the rest of the
+ string unsplit. It doesn't look like nih_str_split is going to be very
+ helpful here.
+ 
+ [ Original description ]
+ 
  The XMODIFIERS environment variable is not set correctly.
  
  $ echo $XMODIFIERS
  @im
  $
  
  The value should be
  - for ibus:  "@im=ibus"
  - for fcitx: "@im=fcitx"
  - for xim:   "@im=none"
  
  The issue is present in Ubuntu/Unity 16.10. I don't see it in Ubuntu
  GNOME, neither in Ubuntu 16.04.
  
  Actually I don't think the affected package is im-config, because the
  issue is present also after having downgraded im-config to
  0.29-1ubuntu12 (the Xenial version). But I wanted to file the bug
  somewhere, so here it is.

** Changed in: im-config (Ubuntu)
   Status: New => Fix Committed

** Changed in: upstart (Ubuntu)
   Status: New => Triaged

** Changed in: upstart (Ubuntu)
   Importance: Undecided => High

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to im-config in Ubuntu.
https://bugs.launchpad.net/bugs/1630090

Title:
  $XMODIFIERS not set correctly

Status in im-config package in Ubuntu:
  Fix Committed
Status in upstart package in Ubuntu:
  Triaged

Bug description:
  When "initctl set-env -g" is called, upstart calls D-Bus to also
  update its activation environment (the environment that D-Bus
  activated services get). There is a bug here:

- SetEnv takes a parameter of the form "VARIABLE=VALUE"
- This is split on "=" to determine the two parts
- If the VALUE has an "=" character in it, everything after the first "=" 
is lost, because all "=" characters are split and not the first one

  In this case, XMODIFIERS=@im=ibus was being turned into
  XMODIFIERS=@im.

  upstart should only split on the first "=", and keep the rest of the
  string unsplit. It doesn't look like nih_str_split is going to be very
  helpful here.

  [ Original description ]

  The XMODIFIERS environment variable is not set correctly.

  $ echo $XMODIFIERS
  @im
  $

  The value should be
  - for ibus:  "@im=ibus"
  - for fcitx: "@im=fcitx"
  - for xim:   "@im=none"

  The issue is present in Ubuntu/Unity 16.10. I don't see it in Ubuntu
  GNOME, neither in Ubuntu 16.04.

  Actually I don't think the affected package is im-config, because the
  issue is present also after having downgraded im-config to
  0.29-1ubuntu12 (the Xenial version). But I wanted to file the bug
  somewhere, so here it is.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/im-config/+bug/1630090/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp


[Desktop-packages] [Bug 1630090] Re: $XMODIFIERS not set correctly

2016-10-04 Thread Iain Lane
** Also affects: upstart (Ubuntu)
   Importance: Undecided
   Status: New

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to im-config in Ubuntu.
https://bugs.launchpad.net/bugs/1630090

Title:
  $XMODIFIERS not set correctly

Status in im-config package in Ubuntu:
  New
Status in upstart package in Ubuntu:
  New

Bug description:
  The XMODIFIERS environment variable is not set correctly.

  $ echo $XMODIFIERS
  @im
  $

  The value should be
  - for ibus:  "@im=ibus"
  - for fcitx: "@im=fcitx"
  - for xim:   "@im=none"

  The issue is present in Ubuntu/Unity 16.10. I don't see it in Ubuntu
  GNOME, neither in Ubuntu 16.04.

  Actually I don't think the affected package is im-config, because the
  issue is present also after having downgraded im-config to
  0.29-1ubuntu12 (the Xenial version). But I wanted to file the bug
  somewhere, so here it is.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/im-config/+bug/1630090/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp


[Desktop-packages] [Bug 1630090] Re: $XMODIFIERS not set correctly

2016-10-04 Thread Iain Lane
That was from "initctl set-env FOO=bar=baz"

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to im-config in Ubuntu.
https://bugs.launchpad.net/bugs/1630090

Title:
  $XMODIFIERS not set correctly

Status in im-config package in Ubuntu:
  New
Status in upstart package in Ubuntu:
  New

Bug description:
  The XMODIFIERS environment variable is not set correctly.

  $ echo $XMODIFIERS
  @im
  $

  The value should be
  - for ibus:  "@im=ibus"
  - for fcitx: "@im=fcitx"
  - for xim:   "@im=none"

  The issue is present in Ubuntu/Unity 16.10. I don't see it in Ubuntu
  GNOME, neither in Ubuntu 16.04.

  Actually I don't think the affected package is im-config, because the
  issue is present also after having downgraded im-config to
  0.29-1ubuntu12 (the Xenial version). But I wanted to file the bug
  somewhere, so here it is.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/im-config/+bug/1630090/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp


[Desktop-packages] [Bug 1630090] Re: $XMODIFIERS not set correctly

2016-10-04 Thread Iain Lane
sorry, initctl set-env -g

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to im-config in Ubuntu.
https://bugs.launchpad.net/bugs/1630090

Title:
  $XMODIFIERS not set correctly

Status in im-config package in Ubuntu:
  New
Status in upstart package in Ubuntu:
  New

Bug description:
  The XMODIFIERS environment variable is not set correctly.

  $ echo $XMODIFIERS
  @im
  $

  The value should be
  - for ibus:  "@im=ibus"
  - for fcitx: "@im=fcitx"
  - for xim:   "@im=none"

  The issue is present in Ubuntu/Unity 16.10. I don't see it in Ubuntu
  GNOME, neither in Ubuntu 16.04.

  Actually I don't think the affected package is im-config, because the
  issue is present also after having downgraded im-config to
  0.29-1ubuntu12 (the Xenial version). But I wanted to file the bug
  somewhere, so here it is.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/im-config/+bug/1630090/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp


[Desktop-packages] [Bug 1630090] Re: $XMODIFIERS not set correctly

2016-10-04 Thread Iain Lane
I think it's upstart being buggy when forwarding the initctl set-env -g
to the dbus activation environment

‣ Type=method_call  Endian=l  Flags=0  Version=1  Priority=0 Cookie=5665
  Sender=:1.15  Destination=org.freedesktop.DBus  Path=/org/freedesktop/DBus  
Interface=org.freedesktop.DBus  Member=UpdateActivationEnvironment
  UniqueName=:1.15
  MESSAGE "a{ss}" {
  ARRAY "{ss}" {
  DICT_ENTRY "ss" {
  STRING "FOO";
  STRING "bar";
  };
  };
  };

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to im-config in Ubuntu.
https://bugs.launchpad.net/bugs/1630090

Title:
  $XMODIFIERS not set correctly

Status in im-config package in Ubuntu:
  New

Bug description:
  The XMODIFIERS environment variable is not set correctly.

  $ echo $XMODIFIERS
  @im
  $

  The value should be
  - for ibus:  "@im=ibus"
  - for fcitx: "@im=fcitx"
  - for xim:   "@im=none"

  The issue is present in Ubuntu/Unity 16.10. I don't see it in Ubuntu
  GNOME, neither in Ubuntu 16.04.

  Actually I don't think the affected package is im-config, because the
  issue is present also after having downgraded im-config to
  0.29-1ubuntu12 (the Xenial version). But I wanted to file the bug
  somewhere, so here it is.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/im-config/+bug/1630090/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp


[Desktop-packages] [Bug 1630090] Re: $XMODIFIERS not set correctly

2016-10-04 Thread Iain Lane
The following is from

dbus-update-activation-environment --verbose --systemd $$v; \
systemctl --user show-environment | grep XMODIFIERS; \
initctl set-env -gr $$v=$$(eval "echo \\{v}") || true; \
systemctl --user show-environment | grep XMODIFIERS; \


Oct 04 10:34:56 yakkety-vm sh[1960]: + dbus-update-activation-environment 
--verbose --systemd XMODIFIERS
Oct 04 10:34:56 yakkety-vm sh[1960]: dbus-update-activation-environment: 
setting XMODIFIERS=@im=ibus
Oct 04 10:34:56 yakkety-vm sh[1960]: + grep XMODIFIERS
Oct 04 10:34:56 yakkety-vm sh[1960]: + systemctl --user show-environment
Oct 04 10:34:56 yakkety-vm sh[1960]: XMODIFIERS=@im=ibus
Oct 04 10:34:56 yakkety-vm sh[1960]: + eval echo $XMODIFIERS
Oct 04 10:34:56 yakkety-vm sh[1960]: + echo @im=ibus
Oct 04 10:34:56 yakkety-vm sh[1960]: + initctl set-env -gr XMODIFIERS=@im=ibus
Oct 04 10:34:56 yakkety-vm sh[1960]: + systemctl --user show-environment
Oct 04 10:34:56 yakkety-vm sh[1960]: + grep XMODIFIERS
Oct 04 10:34:56 yakkety-vm sh[1960]: XMODIFIERS=@im

What is shows is that the value of XMODIFIERS in "systemctl --user show-
environment" changes after "initctl set-env -gr $$v=$$(eval "echo
\\{v}") || true;" is run

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to im-config in Ubuntu.
https://bugs.launchpad.net/bugs/1630090

Title:
  $XMODIFIERS not set correctly

Status in im-config package in Ubuntu:
  New

Bug description:
  The XMODIFIERS environment variable is not set correctly.

  $ echo $XMODIFIERS
  @im
  $

  The value should be
  - for ibus:  "@im=ibus"
  - for fcitx: "@im=fcitx"
  - for xim:   "@im=none"

  The issue is present in Ubuntu/Unity 16.10. I don't see it in Ubuntu
  GNOME, neither in Ubuntu 16.04.

  Actually I don't think the affected package is im-config, because the
  issue is present also after having downgraded im-config to
  0.29-1ubuntu12 (the Xenial version). But I wanted to file the bug
  somewhere, so here it is.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/im-config/+bug/1630090/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp


[Desktop-packages] [Bug 1630090] Re: $XMODIFIERS not set correctly

2016-10-04 Thread Iain Lane
Now I modified each iteration of the loop in im-config.service to show
the environment

Oct 04 10:21:20 yakkety-vm sh[1972]: + dbus-update-activation-environment 
--verbose --systemd XMODIFIERS
Oct 04 10:21:20 yakkety-vm sh[1972]: dbus-update-activation-environment: 
setting XMODIFIERS=@im=ibus
Oct 04 10:21:20 yakkety-vm sh[1972]: + systemctl --user show-environment
[…]
Oct 04 10:21:20 yakkety-vm sh[1972]: XMODIFIERS=@im=ibus

Oct 04 10:21:20 yakkety-vm sh[1972]: + dbus-update-activation-environment 
--verbose --systemd GTK_IM_MODULE
Oct 04 10:21:20 yakkety-vm sh[1972]: dbus-update-activation-environment: 
setting GTK_IM_MODULE=ibus
Oct 04 10:21:20 yakkety-vm sh[1972]: + systemctl --user show-environment
Oct 04 10:21:20 yakkety-vm sh[1972]: XMODIFIERS=@im

...

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to im-config in Ubuntu.
https://bugs.launchpad.net/bugs/1630090

Title:
  $XMODIFIERS not set correctly

Status in im-config package in Ubuntu:
  New

Bug description:
  The XMODIFIERS environment variable is not set correctly.

  $ echo $XMODIFIERS
  @im
  $

  The value should be
  - for ibus:  "@im=ibus"
  - for fcitx: "@im=fcitx"
  - for xim:   "@im=none"

  The issue is present in Ubuntu/Unity 16.10. I don't see it in Ubuntu
  GNOME, neither in Ubuntu 16.04.

  Actually I don't think the affected package is im-config, because the
  issue is present also after having downgraded im-config to
  0.29-1ubuntu12 (the Xenial version). But I wanted to file the bug
  somewhere, so here it is.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/im-config/+bug/1630090/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp


[Desktop-packages] [Bug 1630090] Re: $XMODIFIERS not set correctly

2016-10-04 Thread Iain Lane
>From ExecStart of im-config.service (modified slightly to eliminate
quoting issues)

Oct 04 10:09:43 yakkety-vm sh[1925]: + dbus-update-activation-environment 
--verbose --systemd XMODIFIERS
Oct 04 10:09:43 yakkety-vm sh[1925]: dbus-update-activation-environment: 
setting XMODIFIERS=@im=ibus

and then I added to the bottom of the same ExecStart:

Oct 04 10:09:43 yakkety-vm sh[1925]: + systemctl --user show-environment
[…]
Oct 04 10:09:43 yakkety-vm sh[1925]: XMODIFIERS=@im

So it does *not* seem to be a problem with overwriting to me.

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to im-config in Ubuntu.
https://bugs.launchpad.net/bugs/1630090

Title:
  $XMODIFIERS not set correctly

Status in im-config package in Ubuntu:
  New

Bug description:
  The XMODIFIERS environment variable is not set correctly.

  $ echo $XMODIFIERS
  @im
  $

  The value should be
  - for ibus:  "@im=ibus"
  - for fcitx: "@im=fcitx"
  - for xim:   "@im=none"

  The issue is present in Ubuntu/Unity 16.10. I don't see it in Ubuntu
  GNOME, neither in Ubuntu 16.04.

  Actually I don't think the affected package is im-config, because the
  issue is present also after having downgraded im-config to
  0.29-1ubuntu12 (the Xenial version). But I wanted to file the bug
  somewhere, so here it is.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/im-config/+bug/1630090/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp


[Desktop-packages] [Bug 1630090] Re: $XMODIFIERS not set correctly

2016-10-04 Thread Martin Pitt
I don't think it's a quoting issue (or issue with parsing the extra '=')
in d-u-a-e, as when I run this manually it works:

$ export XMODIFIERS=@im=ibus

$ dbus-update-activation-environment --verbose --systemd XMODIFIERS
dbus-update-activation-environment: setting XMODIFIERS=@im=ibus

$ systemctl --user show-environment  |grep XMODIF
XMODIFIERS=@im=ibus

But clearly in a freshly started desktop the value is just "@im". My
buest guess is that something else also sets $XMODIFIERS later on, and
overwrites the value from im-config.service?

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to im-config in Ubuntu.
https://bugs.launchpad.net/bugs/1630090

Title:
  $XMODIFIERS not set correctly

Status in im-config package in Ubuntu:
  New

Bug description:
  The XMODIFIERS environment variable is not set correctly.

  $ echo $XMODIFIERS
  @im
  $

  The value should be
  - for ibus:  "@im=ibus"
  - for fcitx: "@im=fcitx"
  - for xim:   "@im=none"

  The issue is present in Ubuntu/Unity 16.10. I don't see it in Ubuntu
  GNOME, neither in Ubuntu 16.04.

  Actually I don't think the affected package is im-config, because the
  issue is present also after having downgraded im-config to
  0.29-1ubuntu12 (the Xenial version). But I wanted to file the bug
  somewhere, so here it is.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/im-config/+bug/1630090/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp