安装 wine
安装 wine
Ubuntu 官方自带了 wine , 但是推荐用 winehq 官方提供的最新版本 wine , 新版本解决了很多以前显得麻烦的问题, 请照下边说的来安装
先增加签名::
wget -q http://wine.budgetdedicated.com/apt/387EE263.gpg? -O- | sudo apt-key add -
增加 wine 源,按你的 Ubuntu 版本执行下边相应的程序
Ubuntu Jaunty (9.04) 请执行这个::
sudo wget http://wine.budgetdedicated.com/apt/sources.list.d/jaunty.list? -O /etc/apt/sources.list.d/winehq.list
Ubuntu Intrepid (8.10) 请执行这个::
sudo wget http://wine.budgetdedicated.com/apt/sources.list.d/intrepid.list? -O /etc/apt/sources.list.d/winehq.list
Ubuntu Hardy (8.04) 请执行这个::
sudo wget http://wine.budgetdedicated.com/apt/sources.list.d/hardy.list? -O /etc/apt/sources.list.d/winehq.list
Ubuntu Gutsy (7.10) 请执行这个::
sudo wget http://wine.budgetdedicated.com/apt/sources.list.d/gutsy.list? -O /etc/apt/sources.list.d/winehq.list
Ubuntu Feisty (7.04) 请执行这个::
sudo wget http://wine.budgetdedicated.com/apt/sources.list.d/feisty.list -O /etc/apt/sources.list.d/winehq.list
Ubuntu Edgy (6.10) 请执行这个::
sudo wget http://wine.budgetdedicated.com/apt/sources.list.d/edgy.list? -O /etc/apt/sources.list.d/winehq.list
Ubuntu Dapper (6.06) 请执行这个::
sudo wget http://wine.budgetdedicated.com/apt/sources.list.d/dapper.list? -O /etc/apt/sources.list.d/winehq.list
接下来,可以打开一个终端,执行
sudo apt-get update
sudo apt-get install wine
来安装,或者点击
开始菜单->; 系统->; 系统管理->; 新立得软件包管理器,在里边选中 wine , 点安装
初始设置,加快 wine 速度
由于 X locale 的问题, 默认 wine 会轮询 x core fonts ,使得 wine 很慢,请先执行sudo sed -i -e '/GBK/,/^}/d' /usr/share/X11/locale/zh_CN.UTF-8/XLC_LOCALE
修改 wine 外观
默 认的 wine 字体、主题、颜色等不太合适,可以用这 [Hiweed] 的 wine 配置 新建一个文本文件 hiweed_green_color.reg 写入(在9.04的源中安装的wine无法导入以下reg文件,可能是由于regedit不兼容空格造成的,将下面这段中每行前的第一个空格删除可能会解 决问题)::
代码如下
REGEDIT4
[HKEY_LOCAL_MACHINESystemCurrentControlSetHardware ProfilesCurrentSoftwareFonts]
"FIXEDFON.FON"=""
"FONTS.FON"=""
"LogPixels"=dword:00000060
"OEMFONT.FON"=""
[HKEY_CURRENT_USERSoftware\Wine\Fonts\Replacements]
@="AR PL ShanHeiSun Uni"
"Arial"="AR PL ShanHeiSun Uni"
"Fixedsys"="AR PL ShanHeiSun Uni"
"Microsoft Sans Serif"="AR PL ShanHeiSun Uni"
"MingLiU"="AR PL ShanHeiSun Uni"
"MS UI Gothic"="AR PL ShanHeiSun Uni"
"PMingLiU"="AR PL ShanHeiSun Uni"
"Simsun"="AR PL ShanHeiSun Uni"
"Songti"="AR PL ShanHeiSun Uni"
"System"="AR PL ShanHeiSun Uni"
"Tahoma"="AR PL ShanHeiSun Uni"
"Terminal"="AR PL ShanHeiSun Uni"
"宋体"="文鼎PL细上海宋Uni"
[HKEY_CURRENT_USERSoftware\Wine\X11 Driver]
"ClientSideAntiAliasWithRender"="N"
[HKEY_LOCAL_MACHINESoftwareMicrosoftWindows NTCurrentVersionFontSubstitutes]
"MS Shell Dlg"="文鼎PL细上海宋Uni"
"MS Shell Dlg 2"="文鼎PL细上海宋Uni"
"System"="AR PL ShanHeiSun Uni"
[HKEY_CURRENT_USERControl Panel\Colors]
"ActiveBorder"="239 235 230"
"ActiveTitle"="0 153 11"
"AppWorkspace"="128 128 128"
"Background"="58 110 165"
"ButtonAlternateFace"="180 180 180"
"ButtonDkShadow"="64 64 64"
"ButtonFace"="232 227 221"
"ButtonHilight"="255 255 255"
"ButtonLight"="239 235 230"
"ButtonShadow"="128 128 128"
"ButtonText"="0 0 0"
"GradientActiveTitle"="166 202 240"
"GradientInactiveTitle"="192 192 192"
"GrayText"="128 128 128"
"Hilight"="0 153 11"
"HilightText"="255 255 255"
"HotTrackingColor"="0 0 255"
"InactiveBorder"="192 192 192"
"InactiveTitle"="232 227 221"
"InactiveTitleText"="0 0 0"
"InfoText"="0 0 0"
"InfoWindow"="255 255 225"
"Menu"="232 227 221"
"MenuBar"="232 227 221"
"MenuHilight"="0 0 0"
"MenuText"="0 0 0"
"Scrollbar"="239 235 230"
"TitleText"="255 255 255"
"Window"="255 255 255"
"WindowFrame"="0 0 0"
"WindowText"="0 0 0"
再用 regedit 导入这个reg,执行 regedit hiweed_green_color.reg
如果 .wine/drive_c/windows/fonts/
下没有文鼎的字体文件,应该用以下命令连接
ln -s /usr/share/fonts/TTF/odosung.ttc ~/.wine/drive_c/windows/Fonts/
乱码解决方法
- 首先拷贝simsun.ttc字体进入~/.wine/drive_c/windows/Fonts/
- 修改注册表文件~/.wine/system.reg:
将[Software\Microsoft\WindowsNT\CurrentVersion\FontSubstitutes] 中的:
“MS Shell Dlg”=”Tahoma”
“MS Shell Dlg 2″=”Tahoma”
改为:
“MS Shell Dlg”=”SimSun”
“MS Shell Dlg 2″=”SimSun”
当然,如果你有兴趣,也可以将这个部分的其他字体都转换成SimSun。
中文支持
用法:
- 安装 winehq 官方的 wine 相应版本(请参考:http://wiki.Ubuntu.org.cn/Wine);
2)载相应版本的补丁包; - 解压(先进入补丁包在所在目录):
代码:tar -xvvf wine-1.1.25_amd64_gdi32.dll.so.tar.bz2
4)然后输入命令:
# Hardy amd64:
# 代码:
sudo mv /usr/lib32/wine/gdi32.dll.so gdi32.dll.so.backup
sudo cp gdi32.dll.so /usr/lib32/wine
# Hardy i386:
# 代码:
sudo mv /usr/lib/wine/gdi32.dll.so gdi32.dll.so.backup
sudo cp gdi32.dll.so /usr/lib/wine
补丁下在地址:http://forum.Ubuntu.org.cn/viewtopic.php?f=121&t=131400
美化
如果在英文环境下使用wine,用env LANG=zh_CN.UTF-8 wine “运行的程序”。
wine的字体美化:
打开字体的防锯齿:
REGEDIT4
[HKEY_CURRENT_USER\Software\Wine\X11 Driver]
“ClientSideAntiAliasWithCore”=”Y”
“ClientSideAntiAliasWithRender”=”Y”
“ClientSideWithRender”=”Y”
打开字体的平滑功能:
REGEDIT4
[HKEY_CURRENT_USER\Control Panel\Desktop]
“FontSmoothing”=”2”
“FontSmoothingType”=dword:00000002
“FontSmoothingGamma”=dword:00000578
“FontSmoothingOrientation”=dword:00000001