FilmLooK / 用照片记录生活

真是不可思议!

wine9.0在ubuntu24.04中设置中文方块的问题。

Author:一爸带两霸Posted On:Category:哎呀哎呀No Comments

在Linux环境中不免要使用windows的程序,wine是比较好的选择。但是,有很多中文显示的问题。那么,分享一下我的设置经验。

  1. 下载中文字体,我使用的是DengXian.ttf 。微软官方字体下载:http://fg.v4.download.windowsupdate.com/d/msdownload/update/software/updt/2015/07/microsoft-windows-languagefeatures-fonts-hans-package_4f01e44d1c4fa5103ef26643d388300d278a3e24.cab

  2. 将字体文件导入  .wine/drive_c/windows/Fonts  

  3. 导入注册表文件,输入命令 wine regedit [FileName].reg

    //文件内容如下:

    REGEDIT4
    [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\FontSubstitutes]
    "Arial"="DengXian.ttf"
    "Arial CE,238"="DengXian.ttf"
    "Arial CYR,204"="DengXian.ttf"
    "Arial Greek,161"="DengXian.ttf"
    "Arial TUR,162"="DengXian.ttf"
    "Courier New"="DengXian.ttf"
    "Courier New CE,238"="DengXian.ttf"
    "Courier New CYR,204"="DengXian.ttf"
    "Courier New Greek,161"="DengXian.ttf"
    "Courier New TUR,162"="DengXian.ttf"
    "FixedSys"="DengXian.ttf"
    "Helv"="DengXian.ttf"
    "Helvetica"="DengXian.ttf"
    "MS Sans Serif"="DengXian.ttf"
    "MS Shell Dlg"="DengXian.ttf"
    "MS Shell Dlg 2"="DengXian.ttf"
    "System"="DengXian.ttf"
    "Tahoma"="DengXian.ttf"
    "Times"="DengXian.ttf"
    "Times New Roman CE,238"="DengXian.ttf"
    "Times New Roman CYR,204"="DengXian.ttf"
    "Times New Roman Greek,161"="DengXian.ttf"
    "Times New Roman TUR,162"="DengXian.ttf"
    "Tms Rmn"="DengXian.ttf"

    REGEDIT4
     
    [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\FontLink\SystemLink]
    "Lucida Sans Unicode"="DengXian.ttf"
    "Microsoft Sans Serif"="DengXian.ttf"
    "MS Sans Serif"="DengXian.ttf"
    "Tahoma"="DengXian.ttf"
    "Tahoma Bold"="DengXian.ttf"
    "msyh"="DengXian.ttf"
    "Arial"="DengXian.ttf"
    "Arial Black"="DengXian.ttf"


  4. 确认修改内容:

    sudo gedit ~/.wine/system.reg

    搜索: LogPixels
    将其中的:
    "LogPixels"=dword:00000060
    改为:
    "LogPixels"=dword:00000070


    搜索: FontSubstitutes
    将其中的:
    "MS Shell Dlg"="Tahoma"
    "MS Shell Dlg 2″="Tahoma"
    改为:
    "MS Shell Dlg"="DengXian.ttf"
    "MS Shell Dlg 2″="DengXian.ttf"

  5. 修改 ~/.wine/drive_c/windows/win.ini
    sudo vi ~/.wine/drive_c/windows/win.ini
    在文件末尾加入:

    [Desktop]
    menufontsize=13
    messagefontsize=13
    statusfontsize=13
    IconTitleSize=13

Tags:none

安装微信之后启动,结果显示窗口“统信应用兼容引擎com.qq.weixin.deepin解压失败”

Author:一爸带两霸Posted On:Category:技术狂魔No Comments

微信无法生成图标,在/opt/apps/com.qq.weixin.deepin/files下运行run脚本,兼容层提示解压失败。
检查file目录下files.7z和files.md5sum发现校验值不一致。
(清除apt的包缓存后重新下载deb包,问题复现)

修改/opt/deepinwine/tools/run_v4.sh
7z x "$APPDIR/$APPTAR" -o"$1"替换为7z x "$APPDIR/$APPTAR" -o"$1" || true

Tags:none

NginX的安装

Author:一爸带两霸Posted On:Category:技术狂魔No Comments

1.安装依赖以及工具包

yum groupinstall "Compatibility libraries" "Base" "Development tools"
yum groupinstall "debugging Tools" "Dial-up Networking Support"
yum install -y gcc gcc-c++
yum -y install zlib pcre pcre-devel openssl openssl-devel
yum -y install wget

2.下载Nginx

wget [下载地址]

3.安装Nginx

tar zxvf nginx[版本号].tar.gz
cd nginx[版本号]
 ./configure \
> --user=www \
> --group=www \
> --prefix=/usr/local/nginx \
> --sbin-path=/usr/local/nginx/sbin/nginx \
> --conf-path=/usr/local/nginx/conf/nginx.conf \
> --error-log-path=/usr/local/nginx/logs/error.log \
> --http-log-path=/usr/local/nginx/logs/access.log \
> --pid-path=/var/run/nginx.pid \
> --lock-path=/var/lock/subsys/nginx \
> --with-http_stub_status_module \
> --with-http_ssl_module \
> --with-http_gzip_static_module \
> --with-pcre

4.编译

./configure
make 
make install


Tags:none