如何在Unity中更改光标?

Kae*_*aer 6 unity 11.04 cursor

由于我们必须使用 Unity 进行主动编译,因此我无法更改光标的颜色、大小等。

有什么办法可以做到吗?

Dan*_*son 8

这是 compiz 中的一个已知错误,请参阅https://bugs.launchpad.net/ubuntu/+source/compiz/+bug/141500

我在错误页面上找到了一个对我有用的解决方法。

  1. 创建文件
  2. 将其标记为可执行文件(右键单击 > 属性 > 权限 > 允许将文件作为程序执行)
  3. 在 gedit 中打开并粘贴以下内容

    #!/bin/bash
    
    mkdir -p $HOME/.icons/default
    CURSOR_THEME=$(gconftool -g /desktop/gnome/peripherals/mouse/cursor_theme)
    echo "[Icon Theme]
    Inherits = $CURSOR_THEME" > $HOME/.icons/default/index.theme
    echo "Compiz will be restarted to enable this. Please stand by."
    compiz --replace &
    
    Run Code Online (Sandbox Code Playgroud)

然后每次更改鼠标主题时都运行该文件。