Deepin Wine WeChat Notes

Archlinux with en locale

Package: deepin.com.wechat2

#!/bin/bash
/usr/lib/gsd-xsettings &
/opt/deepinwine/apps/Deepin-WeChat/run.sh

Chinese font settings:

1. Create a reg file chn.reg

REGEDIT4

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

2. Import

WINEPREFIX=~/.deepinwine/Deepin-WeChat deepin-wine regedit 

3. Adjust DPI

WINEPREFIX=~/.deepinwine/Deepin-WeChat deepin-wine winecfg

4. Setup Locale

LC_ALL=zh_CN.UTF-8

用NoMachine远程桌面

家里有一台台式机,用着很爽。最近有需要到处使用电脑的需求,手头有一台老旧的macbook air,想来可以试试远程桌面。

NoMachine 的设置很简单,并支持Win/MacOS/Linux和各类手机(未尝试),开箱almost可用,有一些小问题,特此记录一下:

  1. 我的PC是 linux,又是使用的大屏幕,自动转换分辨率并不支持。
  2. 我用colemak,PC上的键盘是在固件level改的,而mac的nomachine client无法forward这个设定。

好在 NoMachine 支持 callback custom script,在 session start /disconnect / close 等可以唤醒。设置在 /usr/NX/etc/node.cfg,用 xrandr 来改分辨率,setxkbmap 设置 keyboard layout。

#!/bin/bash

export XAUTHORITY=/home//.Xauthority
export DISPLAY=":0"

xrandr -d :0 --output HDMI-0 --dpi 144 --set audio off --mode 1920x1080 &> /tmp/f.log

setxkbmap us &>> /tmp/f.log

血的教训: 不要随便用 –force

Never use –force unless you know what you are doing!

事情是这样的, 昨晚发现机器上没装php-gd extension, 然后装的时候发现系统很久没升级了, 于是就pacman -Syu了一把, glibc开始报错, /lib下有conflict:

error: failed to commit transaction (conflicting files)
glibc: /lib exists in filesystem
Errors occurred, no packages were upgraded.

一狠心就直接–force了一把, 结果:
> ls
-bash: ls: command not found

于是就尴尬了, 整个 /lib 就这么被踹了, 机器变砖鸟. 好在我不是一个人, 论坛上哭天喊地的一大群人(1,2,3).

还好linode有rescue模式, Lish也很好用, 于是根据 1,2 终于把系统复原, 期间挫折重重.

最重要的一点就是, 下次说啥也不随便 –force 了.

转换APE/CUE成mp3格式

主要参考:
http://gimpel.gi.funpic.de/wiki/index.php?title=Howto:convert_ape_to_wav/mp3/ogg_on_Linux

需要的软件有:mac-port(解压APE用),lame(转换mp3),mp3splt(分割mp3并填入ID3标签),上述三个包在aur里都有(别的发行版应该也有相应的包)

主要步骤(以CDImage.ape/CDImage.cue为例):

  1. mac CDImage.ape CDImage.wav -d  (解压ape,这个速度很快,1分钟)
  2. lame –preset extreme CDImage.wav (extreme是以192-256为主的VBR压缩,也可以用insane(CBR 320),或者standard(CBR 128),更多参考man)
  3. mp3splt -c CDImage-CD1.cue CDImage-CD1.wav.mp3 (几秒钟的事)

hal 更新到0.5.11-7后不能自动挂载u盘

偶真是后知后觉啊,今天看log发现是Feb.7的时候就更新的….

解决办法如下,修改/etc/PolicyKit/PolicyKit.conf (尖括号之间的空格去掉)


< match user="$USER" >
< match action="org.freedesktop.hal.storage.*" >
< return result="yes" >
< /match >
< match action="hal-storage-mount-fixed-extra-options" >
< return result="yes" >
< /match >
< match action="hal-storage-mount-removable-extra-options" >
< return result="yes" >
< /match >
< /match >

ref:
http://www.linuxsir.org/bbs/thread344125.html
http://bbs.archlinux.org/viewtopic.php?id=65070