FreeBSD: Where Is xorg.conf? (+ How To Generate New One)
Written by: Donovan / Last updated: Mar 21, 2022Looking for xorg.conf
in FreeBSD?
Not sure where to find it or how to generate a new configuration file?
Location of xorg.conf in FreeBSD
You can find it here (by default):
/etc/X11/xorg.conf
You may also find it here:
/usr/local/etc/X11/xorg.conf
What if there is no xorg.conf file?
First option you have is to manually created it:
sudo touch /etc/X11/xorg.conf
You’ll have to fill in the details by hand this way.
Another option is to use the Xorg -configure
option:
Xorg -configure
This will generate an xorg.conf
file for you (
see man page
).
NVIDIA users only
If you have an NVIDIA and have X working already, use:
sudo nvidia-settings
The configuration you save here will generate an xorg.conf
file for you (or edit the existing one).
Other useful info
Refer to the X log file in FreeBSD which can offer more info (including the whereabouts of xorg.conf
):
cat /var/log/Xorg.0.log | more
To do a general, system-wide search for xorg.conf
or any other file:
find / -name xorg
This command will do a recursive search starting from /
for any file or directory containing xorg
.