Last active
March 24, 2024 01:15
-
-
Save jlanzobr/8580685 to your computer and use it in GitHub Desktop.
A reasonably complete KDE experience on Arch.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##install## | |
fdisk -l | |
cfdisk | |
mkswap /dev/sda2 -L Swap | |
swapon /dev/sda2 | |
mkfs.ext4 /dev/sda1 -L Linux | |
mount /dev/sda1 /mnt | |
(wifi-menu) | |
pacstrap /mnt base linux linux-firmware | |
pacstrap /mnt os-prober grub dhclient | |
genfstab -p /mnt >> /mnt/etc/fstab | |
(add discard to the SSD entry in fstab) | |
arch-chroot /mnt | |
mkinitcpio -p linux | |
grub-mkconfig -o /boot/grub/grub.cfg | |
grub-install /dev/sda | |
### EFI ONLY ### | |
pacman -S efibootmgr | |
mkdir /boot/efi | |
mount /dev/sdX1 /boot/efi (assuming efi is on sdX1 as it typically is) | |
(put the EFI directory in fstab, mounted at /boot/efi) | |
(put Windows in fstab as well, if dual booting) | |
(enable OS-PROBER in /etc/default/grub) | |
grub-install --efi-directory=/boot/efi /dev/sda | |
grub-install --target=x86_64-efi --boatloader-id=grub_uefi --recheck | |
### END EFI ONLY ### | |
passwd | |
exit | |
umount /mnt | |
reboot | |
hostnamectl set-hostname myhostnamehere | |
timedatectl set-timezone US/Eastern | |
nano /etc/locale.gen | |
(uncomment en_US and en_CA entries and save) | |
locale-gen | |
localectl set-locale LANG="en_US.UTF-8" LC_TIME="en_CA.UTF-8" LC_MEASUREMENT="en_CA.UTF-8" | |
nano /etc/environment | |
LANG=en_US.UTF-8 | |
LC_TIME=en_CA.UTF-8 | |
LC_MEASUREMENT=en_CA.UTF-8 | |
systemctl enable dhcpcd@eth0 | |
timedatectl set-local-rtc true | |
pacman -S ntp | |
systemctl enable ntpd | |
reboot | |
useradd -m -g users -s /bin/bash user | |
passwd user | |
nano /etc/pacman.conf | |
1. Under [options], add ParallelDownloads = 5 | |
2. Uncomment multilib (remove # in front) | |
pacman -Syu | |
pacman -S sudo | |
nano /etc/sudoers | |
(configure your user) | |
su user | |
sudo pacman -S --needed bash-completion multilib-devel wget git jshon make pkg-config fakeroot autoconf automake patch alsa-oss alsa-plugins alsa-utils pulseaudio pulseaudio-alsa plasma-meta smplayer kde-gtk-config sshfs encfs ntfs-3g networkmanager networkmanager-openvpn yakuake konversation dhclient oxygen-icons-svg partitionmanager p7zip aspell aspell-en cabextract curl lib32-libcurl-compat dkms expac hunspell ispell smbclient samba sqlite unrar unzip zip mono wine wine_gecko wine-mono dosbox gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly gst-libav firefox chromium kdialog sddm-kcm kde-applications libreoffice-fresh gufw xorg-xinit mesa lib32-libldap discover kdeconnect avahi nss-mdns packagekit-qt5 linux-firmware dialog netctl pkgfile miniupnpc intel-ucode ktorrent oxygen-icons bat plocate geoip mariadb caprine | |
/usr/bin/appstreamcli refresh-cache --force --verbose | |
wget https://aur.archlinux.org/cgit/aur.git/snapshot/yay.tar.gz | |
tar zxvf yay.tar.gz | |
cd yay && makepkg | |
sudo pacman -U yay<tab> | |
yay | |
nano .gnupg/gpg.conf: | |
add: keyring /etc/pacman.d/gnupg/pubring.gpg | |
When finished installing everything, free up disk space by removing package installation files: sudo rm /var/cache/pacman/pkg/* | |
sudo systemctl enable sddm | |
sudo systemctl enable NetworkManager | |
sudo mysql_install_db --user=mysql --basedir=/usr/ --ldata=/var/lib/mysql/ | |
sudo systemctl enable mysqld | |
reboot | |
##Upgrade MySQL/MariaDB tables## | |
sudo mariadb-upgrade -u root -p | |
##Pulse Audio Settings## | |
sudo nano /etc/pulse/daemon.conf: | |
exit-idle-time = -1 | |
allow-exit = no | |
sudo nano /etc/pulse/default.pa | |
add comment: # load-module module-suspend-on-idle | |
# Simultaneous output | |
load-module module-alsa-sink device=hdmi:0 | |
# load-module module-alsa-sink device=hw:1,9 [aplay -l and test the devices to determine hw:x,y id] | |
load-module module-combine-sink sink_name=combined | |
set-default-sink combined | |
# Reduce latency | |
.ifexists module-udev-detect.so | |
load-module module-udev-detect tsched=0 fixed_latency_range=yes fragments=1 fragment_size=15 | |
sudo nano /etc/pulse/system.pa | |
add comment: # load-module module-suspend-on-idle | |
##PipeWire Settings## | |
sudo cd /etc/pipewire | |
sudo mkdir media-session.d | |
sudo cp /usr/share/pipewire/media-session.d/media-session.conf /etc/pipewire/media-session.d | |
sudo nano /etc/pipewire/media-session.d/media-session.conf and comment out suspend-node | |
cd ~/.config && mkdir wireplumber && cd wireplumber/wireplumber.conf.d/ && mkdir wireplumber.conf.d && cd wireplumber/wireplumber.conf.d/ | |
nano alsa-disable-suspension.conf and add: | |
monitor.alsa.rules = [ | |
{ | |
matches = [ | |
{ | |
node.name = "~alsa_input.pci.*" | |
} | |
{ | |
node.name = "~alsa_output.pci.*" | |
} | |
] | |
actions = { | |
update-props = { | |
session.suspend-timeout-seconds = 0 | |
} | |
} | |
} | |
] | |
##Mirrorlist$$ | |
sudo nano /etc/pacman.d/mirrorlist-rankmirrors.conf and add: | |
COUNTRY=Canada | |
##Firewall## | |
sudo systemctl enable ufw | |
sudo systemctl start ufw | |
sudo ufw allow 1714:1764/udp | |
sudo ufw allow 1714:1764/tcp | |
##Yakuake## | |
Add the following to .bashrc for blurred background (also have to enable in shell Profile settings): | |
if [[ $(ps --no-header -p $PPID -o comm) =~ yakuake|emacs|emacs25 ]]; then for wid in $(xdotool search --pid $PPID); do xprop -f _KDE_NET_WM_BLUR_BEHIND_REGION 32c -set _KDE_NET_WM_BLUR_BEHIND_REGION 0 -id $wid; done fi | |
Add the following to .bashrc for cat with formatting and syntax highlighting: | |
alias cat="bat" | |
alias grep='grep --color=auto -i' | |
alias egrep='egrep --color=auto -i' | |
alias fgrep='fgrep --color=auto -i' | |
##Antivirus## | |
sudo pacman -S clamav | |
sudo systemctl enable clamd | |
sudo freshclam | |
sudo clamdscan --recursive=yes --infected / | |
sudo nano /etc/clamav/clamd.conf and add: | |
LogFile /var/log/clamav/clamd.log | |
LogTime yes | |
PidFile /run/clamav/clamd.pid | |
TemporaryDirectory /tmp | |
LocalSocket /var/lib/clamav/clamd.sock | |
User clamav | |
ExcludePath ^/proc/ | |
ExcludePath ^/sys/ | |
ExcludePath ^/dev/ | |
ExcludePath ^/mnt | |
ExtendedDetectionInfo yes | |
ScanOnAccess yes | |
OnAccessMaxFileSize 10M | |
OnAccessMountPath / | |
**Log Limits** | |
sudo nano /etc/systemd/journald.conf and set: | |
SystemMaxUse=200M | |
mysql -u root | |
show variables like 'expire_logs_days'; | |
SET GLOBAL expire_logs_days = 2; | |
##Filesharing## | |
sudo ufw allow 445/udp | |
sudo ufw allow 445/tcp | |
sudo ufw allow 135/udp | |
sudo ufw allow 135/tcp | |
sudo ufw allow 137:139/udp | |
sudo ufw allow 137:139/tcp | |
sudo ufw allow 5353/udp | |
sudo systemctl enable smbd | |
sudo systemctl enable nmbd | |
sudo nano /etc/samba/smb.conf and add the following: | |
[global] | |
workgroup = WORKGROUP | |
server string = HOSTNAME_HERE | |
netbios name = HOSTNAME_HERE | |
security = user | |
map to guest = Bad User | |
log file = /var/log/samba/%m.log | |
max log size = 50 | |
; interfaces = 192.168.1.102/24 | |
dns proxy = no | |
# Host resolution | |
name resolve order = lmhosts bcast host wins | |
client max protocol = NT1 | |
[Share_Name_here] | |
path = /share/path/here | |
public = yes | |
available = yes | |
browsable = yes | |
only guest = yes | |
writable = yes | |
sudo nano /etc/nsswitch.conf: | |
Change the hosts line to include mdns_minimal before resolve and dns | |
##Docker## | |
sudo pacman -S docker docker-compose | |
sudo nano /etc/environment: | |
TZ='America/New_York' | |
sudo groupadd docker | |
sudo usermod -aG docker ${USER} | |
sudo systemctl enable docker | |
##AMD Graphics## | |
sudo pacman -S --needed mesa mesa-libgl glu mesa-vdpau opencl-mesa libva-mesa-driver lib32-glu lib32-mesa lib32-mesa-vdpau lib32-libvdpau lib32-libva | |
If flickering occurs, create /etc/profile.d/kwin.sh containing: | |
#!/bin/sh | |
export KWIN_USE_BUFFER_AGE=0 | |
export KWIN_TRIPLE_BUFFER=1 | |
mplayer fails to start: sudo ln -s /usr/lib/libts-1.2.so.0 /usr/lib/libts-1.0.so.0 | |
akonadi fails to start: touch ~/.local/share/akonadi/db_data/ib_logfile0 | |
Cannot sign into Chromium: | |
nano ~/.config/chromium-flags.conf and add: | |
--oauth2-client-id=77185425430.apps.googleusercontent.com | |
--oauth2-client-secret=OTJgUOQcT7lO7GsGZq2G4IlT | |
GTK applications use KDE file picker | |
sudo nano /etc/environment and add: | |
GTK_USE_PORTAL=1 | |
Firefox use KDE file picker | |
about:config | |
widget.use-xdg-desktop-portal.file-picker set to 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment