我在我的Ubuntu系统上有一张dvb卡,并写了一个bash文件,在gnome-terminal中显示dvb tuner,并在启动时将bash文件启动,以便在用户登录系统时运行该脚本,如下所示:
#!/bin/bash # Bash script to show list of bvb tuner gnome-terminal --title="list of bvb tuners" -x bash -c "lsdvb; read line" & gnome-terminal --title="Tuner 4:" -x bash -c "dvblast -a 4 -f 12596000 -s 27500000 -v 13 -c Tuner4.cfg -i 1 ; read line" &
lsdvb来自dvb-app存储库的命令显示了Linux和dvblast中的dvb调谐器列表,这是一个用于广播直播电视的节目.
当我在服务器上有1个dvb卡时,一切正常…当我向服务器添加第二个dvb卡并重启系统时,bash文件启动但是看到以下运行dvblast的错误:
这对于lsdvb:
如果使用sudo -s登录gnome-terminal并手动运行bash文件,则可以正常工作.
我把strace放在命令行中,看到lsdvb的这个日志:
open("/etc/ld.so.cache",O_RDONLY|O_CLOEXEC) = 3 open("/lib/x86_64-linux-gnu/libc.so.6",O_RDONLY|O_CLOEXEC) = 3 lsdvb: Simple utility to list PCI/PCIe DVB devices Version: 0.0.4 Copyright (C) Manu Abraham +++ exited with 0 +++
这个日志为dvblast:
open("/etc/ld.so.cache",O_RDONLY|O_CLOEXEC) = 3 open("/lib/x86_64-linux-gnu/libpthread.so.0",O_RDONLY|O_CLOEXEC) = 3 open("/lib/x86_64-linux-gnu/librt.so.1",O_RDONLY|O_CLOEXEC) = 3 DVBlast 2.2 (release) warning: restarting open("/usr/lib/x86_64-linux-gnu/gconv/gconv-modules.cache",O_RDONLY) = 3 open("/usr/lib/x86_64-linux-gnu/gconv/ISO8859-1.so",O_RDONLY|O_CLOEXEC) = 3 debug: using linux-dvb API version 5 open("/dev/dvb/adapter3/frontend0",O_RDWR|O_NONBLOCK) = -1 ENOENT (No such file or directory) error: opening device /dev/dvb/adapter3/frontend0 Failed (No such file or directory) +++ exited with 1 +++