im-config configuration ignored with gdm3
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gdm3 (Ubuntu) |
Invalid
|
High
|
Unassigned | ||
im-config (Ubuntu) |
Fix Released
|
High
|
Gunnar Hjalmarsson |
Bug Description
After having logged in via gdm3, the IM related environment variables are always set like this:
$ env | grep -E '_IM|XMOD'
QT_IM_MODULE=ibus
XMODIFIERS=@im=ibus
Changing ~/.xinputrc to e.g. xim makes no difference, so gdm3 prevents all other IM frameworks but IBus from working.
This problem seems to be similar to bug #1594681 (which was fixed).
Changed in im-config (Ubuntu): | |
importance: | Undecided → High |
Launchpad Janitor (janitor) wrote : | #1 |
Changed in gdm3 (Ubuntu): | |
status: | New → Confirmed |
Changed in im-config (Ubuntu): | |
status: | New → Confirmed |
Mitsuya Shibata (cosmos-door) wrote : | #3 |
My wayland session is same result.
Anyway, /usr/lib/
$ systemctl list-unit-files | grep im-config
(nothing)
Gunnar Hjalmarsson (gunnarhj) wrote : | #4 |
@Mitsuya: I don't know systemd well enough to tell. What I did before drawing the conclusion that it's somehow gdm3 related was to install and test with lightdm. With lightdm the im-config variables are preserved also on GNOME shell (with or without Wayland).
Jeremy Bícha (jbicha) wrote : | #5 |
Mitsuya, im-config provides a systemd *user* service. You'll need to use --user to see it like this:
$ systemctl --user list-unit-files | grep im-config
Mitsuya Shibata (cosmos-door) wrote : | #6 |
> im-config provides a systemd *user* service.
Oh, sorry...
$ systemctl --user list-unit-files | grep im-config
im-config.service static
$ systemctl --user status im-config.service
● im-config.service - Launch and configure input method
Loaded: loaded (/usr/lib/
Active: inactive (dead)
Mitsuya Shibata (cosmos-door) wrote : | #7 |
> With lightdm the im-config variables are preserved also on GNOME shell (with or without Wayland).
Umm...
With GDM3, Ubuntu.Xorg session correctly set GTK_IM_MODULE and other environments.
In this case, im-config will be launched from /etc/X11/
If GTK_IM_MODULE and others is not be set on Wayland only,
I thought this will be caused by systemd service file.
However lightdm worked with Wayland, more need to be investigated further...
Mitsuya Shibata (cosmos-door) wrote : | #8 |
- im-config.service Edit (691 bytes, text/plain)
Fist of all, I don't know details about history of upstart/unity
and user session system. There is no conclusion, just my research.
---
For Unity8/Mir, upstart script of im-config was added LP #1433831
This Ubuntu only script should be removed from im-config package.
Since switching user session from upstart to systemd, above upstart script
is convert to systemd unit on 0.29-1ubuntu14.
However this unit file uses initctl command, then this unit work on both of
systemd and upstart installed system only.
Legacy (Xorg) system will launches /etc/X11/
and set STARTUP variable to exec /usr/bin/im-launch.
All environment variables are set, no problem.
Wayland system doesn't exec /etc/X11/
set environment variables is needed as like on Unity8/Mir.
(old) systemd unit doesn't work by two reasons.
1. use initctl command of upstart
2. bind to graphical-
If I understand correctly, graphical-
will be launched for unity8 system and others.
At artful, this target are not depended by any target and service.
/usr/lib/
but this script will be executed from unity.desktop only.
How about use basic.target instead of graphical-
I attach sample im-config.service.
sudo cp im-config.service /usr/lib/
systemctl --user daemon-reload
systemctl --user enable im-config.service
(and restart session by logout and login)
This service file will work about environment variables.
$ env | grep -E '_IM|XMOD'
CLUTTER_
QT4_IM_MODULE=xim
QT_IM_MODULE=ibus
XMODIFIERS=@im=ibus
GTK_IM_MODULE=ibus
However suggestion window will be displayed on top left of display,
not near cursor on gedit and gnome-termial. The reason isn't known.
Gunnar Hjalmarsson (gunnarhj) wrote : | #9 |
Thanks, Mitsuya, for valuable input!
As regards the upstart stuff, it was introduced before Unity8, and since I don't know if all the flavors have switched to systemd for user session, I'm disinclined to drop it at this time.
I uploaded a test version of im-config here:
https:/
The difference compared to the version in the queue is that I made use of your im-config.service script and changed the related symlink accordingly.
Even if the variables seem to be properly set, I made this observation:
$ systemctl --user list-unit-files | grep im-config
im-config.service disabled
Can't tell if that is of any significance.
Anyway, I'll try to make some experienced developer review this solution. It looks promising to me.
Jeremy Bícha (jbicha) wrote : | #10 |
Gunnar, upstart has been removed from Debian 9 "Stretch" and from Ubuntu 17.10.
You should drop the debian/menu too.
https:/
Gunnar Hjalmarsson (gunnarhj) wrote : | #11 |
On 2017-10-02 00:00, Jeremy Bicha wrote:> Gunnar, upstart has been removed from Debian 9 "Stretch" and from
> Ubuntu 17.10.
Ah, had missed that.
> You should drop the debian/menu too.
I just uploaded a new version to the PPA with those changes.
Mitsuya Shibata (cosmos-door) wrote : | #12 |
> I uploaded a test version of im-config here:
Thanks!
> Even if the variables seem to be properly set, I made this observation:
>
> $ systemctl --user list-unit-files | grep im-config
> im-config.service disabled
$ systemctl --user status im-config.service
● im-config.service - Launch and configure input method
Loaded: loaded (/usr/lib/
Active: inactive (dead) since Mon 2017-10-02 22:45:14 JST; 26min ago
Main PID: 1266 (code=exited, status=0/SUCCESS)
10月 02 22:45:14 ubuntu-ax2 systemd[1260]: Starting Launch and configure input method...
10月 02 22:45:14 ubuntu-ax2 systemd[1260]: Started Launch and configure input method.
As my understand, user session unit is enabled by symlink on ~/.config/
If there is not symlink on the directory, "is-enabled" command will show "disabled".
"/usr/lib/
If you exec "systemctl --user preset", it will create symlink on ~/.config/
Mitsuya Shibata (cosmos-door) wrote : | #13 |
- Screenshot from 2017-10-02 22-46-48.png Edit (225.6 KiB, image/png)
Unfortunately, gnome-terminal and gedit show select window on top left...
(this behavior same as old im-config on wayland, not problem on xorg).
Mitsuya Shibata (cosmos-door) wrote : | #14 |
- imservice.log Edit (2.4 KiB, text/plain)
Just for your information, I attached zesty's result about systemd.
Gunnar Hjalmarsson (gunnarhj) wrote : | #15 |
On 2017-10-02 16:19, Mitsuya Shibata wrote:> As my understand, user session unit is enabled by symlink on
> ~/.config/
> "is-enabled" command will show "disabled". "/usr/lib/
> is vendor preset directory, and just show "vendor preset: enabled".
>
> If you exec "systemctl --user preset", it will create symlink on
> ~/.config/
I think you misunderstood the nature of my observation. The modified package in the PPA works out of the box via the system level symlink:
/usr/lib/
So no need to set a symlink in the users' HOME.
Maybe it's not a problem at all. I just noticed a difference.
> Unfortunately, gnome-terminal and gedit show select window on top
> left... (this behavior same as old im-config on wayland, not problem on
> xorg).
Ok. I first thought it was a side effekt of the new im-config.service file, but now I realize it's not. Then it's probably not related to im-config at all, but rather ibus/wayland/
Iain Lane (laney) wrote : | #16 |
ok, I had a look at the unit
- basic.target is quite basic, it happens for every user session. If the first session is a SSH login then we'll execute im-config when we probably shouldn't.
- PartOf=
- Maybe this isn't a problem with basic.target, but it will be when we use graphical-
- Same, maybe ok with basic.target --- there's no way to clear the variables and they won't be scoped to there being a graphical session (existing bug with the unit?)
Thought - what about putting a script in /etc/profile.d? basically doing what the unit would do, but make sure to case it on $XDG_CURRENT_
Gunnar Hjalmarsson (gunnarhj) wrote : | #17 |
As per Iain's suggestion I have uploaded a new variant to the PPA, where a file in /etc/profile.d replaces the modifications of im-config.service. It works AFAICT, but I'd appreciate your confirmation before I upload to the archive.
Mitsuya Shibata (cosmos-door) wrote : | #18 |
> So no need to set a symlink in the users' HOME.
> Maybe it's not a problem at all. I just noticed a difference.
Yes, you are right. My old comment is just reason why "list-unit-files" show "disabled".
> Then it's probably not related to im-config at all, but rather ibus/wayland/
Filed as another bug #1721023
Mitsuya Shibata (cosmos-door) wrote : | #19 |
Hi Ian and Gunnar,
Thank you for details about systemd target and new package!
The profile.d version works on my environment too with gedit (gtk app) and setup-mozc (qt app).
However suggestion window doesn't show up...
Gunnar Hjalmarsson (gunnarhj) wrote : | #20 |
On 2017-10-03 15:16, Mitsuya Shibata wrote:
> The profile.d version works on my environment too with gedit (gtk
> app) and setup-mozc (qt app).
Ok..
> However suggestion window doesn't show up..
Confirmed. So then it doesn't work properly after all, right? (It does show up on "Ubuntu on Xorg", though.)
Iain Lane (laney) wrote : Re: [Bug 1720250] Re: im-config configuration ignored with gdm3 | #21 |
On Tue, Oct 03, 2017 at 01:16:54PM -0000, Mitsuya Shibata wrote:
> However suggestion window doesn't show up...
Please could you try to find out why this is?
--
Iain Lane [ <email address hidden> ]
Debian Developer [ <email address hidden> ]
Ubuntu Developer [ <email address hidden> ]
Gunnar Hjalmarsson (gunnarhj) wrote : | #22 |
Gunnar Hjalmarsson (gunnarhj) wrote : | #23 |
Gunnar Hjalmarsson (gunnarhj) wrote : | #24 |
As Iain suggested on IRC
https:/
I checked out what the processes looked like for the two attempts at a solution, and attached a couple of files with my observations.
Well, not sure what I should look for, to be honest, but that exercise inspired me to a possible solution: Since gdm3 always starts ibus-daemon anyway, I added a condition to /usr/share/
So I have uploaded yet another variant to the PPA.
Iain Lane (laney) wrote : | #25 |
On Wed, Oct 04, 2017 at 12:40:03AM -0000, Gunnar Hjalmarsson wrote:
> As Iain suggested on IRC
>
> https:/
>
> I checked out what the processes looked like for the two attempts at a
> solution, and attached a couple of files with my observations.
>
> Well, not sure what I should look for, to be honest, but that exercise
> inspired me to a possible solution: Since gdm3 always starts ibus-daemon
> anyway, I added a condition to /usr/share/
> im-config does not start ibus-daemon if gdm3 is the DM. That seems to
> fix it.
>
> So I have uploaded yet another variant to the PPA.
>
> https:/
Thanks Gunnar, good find.
I wonder what this is telling us - you end up with multiple copies of
iBus running or something? Or the order matters and somehow the
basic.target one starts up early enough and the other one doesn't?
From looking at that 21_ibus.rc script, it doesn't look like it's
crucial that im-config is the thing to actually execute iBus, right? If
that's the case, this is probably good. If it tests out, feel free to
upload.
--
Iain Lane [ <email address hidden> ]
Debian Developer [ <email address hidden> ]
Ubuntu Developer [ <email address hidden> ]
Gunnar Hjalmarsson (gunnarhj) wrote : | #26 |
I'm not able to spot the root cause for the problem with the ibus-mozc suggestion window, but I have tested on Ubuntu, Ubuntu on Xorg and Unity both with GDM and LightDM. The suggestion window failed to show up with the combination Wayland + LightDM, but that's an odd combo anyway, and the other tests were successful.
So I uploaded to the queue.
Changed in gdm3 (Ubuntu): | |
status: | Confirmed → Invalid |
Changed in im-config (Ubuntu): | |
assignee: | nobody → Gunnar Hjalmarsson (gunnarhj) |
status: | Confirmed → Fix Committed |
Mitsuya Shibata (cosmos-door) wrote : | #27 |
My apologies for late and sparse reply...
> So I have uploaded yet another variant to the PPA.
Thank you for your upload. Suggestion window become to visible!
--
I will tackle following issues related to input method until 18.04 release.
- bug #1721023 : suggestion window position
- bug #1719938 : ibus-mozc isn't enabled by default on Japanese locale
Thanks!
Launchpad Janitor (janitor) wrote : | #28 |
This bug was fixed in the package im-config - 0.32-1ubuntu2
---------------
im-config (0.32-1ubuntu2) artful; urgency=medium
* debian/
- Script which works around (in 17.10) the fact that
graphical
intended (LP: #1720250).
* debian/
- Prevents two instances of ibus-daemon, which fixes issue with
suggestion window not showing up when using ibus-mozc
(LP: #1720250).
* Dropped the upstart user session job.
* debian/menu: Dropped.
-- Gunnar Hjalmarsson <email address hidden> Wed, 04 Oct 2017 17:17:00 +0200
Changed in im-config (Ubuntu): | |
status: | Fix Committed → Fix Released |
Tigran Aivazian (aivazian-tigran) wrote : | #29 |
In my /etc/X11/
# im-config(8) generated on Thu, 09 Aug 2018 08:42:10 +0100
run_im none
# im-config signature: d77e0956ffec112
And the script /etc/profile.
"Error found when loading /etc/profile:
E: Script for none not found at run_im.
E: Script for none not found at run_im.
As a result, the session will not be configured correctly.
You should fix the problem as soon as feasible."
So, what I did to get rid of the error message was to add a "return" to the top of the above-mentioned /etc/profile.
Gunnar Hjalmarsson (gunnarhj) wrote : | #30 |
@Tigran: This bug was closed several years ago, and there is absolutely no point in adding comments to it now.
If you have found a new bug, please report it separately. If you need support, please visit some resource for that, e.g. https:/
Tigran Aivazian (aivazian-tigran) wrote : | #31 |
@Gunnar You are assuming that the bug was fixed completely by the code in /etc/profile.
The real problem is that I have 7 other machines (identical clones) running exactly the same Ubuntu 18 system and on none of them this problem manifests itself. There are a few differences between this machine and the rest, namely:
1. I configured LVM2 on it.
2. I use bind-mounts in /etc/fstab heavily (for /usr/local and other parts).
3. I use QEMU on this machine extensively, so VFIO/PCI passthrough etc etc are configured.
4. Maybe a few other bits and pieces.
Oh well, don't worry, I won't bother you further with this. I will try to figure out the cause and will let you know if I find it.
Gunnar Hjalmarsson (gunnarhj) wrote : | #32 |
Well, I don't claim that im-config is bug free forever after the fix of this bug. New issues show up.
My point is that trying to revive an old and closed bug report is simply not the right way to call the developers' attention to new issues.
My advice still stands: Use Ask Ubuntu to get help to sort things out. If you conclude that there is a bug, you are welcome to submit a new bug report about your problem.
Tigran Aivazian (aivazian-tigran) wrote : | #33 |
Ok, the reason I left a comment here was very logical: disabling the code in /etc/profile.
However, I completely agree with you, that the real cause of the problem may be elsewhere and it should be reported against the corresponding subsystem. I will do as you suggest as soon as I have more information (I am not working on this actively, as my "workaround" seems to be ok, but of course I am curious and so "in the back of my mind" I am still considering this issue :)
Gunnar Hjalmarsson (gunnarhj) wrote : | #34 |
@Tigran: It struck me that /etc/profile.
So how could that happen? My guess is that you at some point of time took a shortcut when upgrading your Ubuntu version. You seem to have switched from some version before 20.04 directly to some version after 20.04. Skipping an LTS like that is not a supported upgrade path, and may result in issues like this one.
So I don't think there is much to report. ;)
Gunnar Hjalmarsson (gunnarhj) wrote : | #35 |
Another theory is that you may have removed the im-config package without purging it. In latter im-config versions we prevent such a measure from leading to issues, but in the version uploaded due to this bug there was no such protection.
Tigran Aivazian (aivazian-tigran) wrote : | #36 |
@Gunnar
1. I am still on Ubuntu 18.04.6. I know it sounds strange, but in the past 5-6 years I was so busy, that I was upgrading only the components I actually actively use in my research work, namely Wolfram Mathematica, python (with all scientific modules) etc. But yes, at some point I will need to switch. I never "upgrade", but always install from scratch and then spend several days tweaking the system to my liking. The reason I didn't upgrade to Ubuntu 20 is that I really disliked the idea of using snap. I am used to having a full control over every single instruction my CPUs are executing and snap somewhat distances the user of the system from what is happening inside, imo.
2. The im-config package could not be removed without removing gnome-control-
Tigran Aivazian (aivazian-tigran) wrote : | #37 |
This is the version of im-config I am using:
$ apt show im-config
Package: im-config
Version: 0.34-1ubuntu1.3
Priority: optional
Section: x11
Origin: Ubuntu
Maintainer: Ubuntu Developers <email address hidden>
Original-
Bugs: https:/
Installed-Size: 360 kB
Provides: im-switch
Depends: gettext-base
Recommends: x11-common, zenity | kdialog | kde-baseapps-bin (<< 4:16.08.3-2~) | whiptail
Conflicts: im-switch
Task: ubuntu-desktop, kubuntu-desktop, kubuntu-full, xubuntu-desktop, lubuntu-
Supported: 5y
Download-Size: 23.3 kB
APT-Manual-
APT-Sources: http://
So, you are saying that with this version I don't need the file /etc/profile.
Gunnar Hjalmarsson (gunnarhj) wrote : | #38 |
On 2023-03-14 09:09, Tigran Aivazian wrote:
> So, you are saying that with this version I don't need the file
> /etc/profile.
No. I said that you can do that if you are on an Ubuntu version > 20.04. Given the version you actually are on, instead I would suggest that you reinstall im-config:
sudo apt-get install --reinstall im-config
That's because the error message indicates that the installation of im-config is not complete. Maybe you tried to partly uninstall it.
"E: Script for none not found at run_im."
Well, "script for none" should be there:
$ ls -1 /usr/share/
78_none.conf
78_none.rc
and a reinstall ought to restore those files.
Or you can keep your return at the top of the file. That won't hurt if you don't use any input method.
> The im-config package could not be removed without removing
> gnome-control-
That's true, and the reason is that language-
> except the strange fact that this file was not removed when im-config
> was updated during the normal "sudo apt update" procedure at some point
Not strange at all, actually, since you are on bionic.
Tigran Aivazian (aivazian-tigran) wrote : | #39 |
Your analysis is absolutely correct. On my system the whole directory /usr/share/
Thank you very much, Gunnar. You were very helpful and patient :)
Tigran Aivazian (aivazian-tigran) wrote : | #40 |
In order to put this mystery of the "missing directory /usr/share/
Needless to say, I have wiped out this system and did a fresh install of Ubuntu 22.04 and am very happy with it. After a few optimisations, removing some stuff, disabling Wayland and making a few other minor adjustments, the system is rock stable and almost as fast as Ubuntu 18 (which used to boot in just over one second even on this old slow hardware).
So, thank you, Gunnar, and thanks to all Ubuntu developers for patiently bearing with all my comments :)
Status changed to 'Confirmed' because the bug affects multiple users.