Move help and deprecated to their own files

This commit is contained in:
ducoterra
2023-08-31 08:49:57 -04:00
parent 4604be298b
commit 5d9feac36f
4 changed files with 152 additions and 110 deletions

View File

@@ -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
@@ -1051,99 +1046,3 @@ 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 <https://archive.archlinux.org/packages/l/linux/>
You can find old kernel-header versions at <https://archive.archlinux.org/packages/l/linux-headers/>
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
```

61
arch/deprecated.md Normal file
View File

@@ -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
```

View File

@@ -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
<https://wiki.archlinux.org/title/Steam/Troubleshooting#Steam_Remote_Play_issues>
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

55
arch/help.md Normal file
View File

@@ -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 <https://archive.archlinux.org/packages/l/linux/>
You can find old kernel-header versions at <https://archive.archlinux.org/packages/l/linux-headers/>
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`