x11docker: Running as non-root user shows error due to missing process id (NixOS)

Version: 5.3.1 OS: NixOS

When running as non-root user, the command that tries to get the process id (ps ax | grep ...) returns nothing, because ps does not list the process, as it as run as root which it cannot see.

Symptopm: container.pid is empty

As a result, an error window pops up, but the container starts fine otherwise.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 16 (9 by maintainers)

Commits related to this issue

Most upvoted comments

The important thing seems to be /proc mounted with option hidepid=2, which hides all processes in /proc which are not owned by the current user. Judging from your code, the pid watcher will thus also probably fail.

For NixOS, a viable solution should be to add the user to the proc group, which exempts him from pid hiding. I suppose, ps aux will also work like expected then.

Will test that next week.