xclient xinit startx

来源:互联网 发布:欢乐颂2网络播出时间 编辑:程序博客网 时间:2024/05/18 16:38

 

startx calls xinit; xinit calls $HOME/.xinitrc, if not found, calls /etc/X11/xinit/xinitrc; xinitrc calls $HOME/.Xclients, if not found, calls /etc/X11/xinit/Xclients; Xclients looks for your window-manager setting.

If you're using a display manager, you intercept the above sequence at the .Xclients/Xclients level, since the display manager starts the Xserver (otherwise the function of xinit).

So if you use "startx", and put in .xinitrc a line "startkde", that will start KDE. But if you did a graphical login, .xinitrc is not read. If you don't have an .xinitrc, then .Xclients takes over. Then you could put in .Xclients "startkde" to start KDE. That would affect both "startx" and graphical login.

I do believe that the contents of the default files, xinitrc and Xclients are probably distribution-dependent.