Where are xinitrc and xserverrc files?

Hello! I am brand new to FreeBSD and I just installed it on my dad's old laptop. I am happy that so far I have installed X.Org and got the basic X window system running, and without any errors. I am still trying to understand X.Org and I am reading though the manuals. I know that when I enter startx it first looks for the .xinitrc file in the home directory to tell it how to load an X session, and that without this file, the system will look at the xinitrc file. When I do that it works fine. But the man page for startx(1) says the system wide xinitrc is located in the /usr/X11R6/lib/X11/xinit directory. But the /X11R6 directory is not in /usr or anywhere else. I searched for the xinitrc and the only location is /usr/local/etc/X11/xinit/ which is different from what the man page says. The man page also says the xserverrc file is in the same place as xinitrc but it is not anywhere at all. I guess it doesn't matter because everything is working and I could just create the .xinitrc and .xserverrc files in the home directory but because I want to understand how things work I would like to know if I don't have the /X11R6/lib/X11/xinit directory and the xinitrc, xserverrc system wide files because I did something wrong. Thank you.
 
CarlManCity said:
Hello! I am brand new to FreeBSD and I just installed it on my dad's old laptop. I am happy that so far I have installed X.Org and got the basic X window system running, and without any errors. I am still trying to understand X.Org and I am reading though the manuals. I know that when I enter startx it first looks for the .xinitrc file in the home directory to tell it how to load an X session, and that without this file, the system will look at the xinitrc file. When I do that it works fine. But the man page for startx(1) says the system wide xinitrc is located in the /usr/X11R6/lib/X11/xinit directory.

Mine says
Code:
       The   system-wide   xinitrc  and  xserverrc  files  are  found  in  the
       /usr/local/etc/X11/xinit directory.

locate(1) agrees.
 
/usr/X11R6/lib/X11 is old and un-BSD. xinitrc is in /usr/local/etc/X11/xinit, which is where it belongs on a FreeBSD system. On my system the man page actually says the latter, so please tell me which version of X.Org you're running. A system wide xserverrc doesn't exist by default as far as I know.

P.S. Please fix your username. It should be @CarlLiverpool ;)
 
Last edited by a moderator:
wblock@ said:
Mine says
Code:
       The   system-wide   xinitrc  and  xserverrc  files  are  found  in  the
       /usr/local/etc/X11/xinit directory.

locate(1) agrees.

Yes thank you, that is also where my xinitrc file is located. But there is nothing else in that directory. The xserverrc file is not there or anywhere else at all. I was confused because the man page said both would be located in the /usr/X11R6/lib/X11/xinit directory but I did not have the /X11R6 directory in /usr or anywhere else.
 
fonz said:
P.S. Please fix your username. It should be @CarlLiverpool ;)

Oh no no no sir! :beer

fonz said:
/usr/X11R6/lib/X11 is old and un-BSD. xinitrc is in /usr/local/etc/X11/xinit, which is where it belongs on a FreeBSD system. On my system the man page actually says the latter, so please tell me which version of X.Org you're running. A system wide xserverrc doesn't exist by default as far as I know.

Thank you - you have pointed me in the right direction now. I used the pkg command to download and install X.Org so it is the latest version. Also the result from pkg info xorg shows the version to be 7.7. But when you mentioned the man page on your system it made me think. I was not reading from the startx(1) man page on my own system but instead the man page on freebsd.org. Only now did I realize that it was the man page for XFree86. But when I changed the system in the drop down menu to any of the FreeBSD releases there is no information for startx(1). Why are there other systems listed for man pages on FreeBSD.org anyway?

Well I called for my own system's man page for startx(1) and yes - it does say as you say that xinitrc is in /usr/local/etc/X11/xinit which is great because that's where mine is! But it still also says that the xserverrc file is also in that directory. But if you say that the file doesn't exist by default then I'm glad to know that because I don't have that file anywhere at all. But then why should the man page say that it's found in that directory?

Thank you for helping.
 
Last edited by a moderator:
CarlManCity said:
But when I changed the system in the drop down menu to any of the FreeBSD releases there is no information for startx(1).
X.Org is not part of FreeBSD itself, it's third-party software we call a port. If you select one of the "... and Ports" options, or just "FreeBSD Ports" you'll find the right man page.
CarlManCity said:
But if you say that the file doesn't exist by default then I'm glad to know that because I don't have that file anywhere at all. But then why should the man page say that it's found in that directory?
That directory is probably where it should be if it's there in the first place. If that is indeed so, then I suppose the wording in the man page might be somewhat unfortunate.
 
wblock@ said:
The man page for startx(1) in the first post goes to what appears to be the same one as I see locally. It does not mention X11R6 at all.
Yes that's because even though it was a man page on freebsd.org I didn't realize I was actually looking at a page for an XFree86 system and it states that the xinitrc and xserverrc files are in /usr/X11R6/lib/X11/xinit.

fonz said:
X.Org is not part of FreeBSD itself, it's third-party software we call a port. If you select one of the "... and Ports" options, or just "FreeBSD Ports" you'll find the right man page.

Thanks - I did actually check "FreeBSD 8.3-Release and Ports" because it's the version I installed and there was no information for startx(1). But you are right that "...and Ports" does display the page for startx(1) but for some reason all versions except 8.2, 8.3, and 8.4.

Anyways, the ports pages gives even another location for the xinitrc and xserverrc files: /usr/local/lib/X11/xinit! I checked the ports pages for a few versions but I'm assuming it says that for all versions. So I guess it is true what's been said here - that some man pages for ports are out of date. I guess I can maybe understand that if maybe people who use a port are probably already really familiar with it. Not great for someone like me though who is just learning things. Good thing there's a forum!
 
Back
Top