Linux软件配置
Linux系统备份
利用rsync来增量备份系统
sudo rsync -avzue ssh / --exclude={"dev/*", "proc/*", "sys/*", "tmp/*", "run/*", "mnt/*", "media/*", "lost+found"} user@⬇️0.0.0.253::backup/manjaro/
Linux系统配置
设置磁盘开机自动mount
sudo nano /etc/fstab
配置模板:
UUID=************* /mnt/data ext4 defaults,noatime 0 1
M7650DNF
CentOS 连接联想打印机,联想Lenovo M7650DNF打印机Linux下驱动很难找,看到一篇日志说是联想的打印机可能跟brother的驱动相似。
设置过程是:系统-管理-打印-新建,在网络打印机中选择Lenovo M7650DNF型号,然后就是选择驱动,选brother的,HL-8050N。完成。打印测试页,可以打印
Zotero
-
下载地址
https://www.zotero.org/download/
-
软件设置
- 安装
- 更改目录, 建立符号链接, 删除zotero目录下storage目录.
cd zotero目录 ls -s D:\Individual\reference\ storage
- 设置
- 同步账号为: (自己的账号)
- File Syncing勾去掉
- 插件
- Better BibTeX
https://github.com/retorquere/zotero-better-bibtex/releases/tag/v5.1.45
- Citation key Format:
[auth][year]P[firstpage]
- Field to omit form export:
abstract,keywords,file
Shell脚本学习
与其他编程语言类似,Shell支持for循环。for循环一般格式:
for var in item1 item2 ... itemN
do
command1
...
done
写成一行:
for var in item_list; do command1; command2… done;
例子:转换ape格式flac格式,同时去除metadata里的comment.
分析:由于文件名里有空格,所以$file
都加入双引号。
# for file in `ls | grep .ape`
for file in *.wma
do
newfile=`echo "$file" | sed 's/_/ /g' | sed 's/ape/flac/g'`
ffmpeg -i "$file" -y -metadata comment= "$newfile"
done
yay
安装
sudo pacman -S yay base-devel
Albert 软件启动神器
sudo pacman -S albert
syncthing
sudo pacman -S syncthing
Enable and start the service. Replace “myuser” with the actual Syncthing user after the
systemctl enable syncthing@myuser.service
systemctl start syncthing@myuser.service
FAQ
- 在Manjaro使用Python自带的IDLE,出现以下问题
[user@user-pc ~]$ idle
IDLE can't import Tkinter.
Your Python may not be configured for Tk. **
尝试用pip安装Tkinter,不过失败了,出现了错误
[user@user-pc ~]$ pip install Tkinter
Defaulting to user installation because normal site-packages is not writeable
ERROR: Could not find a version that satisfies the requirement Tkinter (from versions: none)
ERROR: No matching distribution found for Tkinter
无意中发现居然可以这么简单的解决了[1]
sudo pacman -S python-pmw
- VirtualBox虚拟机窗口半透明,彻底解决方法如下:
sudo vim /usr/bin/VirtualBox
在PATH=……一行前加入:
export XLIB_SKIP_ARGB_VISUALS=1
添加完保存之后正常启动VirtualBox,虚拟机画面正常
[1] https://www.cnblogs.com/xavier-wang/p/12409345.html
[2] http://www.seebit.org/2009/04/virtualbox-window-translucent/