使用gksu时的gtk警告


8

当我使用时gksu,会收到Gtk警告,例如:

$ gksu gedit /etc/fstab

(gksu:2792): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

(gksu:2792): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

(gksu:2792): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

(gksu:2792): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

当我关闭正在运行的应用程序实例(在本示例中为gedit)时,我得到:

(gedit:2796): Gtk-WARNING **: Attempting to set the permissions of `/root/.local/share/recently-used.xbel', but failed: No such file or directory

(gedit:2796): Gtk-WARNING **: Attempting to store changes into `/root/.local/share/recently-used.xbel', but failed: Failed to create file '/root/.local/share/recently-used.xbel.8R7MBW': No such file or directory

(gedit:2796): Gtk-WARNING **: Attempting to set the permissions of `/root/.local/share/recently-used.xbel', but failed: No such file or directory

我正在使用64位的Ubuntu 11.10。我该如何解决这个问题?

Answers:


8

这些或多或少是无害的。

  • 第一个是关于缺少的GTK引擎。

    对于您的特定错误:

    sudo apt-get install gtk2-engines-pixbuf
    

    要查找错误的软件包:

    sudo apt-get install apt-file
    

    搜索错误中给定的模块名称,即前缀- lib和后缀.so--因此,在您的示例中pixmap,您需要搜索libpixmap.so

    apt-file find libpixmap.so
    

    这将给软件包安装例如

    gtk2-engines-pixbuf: /usr/lib/i386-linux-gnu/gtk-2.0/2.10.0/engines/libpixmap.so
    libgtk2.0-0-dbg: /usr/lib/debug/usr/lib/i386-linux-gnu/gtk-2.0/2.10.0/engines/libpixmap.so
    
  • 第二个发生是因为root用户(/root目录)没有.local目录。您可以通过运行以下命令来创建它:

    sudo mkdir -p /root/.local/share
    
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.