startx 启动过程

/usr/bin/startx,脚本

 20 userclientrc=$HOME/.xinitrc
 21 sysclientrc=/etc/X11/xinit/xinitrc
 22 
 23 
 24 userserverrc=$HOME/.xserverrc
 25 sysserverrc=/etc/X11/xinit/xserverrc
 26 defaultclient=xterm
 27 defaultserver=/usr/bin/X 
。。。。。
197 xinit "$client" $clientargs -- "$server" $display $serverargs
</pre><pre name="code" class="plain">=》<span style="color:#ff0000;">startx调用xinit启动X</span>
<span style="white-space:pre">	</span>默认参数优先级$HOME,/etc/X11/xinit下的xinitrc,xserverrc
</pre><h2>/usr/bin/xinit,二进制</h2><div><span style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">功能:启动一个 </span><span style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">X </span><span style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">服务器,同时启动一个基于 </span><span style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">X </span><span style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px">的应用程序</span></div><div><span style="color:rgb(51,51,51); font-family:Arial; font-size:14px; line-height:26px"></span></div><h2><span style="font-family:Arial; color:#333333"><span style="font-size:14px; line-height:26px">流程分析</span></span></h2><div><span style="font-family:Arial; color:#333333"><span style="font-size:14px; line-height:26px">假设没有$HOME下的配置,存在如下配置</span></span><span style="color:rgb(51,51,51); font-size:14px; line-height:26px; font-family:Arial">/etc/X11/xinit/xinitrc ,</span><span style="color:rgb(51,51,51); font-size:14px; line-height:26px; font-family:Arial">/etc/X11/xinit/xserverrc </span></div><div><span style="font-family:Arial; color:#333333"><span style="font-size:14px; line-height:26px"></span></span><pre name="code" class="html">xx@xx$cat /etc/X11/xinit/xinitrc 
#!/bin/bash
# $Xorg: xinitrc.cpp,v 1.3 2000/08/17 19:54:30 cpqbld Exp $

# /etc/X11/xinit/xinitrc
#
# global xinitrc file, used by all X sessions started by xinit (startx)

# invoke global X session script
. /etc/X11/Xsession
</pre><pre name="code" class="html">xx@xx$cat /etc/X11/xinit/xserverrc 
#!/bin/sh

# $Id: xserverrc 189 2005-06-11 00:04:27Z branden $

exec /usr/bin/X11/X -nolisten tcp


$ startx
</pre><pre name="code" class="html">197 xinit "$client" $clientargs -- "$server" $display $serverargs 实际上就是
xinit <span style="font-family: Arial;">. /etc/X11/Xsession </span>-- <span style="font-family: Arial;">exec /usr/bin/X11/X -nolisten tcp</span> :0
 
 




评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

kelsel

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值