Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keyboard don't work on Chromium when started with nsdo #8

Open
vstoykovbg opened this issue Nov 5, 2019 · 6 comments
Open

Keyboard don't work on Chromium when started with nsdo #8

vstoykovbg opened this issue Nov 5, 2019 · 6 comments

Comments

@vstoykovbg
Copy link

vstoykovbg commented Nov 5, 2019

I run Chromium like this:

nsdo tornamespace1 /usr/bin/chromium-browser --temp-profile --incognito

And can't use keyboard with chrome (can't type URL, etc.).

valentin@computer:~$ nsdo --version
nsdo version 1.0
valentin@computer:~$ 

valentin@computer:~$ cat /etc/os-release 
NAME="Ubuntu"
VERSION="18.04.3 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.3 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic
valentin@computer:~$ 

I am using Gnome with Xwayland. Also tested it with Gnome/Xorg, Unity and Ubuntu - the same.

However, it works with Fluxbox.

...

After I logged out/logged in multiple times (while testing with different graphical environments) it started to work and now I can type the URL in the Chromium. So, in order to reproduce this bug you need to start with a fresh home directory.

Also, TOR was shut down during the tests. I started it within byobu, so it should not shut down between logouts... Strange.

@ausbin
Copy link
Owner

ausbin commented Nov 5, 2019

That's pretty spooky 👻, I just upgraded to Debian buster which has Wayland by default now apparently(?), so I'll have to try this out

@ausbin ausbin closed this as completed Nov 5, 2019
@ausbin ausbin reopened this Nov 5, 2019
@ausbin
Copy link
Owner

ausbin commented Nov 5, 2019

Accidentally pressed close button I'm not good with computers

@vstoykovbg
Copy link
Author

vstoykovbg commented Nov 10, 2019

Today it does not work (Gnome/Xorg). I don't know how I managed to make it work the last time.

Logged out and logged in with Fluxbox - works. Logged out and logged in with Gnome/Xorg - does not work.

It prints these error messages when pressing keys:

valentin@computer:~$  nsdo tornamespace1 /usr/bin/chromium-browser --temp-profile
[14936:14936:1110/192540.214706:ERROR:sandbox_linux.cc(369)] InitializeSandbox() called with multiple threads in process gpu-process.

(chromium-browser:14911): dbind-WARNING **: 19:25:40.268: Couldn't connect to accessibility bus: Failed to connect to socket /tmp/dbus-hRtuRA8873: Connection refused
[14911:14934:1110/192540.300702:ERROR:zygote_host_impl_linux.cc(259)] Failed to adjust OOM score of renderer with pid 15075: Permission denied (13)
[14911:14934:1110/192540.335728:ERROR:zygote_host_impl_linux.cc(259)] Failed to adjust OOM score of renderer with pid 15087: Permission denied (13)
[14911:14934:1110/192540.344598:ERROR:zygote_host_impl_linux.cc(259)] Failed to adjust OOM score of renderer with pid 15090: Permission denied (13)
[14911:14934:1110/192540.357013:ERROR:zygote_host_impl_linux.cc(259)] Failed to adjust OOM score of renderer with pid 15096: Permission denied (13)

(chromium-browser:14911): IBUS-WARNING **: 19:25:40.377: Unable to connect to ibus: Could not connect: Connection refused
[14936:14936:1110/192540.383123:ERROR:buffer_manager.cc(488)] [.DisplayCompositor]GL ERROR :GL_INVALID_OPERATION : glBufferData: <- error from previous GL command
[14940:15085:1110/192541.018473:ERROR:nss_util.cc(750)] After loading Root Certs, loaded==false: NSS error code: -8018
[14911:14934:1110/192541.624998:ERROR:zygote_host_impl_linux.cc(259)] Failed to adjust OOM score of renderer with pid 15335: Permission denied (13)
[14911:14934:1110/192541.684072:ERROR:zygote_host_impl_linux.cc(259)] Failed to adjust OOM score of renderer with pid 15372: Permission denied (13)
[14911:14934:1110/192543.348421:ERROR:zygote_host_impl_linux.cc(259)] Failed to adjust OOM score of renderer with pid 19722: Permission denied (13)
[15075:1:1110/192544.724058:ERROR:child_process_sandbox_support_impl_linux.cc(81)] FontService unique font name matching request did not receive a response.
[15075:1:1110/192544.724780:ERROR:child_process_sandbox_support_impl_linux.cc(81)] FontService unique font name matching request did not receive a response.
[14911:14929:1110/192549.636271:ERROR:udev_watcher.cc(94)] Failed to begin udev enumeration.
[14911:14934:1110/192550.063201:ERROR:zygote_host_impl_linux.cc(259)] Failed to adjust OOM score of renderer with pid 30182: Permission denied (13)
[14911:14934:1110/192551.823386:ERROR:zygote_host_impl_linux.cc(259)] Failed to adjust OOM score of renderer with pid 30936: Permission denied (13)
[14911:14934:1110/192551.840064:ERROR:zygote_host_impl_linux.cc(259)] Failed to adjust OOM score of renderer with pid 30940: Permission denied (13)
[14911:14934:1110/192551.847125:ERROR:zygote_host_impl_linux.cc(259)] Failed to adjust OOM score of renderer with pid 30944: Permission denied (13)
[14911:14934:1110/192551.908377:ERROR:zygote_host_impl_linux.cc(259)] Failed to adjust OOM score of renderer with pid 30948: Permission denied (13)
[14911:14934:1110/192551.952134:ERROR:zygote_host_impl_linux.cc(259)] Failed to adjust OOM score of renderer with pid 30952: Permission denied (13)
[14911:14934:1110/192554.666797:ERROR:zygote_host_impl_linux.cc(259)] Failed to adjust OOM score of renderer with pid 1913: Permission denied (13)
[14911:14934:1110/192554.695698:ERROR:zygote_host_impl_linux.cc(259)] Failed to adjust OOM score of renderer with pid 1917: Permission denied (13)
[14911:14934:1110/192554.701602:ERROR:zygote_host_impl_linux.cc(259)] Failed to adjust OOM score of renderer with pid 1921: Permission denied (13)
[14911:14934:1110/192554.792342:ERROR:zygote_host_impl_linux.cc(259)] Failed to adjust OOM score of renderer with pid 1944: Permission denied (13)
[14911:14934:1110/192554.851822:ERROR:zygote_host_impl_linux.cc(259)] Failed to adjust OOM score of renderer with pid 1952: Permission denied (13)

(chromium-browser:14911): IBUS-WARNING **: 19:25:56.757: Events queue growing too big, will start to drop.

(chromium-browser:14911): IBUS-WARNING **: 19:25:56.786: Events queue growing too big, will start to drop.

(chromium-browser:14911): IBUS-WARNING **: 19:25:56.797: Events queue growing too big, will start to drop.

(chromium-browser:14911): IBUS-WARNING **: 19:25:56.822: Events queue growing too big, will start to drop.

(chromium-browser:14911): IBUS-WARNING **: 19:25:56.895: Events queue growing too big, will start to drop.

(chromium-browser:14911): IBUS-WARNING **: 19:25:57.182: Events queue growing too big, will start to drop.

(chromium-browser:14911): IBUS-WARNING **: 19:25:58.992: Events queue growing too big, will start to drop.

(chromium-browser:14911): IBUS-WARNING **: 19:25:59.390: Events queue growing too big, will start to drop.

(chromium-browser:14911): IBUS-WARNING **: 19:25:59.503: Events queue growing too big, will start to drop.

(chromium-browser:14911): IBUS-WARNING **: 19:25:59.526: Events queue growing too big, will start to drop.

(chromium-browser:14911): IBUS-WARNING **: 19:25:59.533: Events queue growing too big, will start to drop.

(chromium-browser:14911): IBUS-WARNING **: 19:25:59.641: Events queue growing too big, will start to drop.

(chromium-browser:14911): IBUS-WARNING **: 19:25:59.742: Events queue growing too big, will start to drop.

(chromium-browser:14911): IBUS-WARNING **: 19:25:59.754: Events queue growing too big, will start to drop.

(chromium-browser:14911): IBUS-WARNING **: 19:25:59.784: Events queue growing too big, will start to drop.
valentin@computer:~$ 

For reference, here are error messages when I run chromium normally (without nsdo):

valentin@computer:~$ /usr/bin/chromium-browser --temp-profile
[17023:17023:1110/195444.031254:ERROR:sandbox_linux.cc(369)] InitializeSandbox() called with multiple threads in process gpu-process.
[16974:17020:1110/195444.135231:ERROR:zygote_host_impl_linux.cc(259)] Failed to adjust OOM score of renderer with pid 17172: Permission denied (13)
[17023:17023:1110/195444.178972:ERROR:buffer_manager.cc(488)] [.DisplayCompositor]GL ERROR :GL_INVALID_OPERATION : glBufferData: <- error from previous GL command
[16974:17020:1110/195444.182381:ERROR:zygote_host_impl_linux.cc(259)] Failed to adjust OOM score of renderer with pid 17185: Permission denied (13)
[16974:17020:1110/195444.192808:ERROR:zygote_host_impl_linux.cc(259)] Failed to adjust OOM score of renderer with pid 17188: Permission denied (13)
[16974:17020:1110/195444.199537:ERROR:zygote_host_impl_linux.cc(259)] Failed to adjust OOM score of renderer with pid 17193: Permission denied (13)
[17029:17182:1110/195444.242994:ERROR:nss_util.cc(750)] After loading Root Certs, loaded==false: NSS error code: -8018
[16974:17020:1110/195444.337889:ERROR:zygote_host_impl_linux.cc(259)] Failed to adjust OOM score of renderer with pid 17221: Permission denied (13)
[16974:17020:1110/195444.354225:ERROR:zygote_host_impl_linux.cc(259)] Failed to adjust OOM score of renderer with pid 17225: Permission denied (13)
[16974:17020:1110/195446.477723:ERROR:zygote_host_impl_linux.cc(259)] Failed to adjust OOM score of renderer with pid 17274: Permission denied (13)
[16974:17020:1110/195447.210720:ERROR:zygote_host_impl_linux.cc(259)] Failed to adjust OOM score of renderer with pid 17531: Permission denied (13)
[17172:1:1110/195447.400759:ERROR:child_process_sandbox_support_impl_linux.cc(81)] FontService unique font name matching request did not receive a response.
[17172:1:1110/195447.401320:ERROR:child_process_sandbox_support_impl_linux.cc(81)] FontService unique font name matching request did not receive a response.
[16974:17020:1110/195447.491682:ERROR:zygote_host_impl_linux.cc(259)] Failed to adjust OOM score of renderer with pid 17536: Permission denied (13)
[16974:17020:1110/195448.667050:ERROR:zygote_host_impl_linux.cc(259)] Failed to adjust OOM score of renderer with pid 17663: Permission denied (13)
[17274:1:1110/195448.671929:ERROR:child_process_sandbox_support_impl_linux.cc(81)] FontService unique font name matching request did not receive a response.
[17274:1:1110/195448.672634:ERROR:child_process_sandbox_support_impl_linux.cc(81)] FontService unique font name matching request did not receive a response.
[17274:1:1110/195448.674718:ERROR:child_process_sandbox_support_impl_linux.cc(81)] FontService unique font name matching request did not receive a response.
[17274:1:1110/195448.676036:ERROR:child_process_sandbox_support_impl_linux.cc(81)] FontService unique font name matching request did not receive a response.
[17536:1:1110/195449.650346:ERROR:child_process_sandbox_support_impl_linux.cc(81)] FontService unique font name matching request did not receive a response.
[17536:1:1110/195449.651215:ERROR:child_process_sandbox_support_impl_linux.cc(81)] FontService unique font name matching request did not receive a response.
valentin@computer:~$ 

I managed to run nsdo tornamespace1 /usr/bin/chromium-browser --temp-profile within Xephyr (running Fluxbox within it) and I am using this as a workaround (I can type normally this way).

@vstoykovbg
Copy link
Author

vstoykovbg commented Nov 16, 2019

Also other apps don't react on keypresses. For example, LibreOffice:

valentin@computer:~$ soffice

(soffice:22579): dbind-WARNING **: 14:47:55.306: Couldn't connect to accessibility bus: Failed to connect to socket /tmp/dbus-YXHbxMw69l: Connection refused

(soffice:22579): IBUS-WARNING **: 14:48:00.496: Unable to connect to ibus: Could not connect: Connection refused

(soffice:22579): IBUS-WARNING **: 14:48:07.816: Events queue growing too big, will start to drop.

...

I made some tests and it looks like removing some of these variables make the programs accept keystrokes:

unset DBUS_SESSION_BUS_ADDRESS 
unset XMODIFIERS 
unset GTK_IM_MODULE
unset QT_IM_MODULE

For LibreOffice and Chromiub-Browser it's enough to only unset GTK_IM_MODULE.

Before removing the variable:

valentin@computer:~$ echo $GTK_IM_MODULE
ibus
valentin@computer:~$ 

@ausbin
Copy link
Owner

ausbin commented Jan 24, 2021

Sorry, I'm pretty late here but I can reproduce this with Firefox, thanks for the report. Example:

$ DBUS_SESSION_BUS_ADDRESS= nsdo gatech firefox --no-remote -P gatech # can type
(firefox:42273): IBUS-WARNING **: 23:58:39.625: Unable to connect to ibus: Could not connect: Connection refused
$ nsdo gatech firefox --no-remote -P gatech # can't type
(firefox:42716): IBUS-WARNING **: 23:59:07.867: Unable to connect to ibus: Could not connect: Connection refused
(firefox:42716): IBUS-WARNING **: 23:59:10.716: Events queue growing too big, will start to drop.

I believe this happened to me a few years ago, and the solution was to connect to dbus over a non-abstract unix socket instead of the default abstract unix socket. Looks like I upvoted this post which seems to confirm that: https://unix.stackexchange.com/q/184964/62375

I think I did something a little crazy like recompiling dbus, but jeez I can't remember. Will have to look into this when I get a chance

@workdesk96
Copy link

workdesk96 commented Jul 12, 2023

Temporary work around for the keyboard issue seems to be to use sudo within the namespace.
For example, in case of waterfox browser:

nsdo gatech bash

Then within that bash shell

sudo -u <linux-user-name> ./waterfox

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants