Skip to content

Instantly share code, notes, and snippets.

@drozdowsky
Last active February 8, 2020 16:05
Show Gist options
  • Save drozdowsky/c27ed7381b77c29015c8f381fe874a47 to your computer and use it in GitHub Desktop.
Save drozdowsky/c27ed7381b77c29015c8f381fe874a47 to your computer and use it in GitHub Desktop.
FreeBSD with xorg on xhyve (macOS)

Tutorial how to use FreeBSD (with X11) on macOS using: xhyve + x11vnc + vnctiger + xorg-dummy-driver

  1. Install xhyve (e.g. brew install xhyve)
  2. Use this script to start installation of FreeBSD using xhyve https://github.com/machyve/xhyve/blob/master/xhyverun-freebsd.sh
  3. Add new user in FreeBSD so you won't run Xorg as root (also don't forget to add this user to group video)
  4. To boot up FreeBSD change script so BOOTVOLUME=$IMG
  5. Install essential packages pkg install xorg-minimal xorg-fonts x11vnc xf86-video-dummy
  6. Create /etc/X11/xorg.conf with dummy driver (example configuration https://gist.github.com/divinity76/ce210b5dbcd9ea7d0585ac403caef577)
  7. In your home folder create/change .xinitrc to start some window manager e.g. exec dwm
  8. Start xorg startx & (and pray for no errors)
  9. Change your bridge ip and copy it ifconfig
  10. Start vnc server x11vnc (and your FreeBSD is waiting for connection)
  11. Now on your mac install client e.g. vnctiger
  12. Fire up vnctiger paste that ip and add port 5900 (by default) and connect

You will find on internet people recommending xvfb (instead of dummy-driver) but dummy is probably faster.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment