gnome-mplayer无法启动

Totem,mplayer,sopcast,realplayer,bmp
回复
kzer
帖子: 13
注册时间: 2017-08-05 16:20
系统: arch

gnome-mplayer无法启动

#1

帖子 kzer » 2017-08-05 16:34

使用的系统是Arch
驱动是安装 xf86-video-vesa
点图标无法正常运行,在shell下打开出现如下:
# gnome-mplayer
No protocol specified

** (gnome-mplayer:7122): WARNING **: Could not open X display
GMLIB-Message: after init: position=0.000 length=0.000 start_time=0.000 run_time=0.000 volume=0.00 player=dead media=unknown uri=
GMLIB-Message: Failed to open connection to session message bus: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
GMLIB-Message: Failed to open connection to session message bus: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.

(gnome-mplayer:7122): Gtk-WARNING **: GtkSocket: only works under X11

(gnome-mplayer:7122): Gdk-WARNING **: gdkwindow-x11.c:5573 drawable is not a native X11 window
Segmentation fault (core dumped)

在虚拟机中重新安装一次,相版本的ARCH 再安装gnome-mplayer却能正常启动。

在网络上找了很久有些方案是执行:xhost +
而我的执行结果却是这样:

# xhost +
No protocol specified
xhost: unable to open display ":0"



有没有什么解决方案呢,只有在物理主机中才出现 这样的错误,而在虚拟机中是正常的。
头像
vickycq
帖子: 4507
注册时间: 2011-03-20 13:12
系统: Debian
来自: 山东省寿光县
联系:

Re: gnome-mplayer无法启动

#2

帖子 vickycq » 2017-08-05 18:22

kzer 写了:点图标无法正常运行
是否使用了 root 账户
kzer 写了: # gnome-mplayer
No protocol specified
** (gnome-mplayer:7122): WARNING **: Could not open X display
如无特殊需求不要使用 root 账户
Debian 中文论坛 - forums.debiancn.org
欢迎所有 Debian GNU/Linux 用户
kzer
帖子: 13
注册时间: 2017-08-05 16:20
系统: arch

Re: gnome-mplayer无法启动

#3

帖子 kzer » 2017-08-05 19:21

vickycq 写了:
kzer 写了:点图标无法正常运行
是否使用了 root 账户
kzer 写了: # gnome-mplayer
No protocol specified
** (gnome-mplayer:7122): WARNING **: Could not open X display
如无特殊需求不要使用 root 账户


我是使用普通用户登录的,在bashshell下要使用root权限才能执行gnome-mplayer,所以才使用su,想同的操作,想同的系统,在虚拟机中却能正常启动,在物理机中却是这样,但是在使用mplayer能正常播放。前提是要使用bashshell执行一下mplayer再播放视频,
buntutu
帖子: 65
注册时间: 2009-11-25 1:38

Re: gnome-mplayer无法启动

#4

帖子 buntutu » 2017-08-06 14:11

在 root 下执行图形界面程序安全风险较大,多媒体程序安全风险更大,因为数据来源不可控。最好给普通用户运行 gnome-mplayer 的权限。

另外, xhost 是在X界面下的普通用户执行的,不是 root 执行的。它的意思是给其他终端授权,开放X界面。

`xhost +` 其实也挺危险的,会开放X Window给所有网上的人。最好是 `xhost +local` 之类的。
buntutu
帖子: 65
注册时间: 2009-11-25 1:38

Re: gnome-mplayer无法启动

#5

帖子 buntutu » 2017-08-06 14:13

而且 gnome-mplayer 必须 root 权限才能启动本身就有问题,卸载后重新安装试试。
回复