报错
No protocol specified
Unable to init server: 无法连接: 拒绝连接
(gedit:6013): Gtk-WARNING **: 13:46:39.445: cannot open display: :0
~$ sudo gedit
No protocol specified
Unable to init server: 无法连接: 拒绝连接
(gedit:6013): Gtk-WARNING **: 13:46:39.445: cannot open display: :0
解决办法
将 gedit 添加到访问控制列表中 access control list
~$ xhost local:gedit
//添加成功,输出结果如下
non-network local connections being added to access control list