1. 程式人生 > >虛擬機器簡單配置manjaro gnome

虛擬機器簡單配置manjaro gnome

一、安裝gnome啟動到桌面後,解除安裝所有不必要的軟體

開啟【增加/刪除軟體】,找到要刪除的軟體解除安裝
ms-office ---微軟線上辦公軟體
Thunderbird ---郵箱
konversation ---掃描器工具
skanlite ---掃描器工具
steam ---遊戲
印表機 視訊 郵箱 liboffice等等......

二、切換清華映象源、更新系統

1.輸入以下命令 選擇清華源tsinghua

sudo  pacman-mirrors -i -c China -m rank

2.增加archlinuxcn庫和antergos庫

echo -e "\n[archlinuxcn]\nSigLevel = TrustAll\nServer = https://mirrors.tuna.tsinghua.edu.cn/archlinuxcn/\$arch\n\n[antergos]\nSigLevel = TrustAll\nServer = https://mirrors.tuna.tsinghua.edu.cn/antergos/\$repo/\$arch\n"|sudo tee -a /etc/pacman.conf

3.升級系統、重新整理源

sudo pacman -Syyu --noconfirm

4.安裝archlinuxcn簽名鑰匙&antergos簽名鑰匙

sudo pacman -S --noconfirm archlinuxcn-keyring antergos-keyring

三、安裝搜狗中文輸入法、更改中文名資料夾為英文名

1.輸入以下命令 安裝搜狗輸入法和配置介面

sudo pacman -S --noconfirm fcitx-im fcitx-sogoupinyin fcitx-configtool

2.輸入以下命令 把中文資料夾換成英文

export LANG=en_US
xdg-user-dirs-gtk-update

3.然後輸入以下命令 把字型換回中文

export LANG=zh_CN

4.登出後重新登入即可,如果輸入法不可用,編輯檔案新建檔案~/.xprofile
加入以下三行,再登出系統重啟

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

四、使用open-vm-tools配置共享資料夾

1.輸入指令查詢虛擬機器上已經設定了的共享資料夾名

vmware-hgfsclient

2.能看到自己設定的資料夾名繼續以下操作
在/etc/systemd/system目錄,建立一個檔案mnt.hgfs.service

sudo gedit /etc/systemd/system/mnt.hgfs.service

3.填入下面的內容,將所有共享資料夾mount到/mnt/hgfs目錄下

[Unit]
Description=Load VMware shared folders
Requires=vmware-vmblock-fuse.service
After=vmware-vmblock-fuse.service
ConditionPathExists=.host:/
ConditionVirtualization=vmware

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/vmhgfs-fuse -o allow_other -o auto_unmount .host:/ /mnt/hgfs

[Install]
WantedBy=multi-user.target

4.儲存後,用systemctl命令使能這個service,

sudo systemctl enable mnt.hgfs.service

5.最後重啟系統,如果沒有/mnt/hgfs資料夾,需要建立

sudo mkdir -p /mnt/hgfs

五、安裝g++、gcc、vim、sublime-text-dev等軟體

把配置sublime-text-dev檔案通過共享,替換到外掛目錄

六、最後清理垃圾

1.清除系統中無用的包
sudo pacman -R $(pacman -Qdtq)

2.清除已下載的安裝包
sudo pacman -Scc