# lightdm is probably not needed. The server can run the multi-user target without a GUI. systemctl set-default multi-user.target # We need both 32bit and 64bit virtualGL if the application is 32bit. rpm -e VirtualGL --allmatches yum -y install VirtualGL.x86_64 VirtualGL.i386 ## # install the nvidia driver from elrepo # Remove ocl-id because it conflicts with the nvidia driver because of OpenCL yum -y remove ocl-icd.x86_64 yum -y install yum-plugin-fastestmirror nvidia-detect nvidia-detect | grep -qs kmod && yum -y install $(nvidia-detect) # reboot for the nvidia drives to detect everything. reboot # Grab the bus ID for the nvidia card. this should similar to "PCI:1:0:0". lspci can provide the same info, but the format is slighly different. nvidia-xconfig shuold provide a format that is compatible with "Xorg -isolateDevice" bus=$(nvidia-xconfig --query-gpu-info|grep PCI|awk '{print $4}') systemctl isolate multi-user.target # Remove any previous config file runs rm -f /root/xorg.conf.new # move any primar DISPLAY=":0 config out of the way mv /etc/X11/xorg.conf /etc/X11/xorg.conf.bak Xorg :1 -configure -isolateDevice $bus # xorg written as /root/xorg.conf.new # this seems to fail sometimes. Just use nvidia-xconfig and move /etc/X/xorg.conf to /etc/X/xorg.1.conf # Run "Xorg :1 -config /root/xorg.conf.new" and check for errors. Ctrl-C to cancel mv -f /root/xorg.conf.new /etc/X11/xorg.1.conf # Add the magic nvidia bits to xorg.conf nvidia-xconfig -a --allow-empty-initial-configuration --busid=$bus --use-display-device=none --virtual=1920x1200 -c /etc/X11/xorg.1.conf #mv /etc/X11/xorg.conf /etc/X11/xorg.1.conf ### Set up a systemd service to manage Xorg Display :1 ### begin headlessx.service ##### Just copy and paste into bash cat > /etc/systemd/system/headlessx@.service < /etc/profile.d/virtualgl.sh <