# Font Path - "xorg.conf" vs. ".xinitrc"



## Niatross (Jan 10, 2013)

I installed the x11-fonts/webfonts port.

The FreeBSD manual says you can configure the Font Path using one of the following:

~/etc/X11/xorg.conf

```
FontPath     "/usr/local/lib/X11/fonts/webfonts/"
```

~/.xinitrc

```
xset fp+ /usr/local/lib/X11/fonts/webfonts
```

Which one is recommended? Which one should I use? Is one method starting to deprecate the other? Does anybody have a preference and why?

I am using FreeBSD 9.0-RELEASE.


----------



## cpm@ (Jan 10, 2013)

The ~/.xinitrc file is run when Xorg(1) starts up, so this is where we need to place everything we want to load at startup. Is preferable put this in etc/X11/xorg.conf, for sure.

As handbook explains: 


> This will work but will be lost when the X session is closed, unless it is added to the startup file (~/.xinitrc for a normal startx session, or ~/.xsession when logging in through a graphical login manager like XDM). A third way is to use the new /usr/local/etc/fonts/local.conf file: see the section on anti-aliasing.



If you use xset(1), it will only stay in effect for the current X session. If you leave X and later come back, the changes will be gone.


----------



## Niatross (Jan 11, 2013)

> If you leave X and later come back, the changes will be gone.



Why would that be?

The xset command is inside the ~/.xinitrc file. If I leave X and then type startx ...the following command is reloaded again:


```
xset fp+ /usr/local/lib/X11/fonts/webfonts
```


----------



## cpm@ (Jan 11, 2013)

Niatross said:
			
		

> Why would that be?
> 
> The xset command is inside the ~/.xinitrc file. If I leave X and then type startx ...the following command is reloaded again:
> 
> ...



Specifing, ~/.xinitrc is used to start the X Window System server and a first client program on systems that are not using a display manager. All run arguments used by ~/.xinitrc will work while X server be running up. The startx script is a front end to xinit(1) that provides a somewhat nicer  user interface for running a single session of the X Window System. Regarding xset(1) display options will be reset to default values when you log out. If you reload, always, be set again. 

To make works properly graphic card and all his resources is needed xorg.conf support for 3D acceleration.


----------

