Skip to content

Instantly share code, notes, and snippets.

@rejunity
Last active May 11, 2022 03:43
Show Gist options
  • Save rejunity/d450a23385072b845a38b77949ac8215 to your computer and use it in GitHub Desktop.
Save rejunity/d450a23385072b845a38b77949ac8215 to your computer and use it in GitHub Desktop.
How to run Unity standalone application on a "headless" (w/o monitor) Linux box locally
# Recipe on running Unity (or any OpenGL based application) on Linux machine without monitor.
# Requirement: NVIDIA drivers installed and working correctly.
# Tested on Ubuntu14.04.
# Summary: configure virtual display, run X server and launch your application on the same display as X.
# install X server
sudo apt-get install xserver-xorg
# configure virtual display device for X server
# nvidia-xconfig will update xorg.conf file
sudo nvidia-xconfig -a --use-display-device=None --virtual=1280x1024
# run X server and call it display 0
sudo /usr/bin/X :0 &
# run Unity standalone on display 0
DISPLAY=:0 $your_unity_exec
@custstu
Copy link

custstu commented May 10, 2022

The standalone application is a "server build" or "headless mode" checked linux standalone player, right?

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