Skip to content

Instantly share code, notes, and snippets.

@devxpy
Last active December 12, 2019 17:46
Show Gist options
  • Save devxpy/b63deb86db0b4ecb897809cf43a52333 to your computer and use it in GitHub Desktop.
Save devxpy/b63deb86db0b4ecb897809cf43a52333 to your computer and use it in GitHub Desktop.
Run ns2 on windows using docker

Run ns2 on windows:

  • Install docker for windows.
  • Log out / Log in.
  • Open "Docker Desktop" from Start menu. (Notice Icon in taskbar)
  • Restart if docker asks you to do it.
  • Install VcXsrv.
  • Open "XLaunch" from Start menu.

Check the "Disable access control" checkbox.

  • Open "PowerShell" from Start menu.
  • Ensure docker info runs successfully.
  • Run docker run -it -e DISPLAY=host.docker.internal:0 -v ${PWD}:/mnt -w ${PWD} ekiourk/ns2 bash
  • Enter your password when asked for it. If your user account don't have a password, set one first.
  • Wait for download...
  • You'll be dropped in a shell where ns, nam and xgraph should work.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment