Following your install instructions using the ppa for keyman, the install failed and left me in a broken state, with ibus-keyman “half installed”.
When I try to clean things up, the breakage continues:
$ sudo apt remove ibus-keyman
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following packages will be REMOVED:
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 69.6 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database … 720831 files and directories currently installed.)
Removing ibus-keyman (11.0.124-1~sil1~bionic) …
sudo: unknown user: steve
sudo: unable to initialize policy plugin
dpkg: error processing package ibus-keyman (–remove):
installed ibus-keyman package post-removal script subprocess returned error exit status 1
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)
What is this “sudo: unknown user: steve” nonsense? That seems to be where the uninstall is breaking. I’ve never had a sudo command fail like that before in decades of work on Unix and Linux.
It sounds like you have far more experience than I do in Linux; your guess is as good as mine.
Rebooting the system seems to have fixed the weirdness. Sudo complaining about a sudo user??
I was able to uninstall and reinstall keyman after the reboot without any problem.
Glad you were able to resolve with a reboot.
It sounds like there may be an issue in the script, perhaps a parameter error. It’s hard to know without more detail, e.g. the exact commands you typed to both install and uninstall. Also, without more detail, we can’t really assess what went wrong with the install.
ibus is run under a particular user. The post removal/installation script finds out that user and uses sudo to ibus exit or restart.
Under gnome-shell it does
ibususer= `ps -C ibus-daemon -o user=|grep -v gdm|uniq`
That is finding “steve”. On a standard install the single user has sudo. How is your system set up?
That’s the interesting thing: my system is set up normally, with “steve” (my account) being a member (the only one) of the sudo group. I had sudo’ed the apt instruction as directed in the installation instructions on the keyman website.
My only conclusion (since a reboot solved the problem) is that my system had gotten into a weird state somehow.
This suggests to me that the command @DanielGlassey referenced is giving a two line response of
steve\nsteve. Is that possible? @sm30, what do you get when you run:
ps -C ibus-daemon -o user=|grep -v gdm|uniq
I missed that it is wasta which isn’t gnome-shell so the command it runs is:
ps -C ibus-daemon -o user=
Ah, that means it found 2 ibus processes. That shouldn’t be happening so that suggests that either something is wrong in the scripts, or that wasta is doing something unexpected with ibus, or you played with ibus in some way before the problem.
It’s possible that somehow 2 ibus processes were running unbeknownst to me, and that would explain why rebooting solved the problem. I rebooted fairly recently, and “ps -C ibus-daemon -o user=” returns only a single steve at this point in time.
Thanks, that’s useful info. For the next version I’ll put a uniq in there so at least it gets a single user even if there’s more than one process though which of the multiple processes that it will exit or restart will be up to ibus and probably can’t be guaranteed to be the one that is in the gui.