Last active
October 30, 2024 07:29
-
-
Save rejunity/48859aa3e922bccbf0b97e382057df49 to your computer and use it in GitHub Desktop.
How to run Unity standalone application "offscreen" on Linux
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Recipe on running Unity (or any OpenGL based application) offscreen on your local Linux machine. | |
# Requirement: X server, NVIDIA drivers installed and working correctly. | |
# Tested on Ubuntu14.04. | |
# Summary: install XDummy and VirtualGL, configure virtual framebuffer, run your application via VirtualGL | |
# install XDummy | |
sudo apt-get update | |
sudo apt-get install xorg-video-abi-15 xserver-xorg-video-dummy | |
# download default configuration file for XDummy | |
wget http://xpra.org/xorg.conf . | |
# install VirtualGL to forward calls from virtual framebuffer device to actual GPU | |
wget https://downloads.sourceforge.net/project/virtualgl/2.5.1/virtualgl_2.5.1_amd64.deb . | |
sudo dpkg -i virtualgl_2.5.1_amd64.deb | |
# run virtual framebuffer and assign it to a display that is not in use already, say display 10 | |
Xorg -noreset +extension GLX +extension RENDER -logfile ./10.log -config ./xorg.conf :10 | |
# run Unity standalone on display 10 and via VirtualGL | |
DISPLAY=:10 vglrun $your_unity_exec |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment