安装Ubuntu后的一些配置

Ubuntu安装的一些配置

搜狗拼音的安装

卸载ibus和它的配置, 卸载顶部面板的键盘指示

sudo apt remove ibus
sudo apt purge ibus
sudo apt remove indicator-keyboard

安装fcitx并切换, 重启生效

sudo apt install fcitx fcitx-config-gtk
im-config-n fcitx
sudo shutdown -r now

然后安装搜狗拼音的deb包即可.

PS: 安装后若希望禁用Shift键切换中英文, 在搜狗拼音的设置面板里面按键--中英文切换--换成无


zsh安装配置

sudo apt-get install zsh curl git
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

然后注销登录

关于语法高亮

git clone https://github.com/zsh-users/zsh-syntax-highlighting.git "$HOME/.zsh-syntax-highlighting" --depth 1
echo "source $HOME/.zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> "$HOME/.zshrc"

ranger配置


多版本python

当存在2和3时,可以这样修改

sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.6 1
sudo update-alternatives --config python

参考链接https://stackoverflow.com/questions/41986507/unable-to-set-default-python-version-to-python3-in-ubuntu


pip配置

安装最新版的pip时,会报错,可以修改文件

➜  ~ cat /usr/bin/pip3 
#!/usr/bin/python3
# GENERATED BY DEBIAN

import sys

# Run the main entry point, similarly to how setuptools does it, but because
# we didn't install the actual entry point from setup.py, don't use the
# pkg_resources API.
#from pip import main
from pip._internal import main
if __name__ == '__main__':
    sys.exit(main.main())

修改pip到清华源

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pip -U
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple

窗口管理器Regolith

# install
sudo add-apt-repository -y ppa:kgilmer/regolith-stable
sudo apt install regolith-desktop

# reboot

要先安装i3-gaps 然后再复制配置文件过去,因为配置文件里启动要用到这个


Polybar安装配置

# 安装依赖
# 如果还不行就根据提示安装少的包

参考: https://github.com/polybar/polybar#building-from-source

https://github.com/polybar/polybar/wiki/Compiling#optional-dependencies1(依赖)

若有些模块运行不出来,则用polybar example来看看哪些模块启动失败,然后去查依赖,重新编译运行.


vim的coc插件安装

需要安装node

curl -sL https://deb.nodesource.com/setup_13.x | sudo -E bash - 

安装ccls https://github.com/MaskRay/ccls/wiki/Build

编译的时候会发现ld -lz 少了 lz , 安装zlib1g-dev即可

然后把Release下编译好的./ccls复制到/usr/local/bin即可


Gnome下交换swapescape

采用gsettings set org.gnome.desktop.input-sources xkb-options "['caps:swapescape']" 更好

备用: 首先需要安装dconf-tools, 然后打开,找到org>>gnome>>desktop>>input-sources, 自定义的值加入'caps:swapescape' 就OK


TIM and WeChat

主要还是https://github.com/wszqkzqk/deepin-wine-ubuntu项目

微信无法发送图片sudo apt install libjpeg62:i386

调整字体大小WINEPERFIX=~/.deepinwine/Deepin-TIM /usr/bin/deepin-wine winecfg

关于字体的 乱码和修改, 首先下载msyh.ttc

然后

#1.添加字体
cp msyh.ttc ~/.deepinwine/Deepin-WeChat/drive_c/windows/Fonts

#2.修改系统注册表
gedit ~/.deepinwine/Deepin-WeChat/system.reg
#修改以下两行
"MS Shell Dlg"="msyh"
"MS Shell Dlg 2"="msyh"

#3.字体注册
gedit msyh_config.reg
#内容添加
REGEDIT4
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\FontLink\SystemLink]
"Lucida Sans Unicode"="msyh.ttc"
"Microsoft Sans Serif"="msyh.ttc"
"MS Sans Serif"="msyh.ttc"
"Tahoma"="msyh.ttc"
"Tahoma Bold"="msyhbd.ttc"
"msyh"="msyh.ttc"
"Arial"="msyh.ttc"
"Arial Black"="msyh.ttc"
#注册
WINEPREFIX=~/.deepinwine/Deepin-WeChat deepin-wine regedit msyh_config.reg

#4.reboot

双系统时间问题

执行timedatectl set-local-rtc 1 --adjust-system-clock即可

ssh问题

ssh容易自己断开连接,需要在'~/.ssh/config'配置一下

Host *
    ServerAliveInterval 60

你可能感兴趣的:(安装Ubuntu后的一些配置)