先完成 Arch Linux Base Install - 基礎安裝
官網Xfce,作者 bash 檔 xfce.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
#!/bin/bash
#--------------------------------
# Created by chuanjang(at)gmail(dot)com
# Download: wget https://diii.neocities.org/xfce.txt
# Usage:
# chmod +x xfce.txt
# sh xfce.txt
# COLORS
Reset=$(tput sgr0)
# Regular Colors
Red=$(tput setaf 1)
Green=$(tput setaf 2)
Yellow=$(tput setaf 3)
Purple=$(tput setaf 5)
Cyan=$(tput setaf 6)
print_line() { #{{{
printf "%$(tput cols)s\n"|tr ' ' '-'
} #}}}
read_input_text() { #{{{
read -p "$1 [y/N]: " OPTION
OPTION=`echo "$OPTION" | tr '[:upper:]' '[:lower:]'`
} #}}}
pause_function() { #{{{
print_line
read -e -sn 1 -p "Press enter to continue..."
} #}}}
sudo sh -c "pacman -Syu --noconfirm"
#For Nvidia
#sudo sh -c "pacman -S nvidia nvidia-settings --noconfirm"
#Xorg and Xfce desktop
sudo sh -c "pacman -S --noconfirm xorg-server xfce4"
echo -e "\n\n"
print_line
read_input_text "Install ${Yellow}Pxfce4-goodies${Reset}: "
if [[ $OPTION == y ]]; then
sudo sh -c "pacman -S xfce4-goodies --noconfirm"
fi
echo -e "\n\nInstall ${Cyan}PulseAudio${Reset}"
#Install additional components
sudo sh -c "pacman -S --noconfirm network-manager-applet gvfs pulseaudio pulseaudio-alsa pavucontrol"
#Install applications
sudo sh -c "pacman -S --noconfirm firefox l3afpad"
#Display Manager
sudo sh -c "pacman -S --noconfirm sddm"
#Autologin
sudo sh -c "mkdir -p /etc/sddm.conf.d"
sudo sh -c "echo '[Autologin]' >> /etc/sddm.conf.d/autologin.conf"
sudo sh -c "echo 'User=$USER' >> /etc/sddm.conf.d/autologin.conf"
sudo sh -c "echo 'Session=xfce' >> /etc/sddm.conf.d/autologin.conf"
sudo sh -c "echo '[General]' >> /etc/sddm.conf"
sudo sh -c "echo 'Numlock=on' >> /etc/sddm.conf"
sudo sh -c "systemctl enable sddm"
echo -e "\n${Cyan}SDDM${Reset} installed and set ${Green}Autologin${Reset} & ${Green}NumLock${Reset}\n"
pause_function
wget https://diii.neocities.org/localize.txt
chmod +x localize.txt
sh localize.txt
rm -rf localize.txt
echo -e "\nMust reboot to enable setting."
pause_function
reboot
exit 0
|
以具有 sudo 權限之使用者登入
wget https://diii.neocities.org/xfce.txt
chmod +x xfce.txt
sh xfce.txt
重啟後自動登入, 可刪除 chi_in.txt, fonts.txt, xfce.txt, setlang.txt, 也可以使用文字編輯器查看
顯示管理器SDDM已安裝並設置自動登入、啟用數字鎖定鍵
PulseAudio 聲音伺服器已安裝
已安裝 Firefox 及 文字編輯器 L3afpad
設置Xfce啟用數字鎖定鍵的方法,於 xfce4-terminal 貼上 (如最上圖)
l3afpad ~/.config/xfce4/xfconf/xfce-perchannel-xml/keyboards.xml
增加
<?xml version="1.0" encoding="UTF-8"?>
<channel name="keyboards" version="1.0">
<property name="Default" type="empty">
<property name="Numlock" type="bool" value="true"/>
</property>
</channel>
(此步驟可不作)建立文檔、下載…及本地化使用者目錄
sudo pacman -S xdg-user-dirs xdg-user-dirs-update
Arch 使用者儲存庫 (AUR)#
於 xfce4-terminal
sudo pacman -S git fakeroot make gcc
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si
cd ..
例:安裝 Google Chrome