pulseaudio的运行

在sbox X86下面编译通过了PA的编译。但是PA比较古怪,不让在root下运行。

 

虽说 ~ # su -p - mobile -c pulseaudio& 可以跑 

但是内部的检查机制,还是让PA当在了半道上
warning: cannot change to home directory
~ # Customer env set up.
E: core-util.c: Failed to stat home directory : No such file or directory
process 1635: dbus_shutdown() called but connections were still live. This probably means the application did not drop all its references to bus connections.
  D-Bus not built with -rdynamic so unable to print a backtrace
Aborted

 

core-util.c中的代码,作祟。试图手动修改这些代码来绕过检查机制是行不通的,这样的检查函数有很多处。

看来得建立用户,在模拟器环境中,有些麻烦

static char *get_pulse_home(void) {
    char *h;
    struct stat st;
    char *ret = NULL;

    if (!(h = pa_get_home_dir_malloc())) {
        pa_log_error("Failed to get home directory.");
        return NULL;
    }

    if (stat(h, &st) < 0) {
        pa_log_error("Failed to stat home directory %s: %s", h, pa_cstrerror(errno));
        goto finish;
    }

    if (st.st_uid != getuid()) {
        pa_log_error("Home directory %s not ours.", h);
        errno = EACCES;
        goto finish;
    }

    ret = pa_sprintf_malloc("%s" PA_PATH_SEP ".pulse", h);

finish:
    pa_xfree(h);

    return ret;
}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值