ArcoLinux安装完成后的的配置

戏子无情 提交于 2020-04-28 04:47:20

ArcoLinux安装完成后的的配置

这可能是全网第一篇Arcolinux的教程

1. 更改源

修改/etc/pacman.d/mirrorlist

在最头上增加清华源

Server = https://mirrors.tuna.tsinghua.edu.cn/archlinux/$repo/os/$arch

修改后的/etc/pacman.d/mirrorlist

################################################################################
################# Arch Linux mirrorlist generated by Reflector #################
################################################################################

# With:       reflector -f 30 -l 30 --number 10 --save /etc/pacman.d/mirrorlist
# When:       2019-11-28 07:17:25 UTC
# From:       https://www.archlinux.org/mirrors/status/json/
# Retrieved:  2019-11-28 07:17:18 UTC
# Last Check: 2019-11-28 06:44:04 UTC

Server = https://mirrors.tuna.tsinghua.edu.cn/archlinux/$repo/os/$arch
Server = https://ger.mirror.pkgbuild.com/$repo/os/$arch
Server = https://ftp.halifax.rwth-aachen.de/archlinux/$repo/os/$arch
Server = https://ftp.sh.cvut.cz/arch/$repo/os/$arch
Server = http://mirror.pseudoform.org/$repo/os/$arch
Server = https://mirror.pseudoform.org/$repo/os/$arch
Server = https://mirrors.uni-plovdiv.net/archlinux/$repo/os/$arch
Server = http://mirrors.atviras.lt/archlinux/$repo/os/$arch
Server = https://mirrors.atviras.lt/archlinux/$repo/os/$arch
Server = http://ftp.sh.cvut.cz/arch/$repo/os/$arch
Server = https://mirror.f4st.host/archlinux/$repo/os/$arch

修改/etc/pacman.conf

我选择注释掉最后面以arcolinux开头的四个仓库,并增加中科大的archlinuxcn仓库

这是我修改后的/etc/pacman.conf

#
# /etc/pacman.conf
#
# See the pacman.conf(5) manpage for option and repository directives

#
# GENERAL OPTIONS
#
[options]
# The following paths are commented out with their default values listed.
# If you wish to use different paths, uncomment and update the paths.
#RootDir     = /
#DBPath      = /var/lib/pacman/
#CacheDir    = /var/cache/pacman/pkg/
#LogFile     = /var/log/pacman.log
#GPGDir      = /etc/pacman.d/gnupg/
#HookDir     = /etc/pacman.d/hooks/
HoldPkg     = pacman glibc
#XferCommand = /usr/bin/curl -C - -f %u > %o
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
#CleanMethod = KeepInstalled
#UseDelta    = 0.7
Architecture = auto

# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
#IgnorePkg   =
#IgnoreGroup =

#NoUpgrade   =
#NoExtract   =

# Misc options
#UseSyslog
Color
TotalDownload
#CheckSpace
VerbosePkgLists
ILoveCandy

# By default, pacman accepts packages signed by keys that its local keyring
# trusts (see pacman-key and its man page), as well as unsigned packages.
SigLevel    = Required DatabaseOptional
LocalFileSigLevel = Optional
#RemoteFileSigLevel = Required

# NOTE: You must run `pacman-key --init` before first using pacman; the local
# keyring can then be populated with the keys of all official Arch Linux
# packagers with `pacman-key --populate archlinux`.

#
# REPOSITORIES
#   - can be defined here or included from another file
#   - pacman will search repositories in the order defined here
#   - local/custom mirrors can be added here or in separate files
#   - repositories listed first will take precedence when packages
#     have identical names, regardless of version number
#   - URLs will have $repo replaced by the name of the current repo
#   - URLs will have $arch replaced by the name of the architecture
#
# Repository entries are of the format:
#       [repo-name]
#       Server = ServerName
#       Include = IncludePath
#
# The header [repo-name] is crucial - it must be present and
# uncommented to enable the repo.
#

# The testing repositories are disabled by default. To enable, uncomment the
# repo name header and Include lines. You can add preferred servers immediately
# after the header, and they will be used before the default mirrors.

#[testing]
#Include = /etc/pacman.d/mirrorlist

[core]
Include = /etc/pacman.d/mirrorlist

[extra]
Include = /etc/pacman.d/mirrorlist

#[community-testing]
#Include = /etc/pacman.d/mirrorlist

[community]
Include = /etc/pacman.d/mirrorlist

# If you want to run 32 bit applications on your x86_64 system,
# enable the multilib repositories as required here.

#[multilib-testing]
#Include = /etc/pacman.d/mirrorlist

[multilib]
Include = /etc/pacman.d/mirrorlist

# An example of a custom package repository.  See the pacman manpage for
# tips on creating your own repositories.
#[custom]
#SigLevel = Optional TrustAll
#Server = file:///home/custompkgs

#[arcolinux_repo_testing]
#SigLevel = Required DatabaseOptional
#Include = /etc/pacman.d/arcolinux-mirrorlist

#[arcolinux_repo]
#SigLevel = Required DatabaseOptional
#Include = /etc/pacman.d/arcolinux-mirrorlist

#[arcolinux_repo_3party]
#SigLevel = Required DatabaseOptional
#Include = /etc/pacman.d/arcolinux-mirrorlist

#[arcolinux_repo_xlarge]
#SigLevel = Required DatabaseOptional
#Include = /etc/pacman.d/arcolinux-mirrorlist

[archlinuxcn]
Server = https://mirrors.ustc.edu.cn/archlinuxcn/$arch

然后安装archlinuxcn-keyring

这一步非常非常非常重要,必须在安装后续软件之前执行

执行以下命令

$ sudo pacman -Syu
$ sudo pacman -S archlinuxcn-keyring

2. 安装中文输入法

推荐使用谷歌拼音,不推荐使用搜狗(会出现莫名其妙的问题)

$ sudo pacman -S fcitx-im
$ sudo pacman -S fcitx-cofigtool
$ sudo pacman -S googlepinyin

在家目录下创建.xprofile文件并写入以下内容

export XIM=fcitx
export XIM_PROGRAM=fcitx
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS="@im=fcitx"

重启,在开始菜单中找到名为Fcitx 配置的应用进行输入法的选择。

3. 安装WPS

$ sudo pacman -S wps-office ttf-wps-fonts

安装完成后第一次打开会报一个错误

无法打开URI"file:///messagepush%....

这个错误据是因为某个广告插件弹不出来,反正无视他就好了,并不影响使用,反正只有第一次打开会报这个错误 (kainhuck防抄袭插入文字)

4. 安装其他常用软件

QQ

$ sudo pacman -S qq-linux

VScode

$ sudo pacman -S code

typora

$ sudo pacman -S typora

百度网盘

$ sudo pacman -S baidunetdisk-bin

virtualbox

$ sudo pacman -S virtualbox

这里我选择virtualbox-host-dkms

$ sudo pacman -S linux-headers

将当前用户加入vboxusers

$ sudo gpasswd -a $USER vboxusers

其他

$ sudo pacman -S virtualbox-guest-dkms
$ sudo pacman -S virtualbox-guest-iso
$ sudo pacman -S virtualbox-guest-utils

网易云音乐

$ sudo pacman -S netease-cloud-music

此时的网易云音乐还不能输入中文,需要做以下修改

  1. 安装qcef
$ yay -S qcef
  1. 修改/opt/netease/netease-cloud-music/netease-cloud-music.bash文件为以下内容
#!/bin/sh
HERE="$(dirname "$(readlink -f "${0}")")"
export XDG_CURRENT_DESKTOP=DDE 
exec "${HERE}"/netease-cloud-music $@

思维导图

$ yay mindmaster

5. 美化终端

虽然arcolinux默认的bash已经足够好看,虽然fish也很好看,但是我还是喜欢zsh

1. 切换shell

arcolinux自带zsh无需额外安装

$ sudo chsh -s /bin/zsh

重启

2. 安装oh-my-zsh

网址https://ohmyz.sh

$ sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

3. 配置插件

ohmyzsh的插件放在~/.oh-my-zsh/plugins

历史记录(自动补全)插件

$ cd ~/.oh-my-zsh/plugins
$ git clone git://github.com/zsh-users/zsh-autosuggestions.git

语法检查插件

$ cd ~/.oh-my-zsh/plugins
$ git clone https://github.com/zsh-users/zsh-syntax-highlighting.git

下载好后在~/.zshrc文件中加入上述插件

找到plugins=(git),改为如下

plugins=(
	git
	sudo
	zsh-syntax-highlighting
	zsh-autosuggestions
)

生效~/.zshrc

$ source ~/.zshrc

给root用户安装ohmyzsh

切换用户

$ su root

这里注意要清空ZSH的环境变量,否则会提示ohmyzsh已经安装,因为通过su切换用户环境变量是没变的

$ ZSH=

其他步骤同上

6. 解决部分软件中文字体变成框框问题

这是因为缺少字体

$ sudo pacman -S wqy-microhei
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!