您尚未登录。

#1 2018-10-22 15:58:53

linux40
会员
注册时间: 2015-11-30
帖子: 46

Weston always starts with on config file.

由 man 5 weston.ini:

       Weston uses a configuration file called weston.ini for its setup.  The weston.ini configu‐
       ration file is searched for in one of the following places when the server is started:

           $XDG_CONFIG_HOME/weston.ini   (if $XDG_CONFIG_HOME is set)
           $HOME/.config/weston.ini      (if $HOME is set)
           weston/weston.ini in each
               $XDG_CONFIG_DIR           (if $XDG_CONFIG_DIRS is set)
           /etc/xdg/weston/weston.ini    (if $XDG_CONFIG_DIRS is not set)
           <current dir>/weston.ini      (if no variables were set)

       where environment variable $HOME is the user's home directory, and $XDG_CONFIG_HOME is the
       user specific configuration directory, and  $XDG_CONFIG_DIRS  is  a  colon  ':'  delimited
       listed of configuration base directories, such as /etc/xdg-foo:/etc/xdg.

当然我是在tty2登录进去后直接启动的weston。
第一个环境变量没设,第二个肯定有。
然而无论我在~还是cd到~/.config,weston始终有

Starting with no config file.

离线

#2 2018-10-22 16:22:55

依云
会员
所在地: a.k.a. 百合仙子
注册时间: 2011-08-21
帖子: 8,384
个人网站

Re: Weston always starts with on config file.

可以考虑使用 strace。

离线

#3 2018-10-23 00:20:02

linux40
会员
注册时间: 2015-11-30
帖子: 46

Re: Weston always starts with on config file.

所以说我是天选之子?我月初也试过一回,当时没问题的。。。

最近编辑记录 linux40 (2018-10-23 00:20:16)

离线

#4 2018-10-23 16:56:32

linux40
会员
注册时间: 2015-11-30
帖子: 46

Re: Weston always starts with on config file.

我尝试指定配置文件(man weston),结果程序报了。。。

我看了一下代码,逻辑好像有点感人。。。

这个函数加载配置文件,其中的一个逻辑是config_file && noconfig == 0

这两个是函数参数,直接从命令行读到调用处

怎么想那个逻辑也不应该是那样的吧,你指定了文件,config_file 肯定不为空,没指定 noconfig,这个变量就是零。。。

喔喔,程序执行到那里是 weston_config_parse 错了,好烦那,也不打印一下errno。。。

最近编辑记录 linux40 (2018-10-23 17:03:51)

离线

#5 2018-10-23 17:11:32

依云
会员
所在地: a.k.a. 百合仙子
注册时间: 2011-08-21
帖子: 8,384
个人网站

Re: Weston always starts with on config file.

去报告 bug 呀~

离线

页脚