本帖最后由 没底的瓶子 于 2013-3-11 09:44 编辑
Ubuntu主题制作和设置教程 v0.3
依赖: 13.04:gsettings-desktop-schemas
壁纸 usr/share/backgrounds下放入壁纸文件 12.04 usr/share/gnome-background-properties/ubuntu-wallpapers.xml更改系统默认壁纸 /usr/share/gnome-background-properties/precise-wallpapers.xml加入新壁纸信息 gsettingsset org.gnome.desktop.background picture-uri 'file:///usr/share/backgrounds/x.jpg'设定桌面背景
默认登陆界面背景 [com.canonical.unity-greeter] background="/usr/share/backgrounds/ubuntukylin.png"
GTK和窗口主题 usr/share/themes或~/.themes下放入主题文件夹(包括GTK和窗口主题相关文件) 12.04: gsettingsset org.gnome.desktop.interface gtk-theme themename 设定GTK主题 gconftool-2--set --type string /apps/metacity/general/theme themename 设定窗口主题 13.04: gsettingsset org.gnome.desktop.interface gtk-theme themename 设定GTK主题 gsettingsset org.gnome.desktop.wm.preferences theme themename 设定窗口主题
gsettingsget org.gnome.desktop.interface gtk-theme" 得到当前GTK主题名
图标和光标主题 usr/share/icon或~/.icon下放入主题文件夹(包括图标和光标相关文件) 在theme中的主题信息文件中指定 12.04 gsettingsset org.gnome.desktop.interface icon-theme iconname 设定图标主题 gconftool-2--set --type string /desktop/gnome/peripherals/mouse/cursor_theme kylin-icon-theme设定光标主题 ln-sf /usr/share/icons/kylin-icon-theme/cursor.theme/etc/alternatives/x-cursor-theme
13.04 gsettingsset org.gnome.desktop.interface icon-theme iconname 设定图标主题 gsettingsset org.gnome.desktop.interface cursor-theme cursorname 设定光标主题 ln-sf /usr/share/icons/kylin-icon-theme/cursor.theme/etc/alternatives/x-cursor-theme
update-alternatives--config x-cursor-theme 设定图标主题 gsettingsget org.gnome.desktop.interface icon-theme" 得到当前图表主题名 在theme中的主题信息文件中指定各类主题的名称。
自动配置光标主题: 使用alternatives机制 root@debian:~# cd /etc/alternativesroot@debian:/etc/alternatives# update-alternatives --install x-cursor-theme x-cursor-theme /etc/X11/cursors/Gold.theme 70xin@xin-Inspiron-620s:~$ update-alternatives --display x-cursor-theme
x-cursor-theme - 自动模式
链接目前指向 /usr/share/icons/DMZ-White/cursor.theme
/etc/X11/cursors/core.theme - 优先级 30
/etc/X11/cursors/handhelds.theme - 优先级 20
/etc/X11/cursors/redglass.theme - 优先级 20
/etc/X11/cursors/whiteglass.theme - 优先级 20
/usr/share/icons/DMZ-Black/cursor.theme - 优先级 30
/usr/share/icons/DMZ-White/cursor.theme - 优先级 90
目前“最佳”的版本为 /usr/share/icons/DMZ-White/cursor.theme。
摘自系统默认光标主题包:dmz-cursor-theme中psotinst脚本 系统默认主题的设置 更改/usr/share/glib-2.0/schemas目录下xml文件中相应项目的键值来达到更改系统默认设置的目的。也可用10_xxx.xxxx.override文本文件来覆写相应键值(前面数字为优先级) override文本文件的内容可如下写: [org.gnome.desktop.interface] gtk-theme="kylin-theme" icon-theme="kylin-icon-theme"
[org.gnome.desktop.wm.preferences] theme="kylin-theme"
[com.canonical.unity-greeter] background="/usr/share/backgrounds/ubuntukylin-default-settings.jpg"
可用glib-compile-schemas命令,然后注销查看更改效果。 glib-compile-schemas编译所有的GSettings方案文件为方案缓存。
gsettings全局设置所在位置: /usr/share/glib-2.0/schemas/ cache位置: /home/socol/.config/dconf/user
|