hongy19’s blog
Windows
- 解决Windows10英文版中文字体难看、时大时小、中文比英文小等问题
- HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontLink\SystemLink
- 把 MSYH.TTC,Microsoft YaHei UI,128,96 MSYH.TTC,Microsoft YaHei UI放在Segoe UI,Tahoma,Microsoft Sans Serif的前面。
- seelink1, link2, link3
- chrome installation
- chrome的proxy setting用的是windows system proxy setting,而公司的新电脑上system proxy是不可以更改的。在这种情况下,安装完chrome后是无法sync and install extension。可以用google-chrome –proxy-server=“socks://localhost:8080"的方式用命令行来设置chrome proxy,后就可以sync and install extension。
- 公司电脑的政策是只有whitelist里的extension是可以安装的,可以用SwitchyOmega切换proxy
- WSL
- Windows 10 21H2里的wsl (Arch)默认还是wsl1,需要在setting ->Apps & feature -> Optional features -> more windows features里安装"windows subsystem for linux” (for WSL1) and “virtual machine platform” (for WSL2)
- Arch by default is WSL1,可以先把老的ext4.vhdx改名,再把wsl1 convert to wsl2,然后再把old hvdx的文件名改回ext4.vhdx及可。
- backup for new laptop
- onedrive, outlook,edge, chrome都是cloud based的,不用特殊备份
- netid里的老证书也可以从网上下载,不用备份
- backup chrome SwitchyOmega配置, .wslconfig in $user$ folder
- WSL(arch)需要把相关文件拷贝到onedrive里,安装完成后再copy出来。
- 其它非onedriver folder backup: log
Texlive
- Installation with pacman
- texlive-bin
- texlive-core
- texlive-fontsextra
- texlive-formatsextra
- texlive-langchinese
- texlive-latexextra
- texlive-pictures
- texdoc
- install
- yay texlive-most-doc
- https://bbs.archlinux.org/viewtopic.php?id=241012
- “No texlive.tlpdb nor shipped tlpdb data found”
- texdoc (user manual) use TEXMFROOT/tlpkg/texlive.tlpdb (TEXMFROOT=/usr/share) but archlinux doesn’t have it
- Solution 1: install extra AUR package: yay texlive-tlpdb
- Solution 2: use local tlpdb
- tlmgr install –with-doc xxx
- font
- mkdir font folder: .local/share/fonts/
- install Ericsson and chinese font
- ./.local/share/fonts/ericsson/EricssonHilda-Medium.ttf
- ./.local/share/fonts/ericsson/EricssonTechnicalIcons-Regular.ttf
- ./.local/share/fonts/ericsson/EricssonHilda-Regular.ttf
- ./.local/share/fonts/ericsson/EricssonCapitalTT.ttf
- ./.local/share/fonts/ericsson/EricssonHilda-Light.ttf
- ./.local/share/fonts/ericsson/EricssonHilda-Bold.ttf
- ./.local/share/fonts/windows/simhei.ttf
- ./.local/share/fonts/windows/simkai.ttf
- ./.local/share/fonts/windows/simfang.ttf
- ./.local/share/fonts/windows/simsunb.ttf
- TFM
- tex/latex/pdflatex need TFM files for all fonts.
- XeTeX and LuaTeX have no need of TFM files for TrueType and OpenType fonts which contain the necessary metrics.
- see link
- tlmgr
- set in .bashrc
- alias tlmgr=‘TEXMFDIST/scripts/texlive/tlmgr.pl –usermode’
- use Tsinghua mirror
- tlmgr option repository https://mirrors.tuna.tsinghua.edu.cn/CTAN/systems/texlive/tlnet
- install texlive 2021 package when texlive 2022 is released
- tlmgr option repository https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/2020/tlnet-final
- tlmgr install xxx
- or tlmgr install xxx –repository https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/2020/tlnet-final
- repository
- default: default package repository found in the installation’s TeX Live Package Database (a.k.a. the TLPDB, which is given entirely in the file tlpkg/texlive.tlpdb (for example ~/texmf/tlpkg/texlive.tlpdb)
- set in command line: tlmgr option repository https://mirror.ctan.org/systems/texlive/tlnet
- set in configuration file: make a permanent change, use option repository (see the “option” action).
- correct script error
- First, edit TEXMFDIST/scripts/texlive/tlmgr.pl and replace $Master ="$Master/../.."; with $Master = “${Master}/../../..”;. The path prefix TEXMFDIST is not a predefined environment variable, it is defined below in this article. Replace it with the correct value.
- system configuration
- tlmgr conf
- TEXMFCONFIG=/home/hongy19/.texlive/texmf-config
- TEXMFDBS={!!/usr/local/share/texmf:/usr/share/texmf,!!/etc/texmf,!!/var/lib/texmf,!!/usr/share/texmf-dist}
- TEXMFDIST=/usr/share/texmf-dist
- TEXMFHOME=/home/hongy19/texmf
- TEXMFLOCAL=/usr/local/share/texmf:/usr/share/texmf
- TEXMFMAIN=/usr/share/texmf-dist
- TEXMFSYSCONFIG=/etc/texmf
- TEXMFSYSVAR=/var/lib/texmf
- TEXMFVAR=/home/hongy19/.texlive/texmf-var
- error in tlmgr check file
- (base) [hongy19@CN-00000988 ~]$ tlmgr check files
Files present but not covered (relative to /home/hongy19/texmf):
tex/generic/pgf/tikzlibrarytimeline/tikzlibrarytimeline.code.tex
web2c/tlmgr-commands.log
web2c/tlmgr.log
tlmgr.pl: An error has occurred. See above messages. Exiting. - (base) [hongy19@CN-00000988 ~]$ pacman -Qi texlive-core
Name : texlive-core
Version : 2021.61403-1 - (base) [hongy19@CN-00000988 ~]$ tlmgr –version
tlmgr revision 60693 (2021-10-04 04:24:25 +0200)
tlmgr using installation: /usr/share/texmf-dist/scripts/texlive/../../.. - –package-logfile *file* “tlmgr” logs all package actions (install, remove, update, failed updates, failed restores) to a separate log file, by default “TEXMFSYSVAR/web2c/tlmgr.log”. This option allows you to specify a different file for the log.
- –command-logfile *file* “tlmgr” logs the output of all programs invoked (mktexlr, mtxrun, fmtutil, updmap) to a separate log file, by default “TEXMFSYSVAR/web2c/tlmgr-commands.log”. This option allows you to specify a different file for the log.
- when tlmgr running in user mode, log is stored in TEXMFHOME/web2c, not TEXMFSYSVAR/web2c
if ($opts{“usermode”}) {
$packagelogfile ||= “$::maintree/web2c/tlmgr.log”;
} else {
$packagelogfile ||= “$texmfsysvar/web2c/tlmgr.log”;
}
SSH
configuration on server side
on the /etc/ssh/sshd_config* AllowGroups wheel
- PasswordAuthentication no
- AuthenticationMethods publickey
- PermitRootLogin no
access server
put public key into server side ~/.ssh/authorized_keys and then use private key on your computer to access remote server.## SSH2_MSG_KEX_ECDH_REPLY
if encounter “SSH2_MSG_KEX_ECDH_REPLY” issue, try * KexAlgorithms
- ssh -oKexAlgorithms=ecdh-sha2-nistp521 server
- KexAlgorithms ecdh-sha2-nistp521 in ~/.ssh/config
- see link for detail and Key Exchange Method for background
- MTU
- see link for background
- ip link set mtu 1200