Created
March 16, 2020 18:00
-
-
Save jwnimmer-tri/8e28f3ea117e8ee543d52e94a9948237 to your computer and use it in GitHub Desktop.
CI script for starting xorg server on Ubuntu 18.04
This file contains hidden or 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
# Start the X DISPLAY server. | |
apt_install xserver-xorg-core | |
sudo systemctl stop xorg.service || true | |
cat | sudo tee /lib/systemd/system/xorg.service <<EOF | |
[Unit] | |
Description=X Server | |
After=network.target | |
[Service] | |
ExecStart=/usr/bin/X :0 | |
[Install] | |
WantedBy=multi-user.target | |
Alias=xorg.service | |
EOF | |
cat | sudo tee /etc/X11/xorg.conf <<EOF | |
Section "ServerLayout" | |
Identifier "Layout0" | |
Screen 0 "Screen0" | |
EndSection | |
Section "Files" | |
EndSection | |
Section "Monitor" | |
Identifier "Monitor0" | |
VendorName "Unknown" | |
ModelName "Unknown" | |
HorizSync 28.0 - 33.0 | |
VertRefresh 43.0 - 72.0 | |
Option "DPMS" | |
EndSection | |
Section "Device" | |
Identifier "Device0" | |
Driver "nvidia" | |
VendorName "NVIDIA Corporation" | |
BusID "PCI:0:29:0" | |
EndSection | |
Section "Screen" | |
Identifier "Screen0" | |
Device "Device0" | |
Monitor "Monitor0" | |
DefaultDepth 24 | |
Option "AllowEmptyInitialConfiguration" "True" | |
Option "ConnectedMonitor" "none" | |
SubSection "Display" | |
Depth 24 | |
EndSubSection | |
EndSection | |
EOF | |
sudo systemctl reenable xorg.service | |
sudo systemctl start xorg.service |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment