Skip to content

Commit 8fde4d3

Browse files
committed
更新manjaro个性化配置一文
1 parent c97d63d commit 8fde4d3

File tree

1 file changed

+10
-253
lines changed

1 file changed

+10
-253
lines changed

source/_posts/2018-02-27-manjaro-custom-configuration.md

Lines changed: 10 additions & 253 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ tags:
66
date: 2018-02-27 21:32:16
77
---
88

9-
使用了Manjaro Deepin有一段时间了,从最初的Ubuntu kylin,到Ubuntu,CentOS,Deepin,直到去年发现了Manjaro这个发行版,被其相对简单的安装和强大的软件源所深深吸引。刚从Debian系切换过来还不是很习惯,相对于Deepin的开箱即用,Manjaro还是有一些需要手动去配置的地方。本文将以刚安装完成的Manjaro为前提,一步一步记录下自己的个性化配置步骤,方便以后查阅,同时也为他人提供借鉴。
10-
11-
注:本文所示系统为Manjaro Deepin 17.1.2,不保证在其他Linux发行版/桌面环境/版本下完全可用。请根据自身的需求谨慎参考。具体相关命令可参考[Manjaro个性化配置脚本](https://raw.githubusercontent.com/xyz1001/software-notes/master/backup_and_restore/manjaro/setup.sh)
9+
使用了Manjaro有一段时间了,从最初的Ubuntu kylin,到Ubuntu,CentOS,Deepin,直到Manjaro这个发行版,被其相对简单的安装和强大的软件源所深深吸引。刚从Debian系切换过来还不是很习惯,相对于Deepin的开箱即用,Manjaro还是有一些需要手动去配置的地方。本文将以刚安装完成的Manjaro为前提,以作备忘
1210

1311
<!--more-->
1412

@@ -19,196 +17,35 @@ date: 2018-02-27 21:32:16
1917
1. 根据速度切换软件源
2018

2119
``` bash
22-
sudo pacman-mirrors -i -c China -b stable -a
20+
sudo pacman-mirrors -i -c China -b stable
2321
```
2422

2523
2.`/etc/pacman.conf`添加archlinux源
2624

2725
```
2826
[archlinuxcn]
29-
SigLevel = Optional TrustAll
3027
Server = http://mirrors.ustc.edu.cn/archlinuxcn/$arch
3128
```
3229

3330
### 恢复官方软件
3431

35-
1. 卸载不需要的软件
36-
37-
``` bash
38-
sudo pacman -R `comm -12 <(cat uninstall.lst | sort) <(pacman -Qnq | sort)`
39-
```
40-
41-
2. 安装密钥环
42-
43-
``` bash
44-
sudo pacman -S gnupg archlinuxcn-keyring manjaro-keyring --needed
45-
```
46-
47-
3. 更新软件数据库和软件
32+
1. 更新软件
4833

4934
``` bash
50-
sudo pacman -Syyu
35+
sudo pacman -Syy
36+
sudo pacman -S gnupg archlinux-keyring archlinuxcn-keyring manjaro-keyring --needed
37+
sudo pacman -Syu
5138
```
5239

53-
4. 安装备份的官方软件仓库中的软件,即可通过`pacman`进行安装的软件,生成已安装软件列表的方法可参考[Manjaro下备份已安装软件包](/2018/03/02/manjaro-backup-installed-packages/)
40+
2. 安装备份的官方软件仓库中的软件,即可通过`pacman`进行安装的软件,生成已安装软件列表的方法可参考[Manjaro下备份已安装软件包](/2018/03/02/manjaro-backup-installed-packages/)
5441

5542
``` bash
5643
sudo pacman -S $(< pacman.lst) --needed
5744
```
5845

59-
注:若archlinux源`SigLevel`字段设置为`TrustedOnly`,此处可能会出现`Signature from "User <email@gmail.com>" is unknown trust, installation failed`错误,目前原因未知,可能和系统镜像较旧有关,网上推荐的[解决方式](https://forum.manjaro.org/t/invalid-or-corrupted-package-pgp-signature/324/4)如下,我尝试过,依然不行
60-
61-
``` bash
62-
sudo rm -r /etc/pacman.d/gnupg
63-
sudo pacman -Sy gnupg archlinux-keyring manjaro-keyring
64-
sudo pacman-key --init
65-
sudo pacman-key --populate archlinux manjaro
66-
sudo pacman-key --refresh-keys
67-
sudo pacman -Sc
68-
```
69-
7046
## 基本环境配置
7147

72-
### SSH key
73-
74-
复制`.ssh`备份文件夹至`~`并将权限修改为600
75-
76-
### dotfiles
77-
78-
`dotfiles`中保存了HOME目录下主要的`.`开头的配置文件
79-
80-
``` bash
81-
git clone git@github.com:xyz1001/dotfiles.git && cd dotfiles && ./install.py
82-
```
83-
84-
### ss-qt5
85-
86-
87-
88-
### privoxy
89-
90-
用于将socks5代理转换为http代理
91-
92-
``` bash
93-
sudo bash -c 'echo "forward-socks5 / 127.0.0.1:1080 ." >> /etc/privoxy/config' # 修改配置文件
94-
sudo systemctl start privoxy.service # 运行服务
95-
```
96-
97-
### 调整HOME目录下文件夹
98-
99-
1. 修改中文目录名为英文,若安装时的语言选择的不是中文,此步可跳过
100-
修改`~/.config/user-dirs.dirs`文件如下
101-
102-
```
103-
XDG_DESKTOP_DIR="$HOME/Desktop"
104-
XDG_DOWNLOAD_DIR="$HOME/Download"
105-
XDG_TEMPLATES_DIR="$HOME/Templates"
106-
XDG_PUBLICSHARE_DIR="$HOME/Public"
107-
XDG_DOCUMENTS_DIR="$HOME/Documents"
108-
XDG_MUSIC_DIR="$HOME/Music"
109-
XDG_PICTURES_DIR="$HOME/Pictures"
110-
XDG_VIDEOS_DIR="$HOME/Videos"
111-
```
112-
113-
2. 删除中文目录
114-
115-
``` bash
116-
cd ~ && rmdir 文档 公共 模板 下载 音乐 桌面 视频 && rm -r 图片
117-
```
118-
119-
3. 创建其他所需文件夹
120-
121-
``` bash
122-
mkdir ~/{Project,Code,Application}
123-
ln -s /tmp ~/Temp
124-
```
125-
126-
## 恢复其他软件
127-
128-
### 配置安装环境
129-
130-
1. 配置终端代理
131-
132-
``` bash
133-
export https_proxy=127.0.0.1:8118
134-
export http_proxy=127.0.0.1:8118
135-
```
136-
137-
2. 配置Git代理,若Git配置文件`~/.gitconfig`中已配置,可跳过此步
138-
139-
``` bash
140-
git config --global http.proxy 'socks5://127.0.0.1:1080'
141-
git config --global https.proxy 'socks5://127.0.0.1:1080'
142-
```
143-
144-
### Python软件
145-
146-
``` bash
147-
sudo pip2 --proxy 127.0.0.1:8118 install youdao
148-
sudo pip --proxy 127.0.0.1:8118 install you-get thefuck tldr
149-
```
150-
151-
### npm软件
152-
153-
``` bash
154-
sudo -E npm install hexo-cli -g
155-
```
156-
157-
### 自行编译软件
158-
159-
#### dde-system-monitor
160-
161-
dock上的系统资源监视器,方便查看内存及网速
162-
163-
``` bash
164-
cd /tmp && git clone git@github.com:xyz1001/dde-system-monitor.git
165-
cd dde-system-monitor && mkdir build && cd build
166-
qmake .. && make
167-
sudo cp libdock-system-monitor.so /usr/lib/dde-dock/plugins && pkill dde-dock
168-
```
169-
170-
#### XMemo
171-
172-
便签软件
173-
174-
``` bash
175-
cd /tmp && git clone git@github.com:xyz1001/XMemo.git
176-
cd XMemo && mkdir build && cd build
177-
qmake ../src && make
178-
sudo cp -r ../package/fakeroot/usr/* /usr/
179-
sudo cp xmemo /usr/local/bin
180-
```
181-
182-
#### cppiniter
183-
184-
c++工程初始化脚本
185-
186-
``` bash
187-
cd /tmp && git clone git@github.com:xyz1001/cppiniter.git
188-
cd cppiniter && sudo ./install.py
189-
```
190-
191-
### AUR软件
192-
193-
#### albert
194-
195-
`Albert`需要单独安装,指定内核模块
196-
yaourt -S albert
197-
198-
### deepinwine系列软件
199-
200-
该系列软件经常会安装出错,故单独安装,避免yaourt批量安装多次失败
201-
yaourt -S deepin.com.qq.office
202-
yaourt -S deepin.com.thunderspeed
203-
yaourt -S deepin.com.wechat
204-
205-
#### 其他软件
206-
207-
安装Archlinux社区软件仓库中的软件
208-
209-
``` bash
210-
yaourt -S $(< yaourt.lst) --needed --noconfirm
211-
```
48+
### 基于dotfiles恢复配置文件
21249

21350
## 软件配置
21451

@@ -224,94 +61,14 @@ yaourt -S $(< yaourt.lst) --needed --noconfirm
22461

22562
### tmux
22663

227-
1. 在控制中心中添加开启终端时启动tmux快捷键`Ctrl+Alt+T`,覆盖默认设置启动命令为`deepin-terminal -e tmux -2`
228-
2. 安装tmux插件管理器tpm
64+
1. 安装tmux插件管理器tpm
22965

23066
``` bash
23167
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
23268
```
23369

234-
3. 运行tmux,按下快捷键`Ctrl+a``I`安装tmux插件
70+
2. 运行tmux,按下快捷键`Ctrl+a``I`安装tmux插件
23571

23672
### vim
23773

23874
1. 运行vim,自动安装插件
239-
2. 编译`Youcompleteme`依赖
240-
241-
``` bash
242-
cd ~/.vim/plugged/YouCompleteMe/ && ./install.py --clang-completer --system-libclang
243-
```
244-
245-
### proxychains
246-
247-
```
248-
sudo sed -i "s/socks4\s*127.0.0.1\s*9050/socks5 \t127.0.0.1 1080/g" /etc/proxychains.conf
249-
```
250-
251-
### Chrome
252-
253-
1. 以代理模式启动Chrome
254-
255-
``` bash
256-
google-chrome-stable --proxy-server=socks5://127.0.0.1:1080
257-
```
258-
259-
2. 登陆Chrome进行个人数据同步
260-
261-
### 深度终端
262-
263-
- 调整主题为`solarized dark`
264-
- 调整字体为`firacode`
265-
- 启动时最大化
266-
- 关闭退出提示
267-
268-
``` bash
269-
sudo sed -i "s/print_notify_after_script_finish.*/print_notify_after_script_finish=false/g" ~/.config/deepin/deepin-terminal/config.conf
270-
```
271-
272-
- 关闭雷神终端的标题栏
273-
274-
``` bash
275-
sudo sed -i "s/show_quakewindow_tab.*/show_quakewindow_tab=false/g" ~/.config/deepin/deepin-terminal/config.conf
276-
```
277-
278-
### 坚果云
279-
280-
``` bash
281-
# 安装
282-
sudo pacman -S gvfs python-notify2 jdk8-openjdk --needed
283-
wget http://www.jianguoyun.com/static/exe/installer/nutstore_linux_dist_x64.tar.gz -O /tmp/nutstore_bin.tar.gz
284-
mkdir -p ~/.nutstore/dist && tar zxf /tmp/nutstore_bin.tar.gz -C ~/.nutstore/dist
285-
~/.nutstore/dist/bin/install_core.sh
286-
sed -i "s/env python/env python2/g" "${HOME}/.nutstore/dist/bin/nutstore-pydaemon.py" # 坚果云仅支持python2
287-
sed -i "s/enterprise=false/enterprise=true/g" "${HOME}/.nutstore/dist/conf/nutstore.properties" # 开启企业模式
288-
```
289-
290-
### StarUML
291-
292-
``` bash
293-
# 破解
294-
sudo sed -i '/var pk, decrypted/a\ return {\n name: "0xcc",\n product: "StarUML",\n licenseType: "vip",\n quantity: "www.qq.com",\n licenseKey: "later equals never!"\n };' /opt/staruml/www/license/node/LicenseManagerDomain.js
295-
```
296-
297-
## 其他配置
298-
299-
### 控制中心相关设置
300-
301-
- 更换头像
302-
- 亮度中开启`自动调节色温`
303-
- 默认程序
304-
- 标准字体修改为`Noto Sans CJK SC`,等宽字体修改为`Fira Code`
305-
- 更换图标主题
306-
- 关闭音效
307-
- 开启时间`自动同步`
308-
- 开启`插入鼠标禁用触摸板`
309-
310-
### 其他软件设置
311-
312-
- albert
313-
- notepadqq
314-
- fcitx
315-
- Android Studio
316-
- Zeal
317-
- StarUML

0 commit comments

Comments
 (0)