红联Linux门户
Linux帮助

请问 xinit 和 startx 有设么区别

发布时间:2009-10-17 20:07:29来源:红联作者:wangdonghua
问题如标题,现在突然有点感觉,问题是越来越多了
文章评论

共有 6 条评论

  1. 一米短绳 于 2009-11-01 22:21:36发表:

    [i=s] 本帖最后由 一米短绳 于 2009-11-1 22:25 编辑 [/i]

    这还不明白,xinit是binary file(二进制可执行文件),startx是shell脚本。

    #xinit的参数多着呢,不加参数执行当然有些X服务不能启动。


    startx是专门为xinit这个binary file写的脚本,你看下它的内容,
    #!/bin/sh
      # $Xorg: startx.cpp,v 1.3 2000/08/17 19:54:29 cpqbld Exp $
      #
      # This is just a sample implementation of a slightly less primitive
      # interface than xinit. It looks for user .xinitrc and .xserverrc
      # files, then system xinitrc and xserverrc files, else lets xinit choose
      # its default.
    The system xinitrc should probably do things like check
      # for .Xresources files and merge them in, startup up a window manager,
      # and pop a clock and serveral xterms.
    你看这个脚本的介绍部分不是说检测系统设置默认参数启动xinit嘛……

    总结:startx是为了方便用户自动执行已设置好合适主机参数的xinit二进制程序的shell 脚本。

  2. s_d_y 于 2009-11-01 19:53:55发表:

    不了解。

  3. 寻路行者 于 2009-10-18 15:11:46发表:

    初学者,不是很了解。

  4. wangdonghua 于 2009-10-18 08:57:40发表:

    运行的 结果是不一样 只是不明白 到底是怎样的过程

  5. angline 于 2009-10-18 00:03:01发表:

    不太懂,不敢多说

  6. yiyepianzhou 于 2009-10-17 21:48:28发表:

    你可以自己试一下
    我的系统是这样的:
    xinit只会运行x服务端
    startx还会运行gdm
    具体的不太了解