Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/28.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Linux Gstreamer不能与mendel以外的其他用户一起使用_Linux_Bash_Gstreamer_Google Coral_Google Aiy - Fatal编程技术网

Linux Gstreamer不能与mendel以外的其他用户一起使用

Linux Gstreamer不能与mendel以外的其他用户一起使用,linux,bash,gstreamer,google-coral,google-aiy,Linux,Bash,Gstreamer,Google Coral,Google Aiy,我有一个谷歌珊瑚开发板。我希望gstreamer插件与默认用户以外的用户一起工作mendel 使用以下命令安装gstreamer。 sudo apt get install-y gstreamer1.0-plugins-bad gstreamer1.0-plugins-good python3-gst-1.0 python3 gi 然后在下面的脚本中克隆了孟德尔用户 3.如果我们以克隆用户.sh的名称保存上述文件。 然后使用以下命令 /clone-user.sh mendel user2 如果

我有一个谷歌珊瑚开发板。我希望gstreamer插件与默认用户以外的用户一起工作mendel

  • 使用以下命令安装gstreamer。
    sudo apt get install-y gstreamer1.0-plugins-bad gstreamer1.0-plugins-good python3-gst-1.0 python3 gi

  • 然后在下面的脚本中克隆了孟德尔用户


  • 3.如果我们以克隆用户.sh的名称保存上述文件。 然后使用以下命令
    /clone-user.sh mendel user2

  • 如果我们切换到上面使用
    sudo su-user2
    创建的用户,并运行命令
    gst-launch-1.0 videotestsrc!waylandsink
    。那么gstreamer就不行了

  • 其中作为命令
    gst-launch-1.0 videotestsrc!如果我们使用的是默认用户,waylandsink
    可以工作。就我而言,它是孟德尔


  • 我已经试过了。但是它也不起作用。

    您可以通过以下方式获得新用户的id:

    $ echo $UID
    
    将文件从/run/user/1000复制到新用户的id:

    $ cp -r /run/user/1000 /run/user/$UID
    
    拥有它:

    $ sudo chown username:username -R /run/user/$UID/*
    
    设置XDG\U运行时\U目录:

    $ export XDG_RUNTIME_DIR=/run/user/1000
    

    我可以使用孟德尔和root运行
    edgetpu\u classification
    gst-launch-1.0

    定义
    gst\u DEBUG=3
    环境变量,或将
    -v
    命令行选项添加到
    gst-launch-1.0
    查看调试消息。我在这篇文章中找到了解决方案。但是在中创建的套接字文件还应该为目录/run/user/中的新用户创建/run/user/1000。我同意您的解决方案,但仔细看,前三行实际上不是必需的。因为您正在将
    XDG\u RUNTIME\u DIR
    设置为
    /run/user/1000
    。上传的文件中列出了这种方法。当我们将
    XDG\u RUNTIME\u DIR
    设置为
    /run/user/$UID
    时,实际上会出现错误。我还使用
    ln-s/run/user/1000/wayland-0/run/user/1003/wayland-0
    使用到套接字文件的软链接。这种方法有效。直接从
    /run/user/1000/
    $ export XDG_RUNTIME_DIR=/run/user/1000