wine 的使用方法

简介:

wine中文乱码的终极解决方法

准备字体:simfang.ttc 是许多 Windows 应用默认使用 simfang.ttc 字体。下载simfang.ttc 字体

simsun.ttc复制到/home/user/.wine/drive_c/windows/fonts里面。


进入 Wine 的注册表 “/home/用户名/.wine/dosdevices/c:/windows/”,右键用 "使用Wine Windows Program Loader打开" 方式打开 regedit.exe ,打开 [HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows NT\\CurrentVersion\\FontSubstitutes] ,将“ MS Shell Dlg  ”“ MS Shell Dlg 2 ”“ Tahoma ”三项的值都设为“simsun”。如果没有“Tahoma”可以自己新建一个。

 

Wine挂装 FAT 或 VFAT 文件系统

正确安装完软件之后,最主要的事情就是配置wine.conf文件.大家主要配置的是指定盘符 和路径我的windows分区有四个,分别为c,d,e,f,所以我在linux的/mnt目录中建立了c,d,e ,f四个目录,这样对应windows中的四个盘。光驱为/mnt/cdrom目录,软驱为/mnt/floppy目 录。所以我的wine.conf配置文件如下:

Java代码   收藏代码
  1. [Drive A]  
  2. Path=/mnt/floppy  
  3. Type=floppy  
  4. Label=Floppy  
  5. Serial=87654321  
  6. Device=/dev/fd0  
  7.   
  8. [Drive C]  
  9. Path=/mnt/c  
  10. Type=hd  
  11. Label=MS-DOS  
  12. Filesystem=win95  
  13.   
  14. [Drive d]  
  15. Path=/mnt/d  
  16. Type=hd  
  17. Label=MS-DOS  
  18. Filesystem=win95  
  19.   
  20. [Drive e]  
  21. Path=/mnt/e  
  22. Type=hd  
  23. Label=MS-DOS  
  24. Filesystem=win95  
  25.   
  26. [Drive f]  
  27. Path=/mnt/f  
  28. Type=hd  
  29. Label=MS-DOS  
  30. Filesystem=win95  
  31.   
  32. [Drive g]  
  33. Path=/mnt/cdrom  
  34. Type=cdrom  
  35. Label=CD-Rom  
  36. Filesystem=win95  
  37.   
  38. [Drive h]  
  39. Path=/tmp  
  40. Type=hd  
  41. Label=Tmp Drive  
  42. Filesystem=win95  
  43.   
  44. [Drive i]  
  45. Path=${HOME}  
  46. Type=network  
  47. Label=Home  
  48. Filesystem=win95  
  49.   
  50. [wine]  
  51. Windows=c:\windows  
  52. System=c:\windows\system  
  53. Temp=h:\  
  54. Path=c:\windows;c:\windows\system;e:\;e:\test;f:\  
  55. SymbolTableFile=./wine.sym  
  56. 其中[Drive h][Drive i]为wine.conf文件中的默认临时文件,只需改动盘符即可。  
  57. 在wine.conf中需改动的地方还有:  
  58. [Tweak.Layout]  
  59. ;; WineLook=xxx  (supported styles are 'Win31'(default), 'Win95''Win98')  
  60. ;WineLook=Win95  
  61. 把WineLook=Win95前面的;号去掉即可。现在wine.conf的配置就大功告成了。现在给出我的  
  62. wine.conf文件的配置给大家参考:  
  63. ;;  
  64. ;; MS-DOS drives configuration  
  65. ;;  
  66. ;; Each section has the following format:  
  67. ;; [Drive X]  
  68. ;; Path=xxx       (Unix path for drive root)  
  69. ;; Type=xxx       (supported types are 'floppy''hd''cdrom' and 'network')  
  70. ;; Label=xxx      (drive label, at most 11 characters)  
  71. ;; Serial=xxx     (serial number, 8 characters hexadecimal number)  
  72. ;; Filesystem=xxx (supported types are 'msdos'/'dos'/'fat''win95'/'vfat', 'uni  
  73. x')  
  74. ;;   This is the FS Wine is supposed to emulate on a certain  
  75. ;;   directory structure.  
  76. ;;   Recommended:  
  77. ;;   - "win95" for ext2fs, VFAT and FAT32  
  78. ;;   - "msdos" for FAT16 (ugly, upgrading to VFAT driver strongly recommended)  
  79. ;;   DON'T use "unix" unless you intend to port programs using Winelib !  
  80. ;; Device=/dev/xx (only if you want to allow raw device access)  
  81. ;;  
  82. [Drive A]  
  83. Path=/mnt/floppy  
  84. Type=floppy  
  85. Label=Floppy  
  86. Serial=87654321  
  87. Device=/dev/fd0  
  88.   
  89. [Drive C]  
  90. Path=/mnt/c  
  91. Type=hd  
  92. Label=MS-DOS  
  93. Filesystem=win95  
  94.   
  95. [Drive d]  
  96. Path=/mnt/d  
  97. Type=hd  
  98. Label=MS-DOS  
  99. Filesystem=win95  
  100.   
  101. [Drive e]  
  102. Path=/mnt/e  
  103. Type=hd  
  104. Label=MS-DOS  
  105. Filesystem=win95  
  106.   
  107. [Drive f]  
  108. Path=/mnt/f  
  109. Type=hd  
  110. Label=MS-DOS  
  111. Filesystem=win95  
  112.   
  113. [Drive g]  
  114. Path=/mnt/cdrom  
  115. Type=cdrom  
  116. Label=CD-Rom  
  117. Filesystem=win95  
  118.   
  119. [Drive h]  
  120. Path=/tmp  
  121. Type=hd  
  122. Label=Tmp Drive  
  123. Filesystem=win95  
  124.   
  125. [Drive i]  
  126. Path=${HOME}  
  127. Type=network  
  128. Label=Home  
  129. Filesystem=win95  
  130.   
  131. [wine]  
  132. Windows=c:\windows  
  133. System=c:\windows\system  
  134. Temp=h:\  
  135. Path=c:\windows;c:\windows\system;e:\;e:\test;f:\  
  136. SymbolTableFile=./wine.sym  
  137.   
  138. # <wineconf>  
  139.   
  140. [DllDefaults]  
  141. EXTRA_LD_LIBRARY_PATH=${HOME}/wine/cvs/lib  
  142. DefaultLoadOrder = native, elfdll, so, builtin  
  143.   
  144. [DllPairs]  
  145. krnl386 = kernel32  
  146. gdi = gdi32  
  147. user = user32  
  148. commdlg = comdlg32  
  149. commctrl= comctl32  
  150. ver = version  
  151. shell = shell32  
  152. lzexpand= lz32  
  153. mmsystem= winmm  
  154. msvideo = msvfw32  
  155. winsock = wsock32  
  156.   
  157. [DllOverrides]  
  158. kernel32, gdi32, user32 = builtin  
  159. krnl386, gdi, user = builtin  
  160. toolhelp  = builtin  
  161. comdlg32, commdlg = elfdll, builtin, native  
  162. version, ver  = elfdll, builtin, native  
  163. shell32, shell  = builtin, native  
  164. lz32, lzexpand  = builtin, native  
  165. commctrl, comctl32 = builtin, native  
  166. wsock32, winsock = builtin  
  167. advapi32, crtdll, ntdll = builtin, native  
  168. mpr, winspool.drv = builtin, native  
  169. ddraw, dinput, dsound = builtin, native  
  170. winmm, mmsystem         = builtin  
  171. msvideo, msvfw32        = builtin, native  
  172. mcicda.drv, mciseq.drv  = builtin, native  
  173. mciwave.drv  = builtin, native  
  174. mciavi.drv, mcianim.drv = native, builtin  
  175. msacm.drv, midimap.drv  = builtin, native  
  176. w32skrnl                = builtin  
  177. wnaspi32, wow32  = builtin  
  178. system, display, wprocs = builtin  
  179. wineps   = builtin  
  180. icmp                    = builtin  
  181.   
  182. [options]  
  183. AllocSystemColors=100  
  184.   
  185. [fonts]  
  186. ;Read documentation/fonts before adding aliases  
  187. Resolution = 96  
  188. Default = -adobe-times-  
  189.   
  190. [serialports]  
  191. Com1=/dev/ttyS0  
  192. Com2=/dev/ttyS1  
  193. Com3=/dev/modem,38400  
  194. Com4=/dev/modem  
  195.   
  196. [parallelports]  
  197. Lpt1=/dev/lp0  
  198.   
  199. [spooler]  
  200. LPT1:=|lpr  
  201. LPT2:=|gs -sDEVICE=bj200 -sOutputFile=/tmp/fred -q -  
  202. LPT3:=/dev/lp3  
  203.   
  204. [ports]  
  205. ;read=0x779,0x379,0x280-0x2a0  
  206. ;write=0x779,0x379,0x280-0x2a0  
  207.   
  208. [spy]  
  209. Exclude=WM_SIZE;WM_TIMER;  
  210.   
  211. [registry]  
  212. ; Paths must be given in /dir/dir/file.reg format.  
  213. ; Wine will not understand dos file names here...  
  214.   
  215. ; alternate registry file name: HKCU  
  216. AltCurrentUserFile=  
  217. ; alternate registry file name: HKU  
  218. AltUserFile=  
  219. ; alternate registry file name: HKLM  
  220. AltLocalMachineFile=  
  221. ;These are all booleans.  Y/y/T/t/1 are true, N/n/F/f/0 are false.  
  222. ;Defaults are read all, write to Home and Alt  
  223. ;Note: it is pointless to specify alt files and neither load nor write to them.  
  224. ; Global registries (stored in /etc)  
  225. LoadGlobalRegistryFiles=Y  
  226. ; Home registries (stored in ~user/.wine/)  
  227. LoadHomeRegistryFiles=Y  
  228. ; Windows registries in windows path, above  
  229. LoadWindowsRegistryFiles=Y  
  230. ; Load above registries.  
  231. LoadAltRegistryFiles=Y  
  232. ; TRY to write all changes to home registries  
  233. WritetoHomeRegistryFiles=Y  
  234. ; TRY to write all changes to alt registries  
  235. WritetoAltRegistryFiles=Y  
  236.   
  237. [Tweak.Layout]  
  238. ;; WineLook=xxx  (supported styles are 'Win31'(default), 'Win95''Win98')  
  239. WineLook=Win95  
  240.   
  241. [programs]  
  242. Default=  
  243. Startup=  
  244.   
  245. [Console]  
  246. ;XtermProg=nxterm  
  247. ;InitialRows=25  
  248. ;InitialColumns=80  
  249. ;TerminalType=nxterm  
  250.   
  251. [Clipboard]  
  252. ClearAllSelections=0  
  253. PersistentSelection=1  
  254.   
  255. # </wineconf>  
 

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
你也可以查看你机器的[HKEY_LOCAL_MACHINE/Software/Microsoft/Windows NT/CurrentVersion/FontLink/SystemLink]的"Tahoma"值,然后在windows的fonts里找相应的字体 文件,复制到wine下的windows/fonts目录下。

wine是在Linux操作系统下执行部分Windows应用程序的工具。

 

在目前国内卖Linux操作系统的比卖在其下运行的应用软件的多得多。在Linux软件(如图片浏览、多媒体播放)奇缺的情况下,能将部分Windows 程序移置到Linux环境下,也不失为一种好方法。下面是wine的使用方法。

tar -jxvf wine-1.1.1.tar.bz2
cd wine-1.1.1
./tools/wineinstall

之后它会运行./configure,然后显示:We need to install wine as root user, do you want us to build wine,'su root' and install Wine? Enter 'no' to continue without installing(yes/no)

yes 回车

编译安装途中出现了下面的错误,出现这样的问题是因为没有安装相关的devel支持。

configure: WARNING: X development files not found. Wine will be built
without X support, which probably isn't what you want. You will need to install
development packages of Xlib/Xfree86 at the very least.

如果是用gonme桌面的,请在终端输入:sudo apt-get install gnome-devel 下载安装完后再次执行编译安装wine即可。

如果你root用户设置了密码,还会提示你输入密码。

 

Linux wine 安装 待屏幕上出现:
Installation complete for now. Good luck (this is still alpha software).If you have problems with WINE, please read the documentation first,
as many kinds of potential problems are explained there.

则表示安装成功了。

Java代码   收藏代码
  1. sudo add-apt-repository ppa:ubuntu-wine/ppa  
  2. sudo apt-get update  
  3. sudo apt-get install wine  
  4. winecfg  
  5. ~/.wine/drive_c/windows/Fonts/   #只留一个你想要显示的中文字体在这  
相关文章
|
机器学习/深度学习 算法 安全
Py之dlib:Python库之dlib库的简介、安装、使用方法详细攻略(一)
Py之dlib:Python库之dlib库的简介、安装、使用方法详细攻略
Py之dlib:Python库之dlib库的简介、安装、使用方法详细攻略(一)
|
11月前
|
机器学习/深度学习 数据采集 存储
Lesson 6.2 Scikit-Learn 常用功能介绍
Lesson 6.2 Scikit-Learn 常用功能介绍
|
Python
visdom安装与基本用法
visdom安装与基本用法
362 0
visdom安装与基本用法
|
数据可视化 API 计算机视觉
Py之pycocotools:pycocotools库的简介、安装、使用方法之详细攻略
Py之pycocotools:pycocotools库的简介、安装、使用方法之详细攻略
|
搜索推荐 数据挖掘 PyTorch
Py之albumentations:albumentations库函数的简介、安装、使用方法之详细攻略
Py之albumentations:albumentations库函数的简介、安装、使用方法之详细攻略
Py之albumentations:albumentations库函数的简介、安装、使用方法之详细攻略
|
数据可视化 API 计算机视觉
Py之pycocotools:pycocotools库的简介、安装、使用方法之详细攻略续篇
Py之pycocotools:pycocotools库的简介、安装、使用方法之详细攻略续篇
|
Python Windows
Py之pyHook:pyHook库函数的简介、安装、使用方法之详细攻略
Py之pyHook:pyHook库函数的简介、安装、使用方法之详细攻略
|
机器学习/深度学习 数据可视化 C++
Py之dlib:Python库之dlib库的简介、安装、使用方法详细攻略(二)
Py之dlib:Python库之dlib库的简介、安装、使用方法详细攻略
Py之dlib:Python库之dlib库的简介、安装、使用方法详细攻略(二)
|
Unix Linux API
Py之wxPython:wxPython的简介、安装、使用方法之详细攻略
Py之wxPython:wxPython的简介、安装、使用方法之详细攻略
Py之wxPython:wxPython的简介、安装、使用方法之详细攻略
|
数据可视化 Linux Python
Py之moviepy:python库之moviepy的简介、安装、使用方法详细攻略
Py之moviepy:python库之moviepy的简介、安装、使用方法详细攻略
Py之moviepy:python库之moviepy的简介、安装、使用方法详细攻略