openKylin论坛

标题: Ubuntu 主题制作和设置教程 [打印本页]

作者: 没底的瓶子    时间: 2013-3-11 09:39
标题: Ubuntu 主题制作和设置教程
本帖最后由 没底的瓶子 于 2013-3-11 09:44 编辑

                        
Ubuntu主题制作和设置教程
v0.3
瓶子


依赖:
13.04gsettings-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-themepsotinst脚本
系统默认主题的设置
更改/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


作者: 没底的瓶子    时间: 2013-3-11 09:45
占位,预留
作者: jonaszhang    时间: 2013-3-25 11:17
楼主:

默认登陆界面背景
[com.canonical.unity-greeter]
background="/usr/share/backgrounds/ubuntukylin.png"

这是哪个文件呀?
问题2:主题该如何制作呀?

作者: 没底的瓶子    时间: 2013-3-25 12:37
jonaszhang 发表于 2013-3-25 11:17
楼主:

默认登陆界面背景

系统挂了 还没完全修复 之前写的文档很有帮助 修复有望了{:3_41:}
最下面有写:
系统默认主题的设置
更改/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"
作者: UbuntuKylin    时间: 2013-3-25 21:37
学习了 试试看
作者: colben    时间: 2013-4-3 18:22
这个必须支持,感谢楼主分享
作者: Undine    时间: 2014-3-5 15:30
研究主题制作中,学习学习~~。《
作者: yao_1110    时间: 2014-3-22 15:40

学习了!




欢迎光临 openKylin论坛 (https://forum.openkylin.top/) Powered by Discuz! X3.3