错误:不能在没有 X11 $DISPLAY 的情况下自动启动 D-Bus

bru*_*uno 8 xorg compiz reset dconf

我迫切需要将 Compiz 重置为其默认设置,因为我的桌面不显示 Dash 或菜单栏。

当我输入:

dconf reset -f /org/compiz/
Run Code Online (Sandbox Code Playgroud)

它说:

error: Cannot autolaunch D-Bus without X11 $DISPLAY

Usage:
  dconf reset [-f] PATH

Reset a key or a dir. -f is required for dirs.

Arguments:
   PATH          Either a KEY or DIR
   KEY           A key path (starting, but not ending with '/')
   DIR           A directory path (starting and ending with '/')
Run Code Online (Sandbox Code Playgroud)

接下来做什么?

此致

小智 5

export DISPLAY=:0.0
Run Code Online (Sandbox Code Playgroud)

如果你看到

Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

Error: Can't open display: :0.0
Run Code Online (Sandbox Code Playgroud)

然后

xhost +
Run Code Online (Sandbox Code Playgroud)


jhi*_*mer -1

您可以使用 tty 中的以下命令替换当前的 compiz 实例。

DISPLAY=:0 compiz --replace
Run Code Online (Sandbox Code Playgroud)

你或许还可以这样做:

DISPLAY=:0 dconf reset -f /org/compiz/
Run Code Online (Sandbox Code Playgroud)