Kubuntu – 升级到11.10后无法在sudo下更改字体和小部件样式

从11.04升级后,我在Kubuntu 11.10中遇到了字体,GTK和基于KDE的应用程序和游标的外观问题。

我希望我的所有应用程序,包括GTK和KDE,在sudo下,在我的普通用户下,看起来都一样(使用标准的Oxygen主题和Arial字体)。

我通常的方式只是部分工作,这是我通常做的步骤:

  1. 在我的普通用户(已经由Kubuntu安装设置)下将KDE小部件样式设置为Oxygen,将KDE UI字体设置为Arial。
  2. 在我的普通用户(已经由Kubuntu安装设置)下将GTK小部件样式设置为oxygen-gtk,将GTK字体设置为与KDE字体相同。
  3. 使用gtk-theme-switch2和gtk-chtheme为一些非KDE感知的GTK应用程序设置GTK样式到oxygen-gtk,将UI字体设置为Arial。

  4. 对kdesudo下的小部件样式和字体重复步骤1-3。

但是,从11.04升级到Kubuntu 11.10之后,并非所有应用程序都在Oxygen中查看并使用Arial字体。

下面是我想要说明这个问题的所有截图,合并为单个图像,由于askubuntu.com不允许我发布多个链接或图像:

http://simplest-image-hosting.net/png-0-screenshots-merged

sudo下的software-properties-gtk看起来像是上面链接中的第一张图片(标记为software-properties-gtk )。

奇怪的是,使用gnome-control-center设置GTK wigdet风格看起来像上面链接中的第二张图片(标记为gnome-control-center ),没有氧-gtk主题(这可能与问题有关吗?)

在KDM中,光标是Ubuntu默认光标(DMZ White),而不是Oxygen(安装Gnome后发生这种情况) – 我该如何更改?

在kdesudo下的KDE应用程序中,字体仍然是Ubuntu并且在我将它们设置为我用于UI的典型Arial字体后不会更改,截图是上面链接中的最后一张图片(标记为kcmshell4字体 )。

有时,在普通用户下的KDE应用程序中,字体会自动更改为Ubuntu字体 – 为什么会发生这种情况,我该如何避免呢?

谢谢。

不同的用户可以有不同的设置

root / 1 /有自己的设置。 您可以使用以下命令启动系统设置来更改根目录的设置:

kdesudo systemsettings 

Root的gtk应用程序

默认情况下,root的文件夹没有指向oxygen-gtk的链接。

要解决此问题,您需要将隐藏文件.gtkrc-2.0-kde4(注意点!)从您的主目录复制到/ root /,名称为.gtkrc-2.0(注意点!)/ 2 /,/ 3 / 。

命令行:

 sudo cp .gtkrc-2.0-kde4 /root/.gtkrc-2.0 

如果您安装了Root Actions Servicemenu / 4 /,则可以使用它来复制和重命名。

系统的默认鼠标主题(KDM光标)

Debian和Debian基于使用alternative / 5 /来设置环境变量。

 :~$ man update-alternatives /6/ NAME update-alternatives - maintain symbolic links determining default commands SYNOPSIS update-alternatives [options] command DESCRIPTION update-alternatives creates, removes, maintains and displays information about the symbolic links comprising the Debian alternatives system. It is possible for several programs fulfilling the same or similar functions to be installed on a single system at the same time. 

要使用alternatives命令行设置游标主题:

 sudo update-alternatives --config x-cursor-theme 

使用KDE gui:

包:kalternatives / 7 / – 图形替代系统配置工具

更多:更改系统默认X11光标主题/ 8 /。

有时

引用:“有时,在普通用户的KDE应用程序中,字体会自动变为Ubuntu字体 – 为什么会发生这种情况,我该如何避免呢?”

是的,我注意到了这一点。 为什么 – 打败我 Kubuntu正在重置为默认的Kubuntu设置(/ usr / share / kubuntu-default-settings / kde4-profile / default / share / config /)

为了解决这个问题,我编辑了Kubuntu默认值:/ usr / share / kubuntu-default-settings / kde4-profile / default / share / config / kdeglobals。

默认Kubuntu kdeglobals有:

 [General] BrowserApplication[$e]=!rekonq XftHintStyle=hintmedium font=Ubuntu,9,-1,5,50,0,0,0,0,0 menuFont=Ubuntu,9,-1,5,50,0,0,0,0,0 desktopFont=Ubuntu,9,-1,5,50,0,0,0,0,0 toolBarFont=Ubuntu,8,-1,5,50,0,0,0,0,0 smallestReadableFont=Ubuntu,8,-1,5,50,0,0,0,0,0 taskbarFont=Ubuntu,9,-1,5,50,0,0,0,0,0 

看我自己的kdeglobals:〜/ .kde / share / config / kdeglobals并将它们复制到默认值。 这里:

 [General] BrowserApplication[$e]=!rekonq XftHintStyle=hintmedium font=Sans Serif,9,-1,5,50,0,0,0,0,0 menuFont=Sans Serif,9,-1,5,50,0,0,0,0,0 desktopFont=Sans Serif,9,-1,5,50,0,0,0,0,0 toolBarFont=Sans Serif,8,-1,5,50,0,0,0,0,0 smallestReadableFont=Sans Serif,8,-1,5,50,0,0,0,0,0 taskbarFont=Sans Serif,9,-1,5,50,0,0,0,0,0 

链接:

  1. https://help.ubuntu.com/community/RootSudo
  2. http://forum.kde.org/viewtopic.php?f=63&t=62352
  3. http://kubuntuforums.net/forums/index.php?topic=3092288.msg201654#msg201654
  4. http://kde-apps.org/content/show.php/Root+Actions+Servicemenu?content=48411
  5. http://www.debian-administration.org/articles/91
  6. http://en.wikipedia.org/wiki/Man_page
  7. http://packages.ubuntu.com/oneiric/kalternatives
  8. http://kubuntuforums.net/forums/index.php?topic=3112235.0