在fedora中生成/etc/X11/xorg.conf

忘记从哪个版本开始,xorg没有/etc/X11/xorg.conf文件了,有时候需要通过该文件修改xorg的一些参数,所以需要生成xorg.conf文件,从fedora的官网上找到下面的方法产生xorg.conf文件,原文见连接https://fedoraproject.org/wiki/How_to_create_xorg.conf

How to create xorg.conf

Fedora releases since Fedora 10 do not create a /etc/X11/xorg.conf file, used to configure the X server, by default. The X configuration is automatically determined each time X is started. In most cases, this works well and there is no need to manually specify X configuration information.

If you need to make manual changes to X configuration for any reason, you will first need to create a /etc/X11/xorg.conf file. There are several ways of doing this.

system-config-display

If you have the system-config-display package installed, you can use the system-config-display command to create a configuration file. You can run it interactively simply by running system-config-display as root (or find it in the system menus under System > Administration > Display). This may not work if you cannot run X at all. In this case, you can run it non-interactively by using the --noui parameter, like so:

system-config-display --noui

This will create a clean /etc/X11/xorg.conf file using the automatically detected driver for your video card. If you wish to specify a particular driver for your card you can simply create a standard /etc/X11/xorg.conf file and then edit it by hand, but you can also do this directly with system-config-display. For example, to specify the nv driver, you could do:

system-config-display --noui --set-driver=nv

When using the --set parameters, --noui is implied, so you do not really need to include it. For more information on ways you can use system-config-display, run system-config-display --help.

Xorg -configure

If you do not have the system-config-display package installed and cannot easily install it (for instance, you are stuck without X, and networking is not working), you can create a basic xorg.conf using the X executable itself. As root, run:

Xorg -configure

This will create the file /root/xorg.conf.new, which you can then copy to /etc/X11/xorg.conf:

cp /root/xorg.conf.new /etc/X11/xorg.conf

and edit according to your needs. Note that this will only work if no X server is currently running.

Advertisements
This entry was posted in Computers and Internet. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s