X11 connection rejected because of wrong authentication in Mininet
Asked Answered
S

2

5

I am getting this message whenever I run xterm from within mininet:

mininet> xterm h1
mininet> X11 connection rejected because of wrong authentication.

However, if I run it as:

mininet@mininet-vm:~$ xterm

It shows the window as normal.

I only experience this issue with Mininet running on virtual box with ubuntu 20.04.02.

With other ubuntu version (14.04.06), xterm works fine.

Any help on this would be appreciated..

Spence answered 29/4, 2021 at 14:14 Comment(0)
G
13

Had a similar issue at some point. The problem was that when you are running the mininet console you do that as root and not as the ssh'ed user - mininet in your case. I vaguely remember resolving it by creating .Xauthority files and giving the root user and the mininet user permissions to them... Can't remember the whole procedure now, hopefully this would give you a clue.

Page #27 of this document suggests a possible resolution.

What they suggest is:

  1. As your non-root user do xauth list $DISPLAY. This should return a line describing the display. in my case, ubuntu-bionic/unix:0 MIT-MAGIC-COOKIE-1 SOME_HASH. Copy that line.

  2. Now, log-in as the super user sudo -s

  3. Authorize that display information for the root user xauth add LINE_YOU_COPIED_IN_1.

  4. That should be it

If you see an error about .Xauth not existing follow this link to create one and go back to step 1.

Gauntlet answered 11/5, 2021 at 15:4 Comment(0)
F
2

I struggled with the same error but adding -E while creating the topology fixed it for me.

  1. sudo -E mn or sudo -E mn --custom.... for custom topologies
  2. xterm h1 h2

xterm works as it normally would.

Foregut answered 13/10, 2022 at 9:49 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.