From 5d9feac36ff6dce5996bae222b708b5d3e765080 Mon Sep 17 00:00:00 2001 From: ducoterra Date: Thu, 31 Aug 2023 08:49:57 -0400 Subject: [PATCH] Move help and deprecated to their own files --- arch/base.md | 109 ++------------------------------------------- arch/deprecated.md | 61 +++++++++++++++++++++++++ arch/gaming.md | 37 ++++++++++++--- arch/help.md | 55 +++++++++++++++++++++++ 4 files changed, 152 insertions(+), 110 deletions(-) create mode 100644 arch/deprecated.md create mode 100644 arch/help.md diff --git a/arch/base.md b/arch/base.md index 9b7c26e..6c66668 100644 --- a/arch/base.md +++ b/arch/base.md @@ -51,14 +51,6 @@ I have instructions for building a: - [CUPS Printing](#cups-printing) - [Yubikey](#yubikey) - [Bashrc](#bashrc) - - [Unecessary](#unecessary) - - [Plymouth Background Image](#plymouth-background-image) - - [Help](#help) - - [Update Grub](#update-grub) - - [Downgrading Kernel](#downgrading-kernel) - - [Deprecated](#deprecated) - - [Deprecated Security](#deprecated-security) - - [Firejail](#firejail) ## Installation @@ -762,6 +754,7 @@ AMD ```bash pacman -S vulkan-radeon libva-utils libva-mesa-driver xf86-video-amdgpu +vainfo ``` ### Power Management @@ -958,6 +951,8 @@ sudo systemctl enable --now pcscd ## Bashrc +Don't do this if you installed `zsh` + ~/.bashrc ```bash @@ -1050,100 +1045,4 @@ alias lsc='find . -type f | wc -l' ## ls sort by last modified ## alias lmt='ls -t -1' -``` - -## Unecessary - -### Plymouth Background Image - -1. `sudo cp image.png /usr/share/plymouth/themes/spinner/background-tile.png` -1. `sudo plymouth-set-default-theme -R spinner` - -## Help - -### Update Grub - -1. `grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=BOOT` -1. `cp /boot/EFI/BOOT/grubx64.efi /boot/EFI/BOOT/bootx64.efi` - -### Downgrading Kernel - -You can find old kernel versions at - -You can find old kernel-header versions at - -If you want to downgrade to a previously installed kernel you can use pacman cache: - -1. `cd /var/cache/pacman/pkg` -2. `pacman -U linux-x.x.x.arch1-1-x86_64.pkg.tar.zst linux-headers-x.x.x.arch1-1-x86_64.pkg.tar.zst` -3. `reboot` - -If you want to downgrade to a kernel that wasn't previously installed: - -1. Download linux... and linux-headers... from above -2. `pacman -U linux-x.x.x.arch1-1-x86_64.pkg.tar.zst linux-headers-x.x.x.arch1-1-x86_64.pkg.tar.zst` -3. `reboot` - -## Deprecated - -### Deprecated Security - -#### Firejail - -Don't use firejail, it's a suid binary which only runs in userspace. Apparmor does -almost exactly the same thing but runs in the kernel at boot and protects you more -completely. I'm leaving this here in case you're interested but realistically you -should just learn apparmor. - -Firejail launches supported applications in a sandboxed environment where it limits access -to system files and resources. - -For example: - -- Firefox will not be able to access more than a small subset of your home directory. -- VSCode will not be able to acces ~/.config/autostart. - -1. `sudo pacman -S firejail` -2. `sudo apparmor_parser -r /etc/apparmor.d/firejail-default` -3. `sudo firecfg` -4. `firecfg --fix` -5. `sudo rm /usr/local/bin/dnsmasq` (this fixes an issue with virsh network start) -6. Add a pacman hook to apply firejail on install - - /etc/pacman.d/hooks/firejail.hook - - ```conf - [Trigger] - Type = Path - Operation = Install - Operation = Upgrade - Operation = Remove - Target = usr/bin/* - Target = usr/share/applications/*.desktop - - [Action] - Description = Configure symlinks in /usr/local/bin based on firecfg.config... - When = PostTransaction - Depends = firejail - Exec = /bin/sh -c 'firecfg >/dev/null 2>&1' - ``` - -You can run firejail with noprofile to fix access issues (like firefox gnome connector) - -```bash -firejail --noprofile firefox -``` - -You'll probably want to enable the following - -`sudo cat /etc/firejail/firejail.config | grep -e '^[^#].*'` - -/etc/firejail/firejail.config - -```conf -browser-disable-u2f no -chroot yes -firejail-prompt yes -force-nonewprivs yes -tracelog yes -``` +``` \ No newline at end of file diff --git a/arch/deprecated.md b/arch/deprecated.md new file mode 100644 index 0000000..4c92bbe --- /dev/null +++ b/arch/deprecated.md @@ -0,0 +1,61 @@ +# Deprecated + +## Firejail + +Don't use firejail, it's a suid binary which only runs in userspace. Apparmor does +almost exactly the same thing but runs in the kernel at boot and protects you more +completely. I'm leaving this here in case you're interested but realistically you +should just learn apparmor. + +Firejail launches supported applications in a sandboxed environment where it limits access +to system files and resources. + +For example: + +- Firefox will not be able to access more than a small subset of your home directory. +- VSCode will not be able to acces ~/.config/autostart. + +1. `sudo pacman -S firejail` +2. `sudo apparmor_parser -r /etc/apparmor.d/firejail-default` +3. `sudo firecfg` +4. `firecfg --fix` +5. `sudo rm /usr/local/bin/dnsmasq` (this fixes an issue with virsh network start) +6. Add a pacman hook to apply firejail on install + + /etc/pacman.d/hooks/firejail.hook + + ```conf + [Trigger] + Type = Path + Operation = Install + Operation = Upgrade + Operation = Remove + Target = usr/bin/* + Target = usr/share/applications/*.desktop + + [Action] + Description = Configure symlinks in /usr/local/bin based on firecfg.config... + When = PostTransaction + Depends = firejail + Exec = /bin/sh -c 'firecfg >/dev/null 2>&1' + ``` + +You can run firejail with noprofile to fix access issues (like firefox gnome connector) + +```bash +firejail --noprofile firefox +``` + +You'll probably want to enable the following + +`sudo cat /etc/firejail/firejail.config | grep -e '^[^#].*'` + +/etc/firejail/firejail.config + +```conf +browser-disable-u2f no +chroot yes +firejail-prompt yes +force-nonewprivs yes +tracelog yes +``` diff --git a/arch/gaming.md b/arch/gaming.md index 87ee08a..ca9d905 100644 --- a/arch/gaming.md +++ b/arch/gaming.md @@ -36,24 +36,45 @@ Include = /etc/pacman.d/mirrorlist ``` ```bash -sudo pacman -S steam +pacman -S steam ``` -When prompted (on AMD) use vulkan-radeon +When prompted use vulkan-radeon on AMD and vulkan-intel on intel. + +### Streaming not working + + + +1. Try launching steam through the command line. This might unbreak streaming permanently +2. `pamcan -S lib32-libva-intel-driver libva-intel-driver lib32-libcanberra` + +## VSCode + +For the open source version of code install `code`: + +```bash +pacman -S code +``` ## XWayland Provides compatibility with X server applications (like wine) -1. `sudo pacman -S xorg-xwayland` +```bash +pacman -S xorg-xwayland +``` ## Wine -`pacman -S wine` +```bash +pacman -S wine +``` ## Spotify -`pacman -S spotify-launcher` +```bash +pacman -S spotify-launcher +``` ## VLC @@ -61,6 +82,12 @@ Provides compatibility with X server applications (like wine) pacman -S vlc ``` +## Remote Desktop + +```bash +pacman -S remmina freerdp +``` + ## AppImages ### Bitwarden diff --git a/arch/help.md b/arch/help.md new file mode 100644 index 0000000..3904ec0 --- /dev/null +++ b/arch/help.md @@ -0,0 +1,55 @@ +# Help + +- [Help](#help) + - [Remove unused packages](#remove-unused-packages) + - [Update Grub](#update-grub) + - [Downgrading Kernel](#downgrading-kernel) + - [Set Plymouth Background Image](#set-plymouth-background-image) + +## Remove unused packages + +Make sure to use the `-Rs` flag when removing. This will clean up deps. + +```bash +pacman -Rs package +``` + +To see a list of packages that are orphaned you can run: + +```bash +pacman -Qtdq +``` + +To remove those packages you can run + +```bash +pacman -Qtdq | pacman -Rns - +``` + +## Update Grub + +1. `grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=BOOT` +1. `cp /boot/EFI/BOOT/grubx64.efi /boot/EFI/BOOT/bootx64.efi` + +## Downgrading Kernel + +You can find old kernel versions at + +You can find old kernel-header versions at + +If you want to downgrade to a previously installed kernel you can use pacman cache: + +1. `cd /var/cache/pacman/pkg` +2. `pacman -U linux-x.x.x.arch1-1-x86_64.pkg.tar.zst linux-headers-x.x.x.arch1-1-x86_64.pkg.tar.zst` +3. `reboot` + +If you want to downgrade to a kernel that wasn't previously installed: + +1. Download linux... and linux-headers... from above +2. `pacman -U linux-x.x.x.arch1-1-x86_64.pkg.tar.zst linux-headers-x.x.x.arch1-1-x86_64.pkg.tar.zst` +3. `reboot` + +## Set Plymouth Background Image + +1. `sudo cp image.png /usr/share/plymouth/themes/spinner/background-tile.png` +1. `sudo plymouth-set-default-theme -R spinner` \ No newline at end of file