LinuxDeepin下一个版本的桌面环境会选择 Gnome3,大家可以用下面的办法提前在 LD 11.06 中体验 Gnome-Shell.
因为现有 PPA 的方法会导致用户进不了桌面, 所以我们用编译的开发版本的方法, 编译的方法的好处就是即使编译失败, 也不会破坏现有的桌面环境。
1. 安装编译依赖:
sudo apt-get install curl libtiff4-dev libgstreamer0.10-dev libcroco3-dev xulrunner-dev mesa-utils
mesa-common-dev libreadline5-dev libgl1-mesa-dev libwnck-dev librsvg2-dev libgnome-desktop-dev
libgnome-menu-dev libffi-dev libgtk2.0-dev libgconf2-dev libdbus-glib-1-dev gtk-doc-tools
gnome-common git-core flex bison automake build-essential icon-naming-utils autopoint libvorbis-dev
libpam-dev libgcrypt-dev libtasn1-dev libtasn1-3-bin libgnome-keyring-dev libupower-glib-dev
libxklavier16 libxklavier-dev xserver-xephyr python-dev libpulse-dev libjasper-dev jhbuild
libgtop2-dev libsqlite3-dev libproxy-dev libdb-dev libproxy-dev libcups2-dev libusb-1.0-0-dev
libxcb-aux0-dev libxcb-event1-dev libx11-xcb-dev liboauth-dev libwebkitgtk-3.0-dev libical-dev gperf
libgudev-1.0-dev hwdata liborbit2-dev libgtk-3-dev libidn11-dev libsane-dev liblircclient-dev
libltdl-dev libvorbisfile3 libgail-3-dev libnotify4-dev libgnome-desktop-3-dev -y
2. 添加路径到 ~/.bashrc
把下面的行加入到 ~/.bashrc 最后面:
PATH=$PATH:~/bin
PATH=$PATH:~/gnome-shell/install/bin
3.下载/执行 Gnome-Shell 构建脚本:
wget http://git.gnome.org/browse/gnome-shell/plain/tools/build/gnome-shell-build-setup.sh
chmod +x gnome-shell-build-setup.sh
./gnome-shell-build-setup.sh
4. 构建 Gnome-Shell (更新代码也是同样的命令):
sudo find /usr/lib{,32,64} -name “*.la” -delete (这一步非常重要, 否则 libgtk3 会报错)
sudo jhbuild build
5. 安装 Nautilus 3:
先下载三个包:
wget https://launchpad.net/Ubuntu/oneiric/+source/gsettings-desktop-schemas/3.1.3-0ubuntu1/+files/gsettings-desktop-schemas_3.1.3.orig.tar.bz2
wget http://launchpad.net/gnome-desktop/main/3.1.3/+download/gnome-desktop-3.1.3.tar.bz2
wget http://launchpad.net/nautilus/main/3.0.2/+download/nautilus_3.0.2.orig.tar.gz
用下面的命令依次对这三个包进行编译:
./configure && make && sudo make install
6. 开机自动启动 Gnome-Shell
touch ~/.xinitrc
chmod +x ~/.xinitrc
ln -s ~/.xinitrc ~/.xsession
gedit ~/.xinitrc
在 ~/.xinitrc 中加入下面的命令:
gnome-session &
ibus-daemon -x -r -d &
gnome-shell –replace
注销, 在登录画面下面第三个选项框选择 “User Defined Session” 进行登录即可
7. 编译出错解决方案:
编译的时候有可能出错, 下面对常见的出错提供解决方案:
1) 一般网络错误, 导致 git 操作失败, 可以选择 6 (出错会有一个选择操作)进行重新下载编译
2) 缺少某个包, 一般在错误的最后几行, 你会看到提示找不到某个包 foo, 可以搜索一下, 一般都是 libfoo-dev 包, 然后用 sudo apt-get install libfoo-dev 安装包后再选择 6 重新编译即可
3) 第36个模块 colord 编译错误(因为上游开发人员的失误):
如果你在编译 colord 的时候遇到下面的错误:
checking whether to build shared libraries… yes
checking whether to build static libraries… no
./configure: line 10692: syntax error near unexpected token `0.9.8′
./configure: line 10692: `GOBJECT_INTROSPECTION_CHECK(0.9.8)’
Error during phase configure of colord: ########## Error running ./autogen.sh –prefix /home/andy/gnome-shell/install –libdir ‘/home/andy/gnome-shell/install/lib64’ –disable-examples –disable-static –disable-gtk-doc *** [36/46]
可以用这个解决方案解决:
wget http://launchpadlibrarian.net/74359148/liblcms2-2_2.2%2Bgit20110628-1_amd64.deb
wget http://launchpadlibrarian.net/74359147/liblcms2-dev_2.2%2Bgit20110628-1_amd64.deb
wget http://launchpadlibrarian.net/74359150/liblcms2-utils_2.2%2Bgit20110628-1_amd64.deb
sudo dpkg -i liblcms2-2_2.2+git20110628-1_amd64.deb
sudo dpkg -i liblcms2-dev_2.2+git20110628-1_amd64.deb
sudo dpkg -i liblcms2-utils_2.2+git20110628-1_amd64.deb
cd ~/gnome-shell/source/colord
git clean -fdx
cp ~/gnome-shell/source/clutter/build/autotools/introspection.m4 ~/gnome-shell/source/colord/m4/
jhbuild run ./autogen.sh
jhbuild run ./configure –disable-introspection
jhbuild run make
4) 错误 “/home/andy/gnome-shell/install/lib64/libgtk-3.so: undefined reference to `pango_layout_get_log_attrs_readonly’ “
如果遇到这个错误的同学一般都没有听我的话执行命令: “sudo find /usr/lib{,32,64} -name “*.la” -delete”
如果遇到这个错误可以用下面的方案解决:
sudo find /usr/lib{,32,64} -name “*.la” -delete
rm -rf ~/gnome-shell/install/
sudo jhbuild build
好了, 这就是所有关于 Gnome-Shell 编译的方案, 当然所有基于 Debian 的发行版本都可以用这个方案, 非 Debian 的发行版本可以用相应的命令替换 apt 应该也可以编译成功。
最后上张截图吧: