Linux中gedit遇到如下问题时解决方法No protocol specified (gedit:9143): Gtk-WARNING **: cannot open display: :0.
来源:互联网 发布:网络文学评论 罗先海 编辑:程序博客网 时间:2024/04/29 17:16
切换到root权限,在终端下使用gedit时出现下面的错误:
No protocol specified(gedit:14333): Gtk-WARNING **: cannot open display: :0.0
下面是从网上找到的正解,贴——分析——总结之:
原因:
当使用su 到另外一个用户运行某个程序,而这个程序又要有图形显示的时候,就有可能有下面提示:
No protocol specified
(gedit:14333): Gtk-WARNING **: cannot open display: :0.0
这是因为Xserver默认情况下不允许别的用户的图形程序的图形显示在当前屏幕上. 如果需要别的用户的图形显示在当前屏幕上, 则应以当前登陆的用户, 也就是切换身份前的用户执行如下命令。
xhost +
通过执行这条命令,就授予了其它用户访问当前屏幕的权限,于是就可以以另外的用户运行需要运行的程序了。
- Linux中gedit遇到如下问题时解决方法No protocol specified (gedit:9143): Gtk-WARNING **: cannot open display: :0.
- 使用gedit出现No protocol specified (gedit:14333): Gtk-WARNING **: cannot open display: :0.0
- sudo gedit 错误:Gtk-WARNING **: cannot open display: :0.0
- (gedit:14333): Gtk-WARNING **: cannot open display: :0.0
- gedit Gtk-WARNING
- 解决(gedit:4701): Gtk-WARNING **问题
- wireshark:7116): Gtk-WARNING **: cannot open display: :0.0解决方法
- Gtk-WARNING **: cannot open display: :0.0的问题
- Gtk-WARNING **: cannot open display问题的解决
- Gtk-WARNING **: cannot open display问题的解决
- sudo gedit修改环境变量出错No protocol specified
- Gtk-WARNING **: cannot open display: :0.0
- 解决gedit warning问题
- 解决gedit warning问题
- linux git 错误403 Forbidden while accessing和Gtk-WARNING **: cannot open display:
- Gtk-WARNING **: cannot open display: :0.0之解决
- git push 提示Gtk-WARNING **: cannot open display:
- (gnome-ssh-askpass:24029): Gtk-WARNING **: cannot open display:
- 运价:让我欢喜让我忧
- 连接池已满,超过最大连接数 解决方案
- 收藏的网页-Ogre
- IPC通信:Posix共享内存2
- 真机调试
- Linux中gedit遇到如下问题时解决方法No protocol specified (gedit:9143): Gtk-WARNING **: cannot open display: :0.
- Android与Javascript交互之入门
- javascript 事件 Notes
- [android]在程序代码中获取strings.xml中的字符串值
- NAT定义、分类及检测
- VC与Matlab混合编程实例(Matlab7.0函数转换成VC的.dll)
- 基于OMP的L1跟踪算法
- Android的SDK与ADT不匹配问题 .
- Java通过JNI调用Tuxedo方法