sudo 用户不能使用带GUI的程序,比如sudo gedit 直接报错:
Unable to init server: Could not connect: Connection refused
解决方法:
编辑~/.bashrc文件,最下面添加一行
xhost +
然后
source ~/.bashrc
会发现sudo gedit 可以使用了
sudo 用户不能使用带GUI的程序,比如sudo gedit 直接报错:
Unable to init server: Could not connect: Connection refused
解决方法:
编辑~/.bashrc文件,最下面添加一行
xhost +
然后
source ~/.bashrc
会发现sudo gedit 可以使用了