简单的“信息亭”-带有一个应用程序的 StartX 表示未指定协议

简单的“信息亭”-带有一个应用程序的 StartX 表示未指定协议

我的目标是拥有一台启动一个应用程序并且用户无法使用鼠标或键盘的 Ubuntu 笔记本电脑。

首先要做的就是找到启动程序的命令。这是这个命令。

export DISPLAY=:0 && pidof cvlc 2>/dev/null >/dev/null || cvlc --fullscreen --no-video-title-show rtsp://192.168.1.2:554/onvif

然后我尝试停止自动登录并加载图形用户界面。

# /etc/init/lightdm.override
manual

所以,如果我愿意的话startx -- :0,它会向我显示简单的背景。那太棒了。但是,如果我执行本主题的第一个命令,我会得到

VLC media player 2.0.8 Twoflower (revision 2.0.8a-0-g68cf50b)
[0x1a26bf8] inhibit interface error: Failed to connect to the D-Bus session daemon: //bin/dbus-launch terminated abnormally with the following error: No protocol specified
No protocol specified
Autolaunch error: X11 initialization failed.

[0x1a26bf8] main interface error: no suitable interface module
No protocol specified
[0x1a26a38] main interface error: no suitable interface module
[0x17f7108] main libvlc error: interface "globalhotkeys,none" initialization failed
[0x1a26bf8] dummy interface: using the dummy interface module...
[0x7ff654002a58] live555 demux error: SETUP of'video/H264' failed 500 Internal Server Error
[0x7ff654002a58] live555 demux error: SETUP of'audio/PCMA' failed 500 Internal Server Error

如果 startx 没有启动,那么我会得到这个。

VLC media player 2.0.8 Twoflower (revision 2.0.8a-0-g68cf50b)
[0x1037bf8] inhibit interface error: Failed to connect to the D-Bus session daemon: //bin/dbus-launch terminated abnormally with the following error: Autolaunch error: X11 initialization failed.

[0x1037bf8] main interface error: no suitable interface module
[0x1037a38] main interface error: no suitable interface module
[0xe08108] main libvlc error: interface "globalhotkeys,none" initialization failed
[0x1037a38] dummy interface: using the dummy interface module...
[0x7f05ec0010d8] live555 demux error: SETUP of'video/H264' failed 500 Internal Server Error
[0x7f05ec0010d8] live555 demux error: SETUP of'audio/PCMA' failed 500 Internal Server Error

如果我启用自动登录并通过 crontab 启动 vlc 播放器,这就是一个成功的启动。

* * * * * export DISPLAY=:0 && pidof cvlc 2>/dev/null >/dev/null || cvlc --fullscreen --no-video-title-show rtsp://192.168.1.2:554/onvif

输出虽小,但一切正常。

VLC media player 2.0.8 Twoflower (revision 2.0.8a-0-g68cf50b)
[0x24df238] dummy interface: using the dummy interface module...

有人知道如何解决这个问题吗?

这是一台 Ubuntu 12.04.5 LTS(Precise Pangolin)笔记本电脑。

相关内容