1.系統環境
1.1 測試環境
centos6.4最小化安裝(centos6.x桌面版也適用)
使用yum源為163源加EPEL源
1.2 spice客戶端介紹
spice作為遠程連接工具,可以支持遠程桌面顯示,鼠標拖拽,自適應分辨率,spice應用在桌面雲中,主要是連接windows桌面,其支持的USB映射可以使在終端插入的U盤映射到雲端的windows系統中,其效果就相當於在遠端的windows系統上插入U盤
在windows平台下的spice客戶端為virt-viewer,其不支持usb映射,若需要添加usb映射功能,則需要重新編譯客戶端,加入usb映射功能,對於非開發人員來說,其編譯相當復雜
在centos6.x平台下可以使用yum安裝virt-viewer,其也不支持usb轉發,下面就是編譯centos6.x下的spice客戶端的具體過程
2 下載spice所需軟件
2.1 安裝編譯工具
yum groupinstall "Development tools"
2.2 下載軟件包
#usbredir支持usb映射
wget http://www.spice-space.org/download/usbredir/usbredir-0.7.tar.bz2 #spice-gtk
wget http://www.spice-space.org/download/gtk/spice-gtk-0.28.tar.bz2
#spice客戶端
wget http://virt-manager.org/download/sources/virt-viewer/virt-viewer-2.0.tar.gz
3 編譯安裝usbredir
3.1 依賴包
yum install libusb*
3.2 安裝
./configure --prefix=/usr/local/remote-viewer make make install
4 編譯安裝spice-gtk
4.1 依賴包
yum install pixman* yum install openssl* yum install gtk2-devel yum install pulseaudio yum install pulseaudio-devel yum install pulseaudio-libs-devel yum install libjpeg* yum install libusb* yum install usbredir* yum install *gudev*
4.2 安裝spice-gtk
./configure --prefix=/usr/local/remote-viewer --enable-usbredir=yes --enable-smartcard=no --with-gtk=2.0 make make install
5 安裝spice客戶端
5.1 依賴包
yum install libxml* yum install spice-gtk*
5.2 安裝spice客戶端
./configure --prefix=/usr/local/remote-viewer --with-gtk=2.0 --with-spice-gtk make make install
6 spice客戶端字體無法顯示解決
由於測試機使用的是最小化安裝,所以會造成spice客戶端圖形界面下字體無法顯示,如果你使用centos桌面版編譯安裝這個客戶端,就不會存在這個問題,解決辦法是安裝下面軟件包
yum install xorg-x11-fonts-Type1.noarch