Originally Posted by aleunix
I don't see file .xinitrc or .xsession on my directory.
are not present on default installations. Either is simply a text file you create yourself.
should answer a number of questions about how X starts. startx
determines whether ~/.xinitrc
exists & if it does execute it. If not, execute /etc/X11/xinit/xinitrc
. If you look at the latter, this has a number of initializations followed by starting a number of X client applications followed by the chmod(2)
You can simply edit /etc/X11/xinit/xinitrc
& be done with it, but this is a crude solution. The point of looking at the code for startx
is to point out that the intention is to allow users to have customized X environments while leaving a default configuration available.
So one could copy /etc/X11/xinit/xinitrc
into one's home directory as ~/.xinitrc
& customize it locally. Some people simply place whatever applications they want to run into ~/.xinitrc
without all the cruft specified in /etc/X11/xinit/xinitrc
. It's your choice, but heed how applications are started in the background before the window manager. Failure to understand this can result in a mess.