Skip to content

Instantly share code, notes, and snippets.

@xthezealot
Last active August 27, 2018 23:39
Show Gist options
  • Save xthezealot/cc3b9c77f1c4d712bd281abbdfcf0199 to your computer and use it in GitHub Desktop.
Save xthezealot/cc3b9c77f1c4d712bd281abbdfcf0199 to your computer and use it in GitHub Desktop.
Setup Openbox on FreeBSD as a VMware guest
#!/bin/sh
# Install
pkg install open-vm-tools xf86-input-vmmouse xf86-video-vmware xorg openbox obmenu
# Run services on start (see /etc/rc.conf)
sysrc dbus_enable="YES"
sysrc moused_enable="YES"
sysrc vmware_guest_vmblock_enable="YES"
sysrc vmware_guest_vmhgfs_enable="YES"
sysrc vmware_guest_vmmemctl_enable="YES"
sysrc vmware_guest_vmxnet_enable="YES"
sysrc vmware_guestd_enable="YES"
# To add if something fails later on:
# sysrc hald_enable="YES"
# X11 configuration
echo '# Temporary fix to set vmmouse\
Section "ServerFlags"\
Option "AutoAddDevices" "false"\
EndSection\
\
Section "InputDevice"\
Identifier "Mouse0"\
Driver "vmmouse"\
Option "Device" "/dev/sysmouse"\
EndSection\
\
Section "InputClass"\
Identifier "KeyboardDefaults"\
Option "XkbLayout" "fr"\
EndSection\
\
Section "Device"\
Identifier "Card0"\
Driver "vmware"\
EndSection' > /usr/local/etc/X11/xorg.conf.d/vmware.conf
# Enable 3D acceleration when available
pw groupmod video -m white || pw groupmod wheel -m white
# Run Openbox after X11
echo 'vmware-user\
openbox-session' > ~./xinitrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment