This is an update to previous posts for NetBSD 6x and 7x:
https://slice2.com/2016/01/30/howto-install-the-xfce-4-12-desktop-on-netbsd-7/
https://slice2.com/2015/01/03/howto-install-the-xfce-4-desktop-on-netbsd-6-1-5/
https://slice2.com/2013/10/10/howto-install-the-xfce-4-desktop-on-netbsd-6-1-2/

For a lightweight functional desktop on NetBSD, install XFCE. As root, perform the following steps. This covers 32 and 64 bit x86 hardware. Make sure you have the X11 Sets installed. Since NetBSD essentially runs on everything, simply adjust the repository path to your architecture from the list here: http://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD/

1) Setup your binary repository.
> mkdir -p /usr/pkg/etc/pkgin
> touch /usr/pkg/etc/pkgin/repositories.conf
> vi /usr/pkg/etc/pkgin/repositories.conf and add path:
For x64
http://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD/amd64/8.1/All/
For x32
http://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD/i386/8.1/All/

2) Add the NetBSD ftp server to your host file. This is for convenience and can be removed when done.
> vi /etc/hosts and add:
199.233.217.201 ftp.netbsd.org

3) Export your path.
Note: I don’t know why the encoded quote characters keep appearing after /ALL/ in the path statements below. It must be an html coding issue and I’m not a developer. Just make sure that at the end of the path statement it ends with /8.1/All/” with no trailing characters. In other words, it should look like the paths depicted in step 1 above only it must end in a ” character.
For x64:
> export PKG_PATH=”http://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD/amd64/8.1/All/”
For x32:
> export PKG_PATH=”http://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD/i386/8.1/All/”

4) Install the latest version of pkgin on your system.
> pkg_add -v pkgin-*

5) Update the pkgin database and install XFCE.
> pkgin update
> pkgin install xfce4
calculating dependencies…done.

139 packages to install:
enca-1.15 libproxy-0.4.15 gsettings-desktop-schemas-3.24.0 libgpg-error-1.36 libIDL-0.8.14nb4 nspr-4.21 spidermonkey52-52.7.4nb9
libogg-1.3.3 p11-kit-0.23.15 nettle-3.4.1 libtasn1-4.13 libcfg+-0.7.0 gmp-6.1.2 ORBit2-2.14.19nb4 libgcrypt-1.8.5 libpsl-0.20.2nb4
glib-networking-2.60.3 tdb-1.4.0nb1 popt-1.16nb2 jbigkit-2.1 xvidcore-1.3.3nb1 x264-devel-20190312 libvpx-1.8.0 libvdpau-1.2
libva-2.3.0 libtheora-1.1.1nb2 libbluray-1.1.2 libass-0.14.0nb2 lame-3.100nb1 libunistring-0.9.10 mozilla-rootcerts-1.0.20190306
python27-2.7.16 py27-expat-2.7.16 libidn2-2.0.5 ffmpeg3-3.4.6nb1 tiff-4.0.10nb1 lcms2-2.9 poppler-0.76.1 py37-expat-3.7.3
py37-cElementTree-3.7.3 samba-3.6.25nb16 libsoup-2.64.2nb3 libgnome-keyring-3.12.0 GConf-3.2.3nb2 perl-5.28.2 p5-URI-1.76
xcb-util-0.4.0 pcre2-10.33 gnutls-3.6.7 libvorbis-1.3.6nb1 libltdl-2.4.6 gstreamer1-1.16.0 xmlcatmgr-2.2nb1 iso-codes-3.77nb1
libxfce4util-4.13.3 python37-3.7.3nb1 gle-3.1.0nb4 polkit-0.115nb2 zonetab-0 icu-64.2nb1 pcre-8.43 libffi-3.2.1nb4 readline-8.0
at-spi2-core-2.26.2nb1 lzo-2.10 libuuid-2.32.1 harfbuzz-2.4.0nb3 graphite2-1.3.11nb2 fribidi-0.19.7 libxml2-2.9.9 libcroco-0.6.8
freetype2-2.10.0 gnome-icon-theme-3.12.0nb3 librsvg-2.44.14nb1 shared-mime-info-1.10 pango-1.42.4nb5 libepoxy-1.4.3nb2 libXft-2.3.3
fontconfig-2.13.1 cairo-gobject-1.16.0nb3 cairo-1.16.0 atk-2.26.1 at-spi2-atk-2.26.1nb1 gsed-4.7 bash-5.0.7 gtksourceview3-3.24.9
glib2-2.60.4nb5 libical-3.0.3nb4 consolekit-1.2.1nb2 xscreensaver-5.40nb1 mate-polkit-1.22.0nb1 xfce4-garcon-0.6.2 xfce4-conf-4.13.7
upower-0.99.4nb4 libxklavier-5.4nb3 libwnck-2.30.6nb25 libglade-2.6.4nb29 libcanberra-0.30 vte3-0.54.3 startup-notification-0.12nb3
xfce4-exo-0.12.6 libnotify-0.7.7nb5 libexif-0.6.21nb1 gvfs-1.6.7nb42 gobject-introspection-1.60.1nb1 poppler-glib-0.76.1 png-1.6.37
openjpeg-2.3.1 libgsf-1.14.45 jpeg-9cnb1 gdk-pixbuf2-2.36.12 ffmpegthumbnailer-2.2.0nb1 dbus-glib-0.110 dbus-1.12.16 curl-7.65.1
libxfce4ui-4.13.5 libwnck3-3.24.1nb5 hicolor-icon-theme-0.17 gtk2+-2.24.32nb8 desktop-file-utils-0.23nb1 xfce4-xarchiver-0.5.4nb10
xfce4-wm-themes-4.10.0nb10 xfce4-wm-4.13.2 xfce4-tumbler-0.2.4 xfce4-thunar-1.8.6 xfce4-terminal-0.8.7.4nb3 xfce4-settings-4.13.6
xfce4-session-4.13.2 xfce4-power-manager-1.6.2 xfce4-panel-4.13.5 xfce4-orage-4.12.1nb14 xfce4-mousepad-0.4.1nb2 xfce4-desktop-4.13.4
xfce4-appfinder-4.13.3 xdg-utils-1.1.3nb1 gtk3+-3.24.8 gnome-themes-standard-3.20.2nb8 elementary-xfce-icon-theme-0.11
xfce4-4.12.0nb16

0 to refresh, 0 to upgrade, 139 to install
219M to download, 1360M to install

proceed ? [Y/n] Y

6) Add fonts and fam.
> pkgin install font-adobe-75*
> pkgin install font-adobe-100*
> pkgin install font-adobe-utopia*
> pkgin install fam
> cp /usr/pkg/share/examples/rc.d/famd /etc/rc.d/
> cp /usr/pkg/share/examples/rc.d/dbus /etc/rc.d/
> echo rpcbind=YES >> /etc/rc.conf
> echo famd=YES >> /etc/rc.conf
> echo dbus=YES >> /etc/rc.conf
> /etc/rc.d/rpcbind start
> /etc/rc.d/famd start
> /etc/rc.d/dbus start

7) Configure X and start the desktop for the first time. You can start X as root or other users. Run the following for users on the system. For example, the user slice2 would be setup as:
> echo xfce4-session >> /home/slice2/.xinitrc
> ln /home/slice2/.xinitrc /home/slice2/.xsession
> chown slice2:users /home/slice2/.xinitrc
> chown slice2:users /home/slice2/.xsession
> su – slice2
> startx (note: be patient, it may take a minute to load)
a) In the upper left, select Applications > Log out to continue to install the apps below.

b) For root:
> echo xfce4-session >> /root/.xinitrc
> ln /root/.xinitrc /root/.xsession
> startx

8) Install additional apps as desired. This step is optional. Enter Y when asked to proceed ? [Y/n] for each app. You can add the pkgin -y install if you want to skip the prompt. I just like to see what dependencies will be installed.
Browsers and plugins:
> pkgin -y install firefox
> pkgin -y install opera
> pkgin -y install flashplayer
> pkgin -y install mozilla-fonts*
> pkgin -y install openjdk*
> pkgin -y install openquicktime
> pkgin -y install xpdf

Install optional security apps, utils and shells:
> pkgin -y install chkrootkit
> pkgin -y install clamav
a) after installing clamav, refresh the virus db.
> /usr/pkg/bin/freshclam
> pkgin -y install coreutils
> pkgin -y install emacs
> pkgin -y install fish
> pkgin -y install iftop
> pkgin -y install keepassx
> pkgin -y install mhash
> pkgin -y install nbtscan
> pkgin -y install nmap
> pkgin -y install xtail
> pkgin -y install xtraceroute
> pkgin -y install vim
> pkgin -y install wget

Office productivity apps, zip tools, DVD burning, file transfer and multimedia:
> pkgin -y install audacious
> pkgin -y install audacity
> pkgin -y install brasero
> pkgin -y install bunzip
> pkgin -y install bzip2
> pkgin -y install filezilla
> pkgin -y install libreoffice*
Note: you can launch liberoffice from Applications > Office, or enter the soffice command in an xterm.
> pkgin -y install thunderbird
> pkgin -y install tree
> pkgin -y install vlc*
> pkgin -y install xmms
> pkgin -y install xfce4-xmms-plugin
> pkgin -y install xcdroast
> pkgin -y install xcalc
> pkgin -y install xpad
> pkgin -y install xpaint

Note: For Audio CD playback in XMMS, configure XMMS in the following manner:
a) Select “Options” -> “Preferences” (or press Control-P)
b) Select “Audio I/O Plugins” tab
c) Configure “CD Audio Player … [libcdaudio.so]”
d) Change “Device:” to the raw partition of your CD player (e.g., `/dev/cd0d’).
e) Change “Directory:” to an existing (empty) directory to be used within the
XMMS file selection dialog boxes as the path to select tracks on audio CDs
(e.g., `/cdrom/’).
f) Select “OK” to save the changes.

9) Now that all your apps are installed, start your desktop.
> su – slice2 (su to your user account)
> startx (remember, it takes a minute to load)
Or as root:
> startx