Misc: doc, guides, Rust, Helix, Firefox, sshd
- An actual `README.md` - Reorganize dual boot guide & install and swap guides - Fix force install of Rust & Helix breaking when files already exist - A note about Firefox Wayland CPU bug - Remove deprecated `sshd_config` line
This commit is contained in:
parent
0ea42b9f04
commit
c498f0604e
32
README.md
32
README.md
@ -1,3 +1,33 @@
|
|||||||
# Dotfiles
|
# Dotfiles
|
||||||
|
|
||||||
My personal configuration files.
|
Here you can find my personal configuration files!
|
||||||
|
|
||||||
|
## Organization
|
||||||
|
|
||||||
|
- `auto`: automatic user level configuration script for common tools; reasonable defaults for every
|
||||||
|
machine, usually finishes instantly and requires minimal user intervention
|
||||||
|
- To configure everything, `cd` into the directory and run `./auto`
|
||||||
|
- To configure an individual piece, `cd` into that specific directory and run `./<name>`
|
||||||
|
- `manual`: manual user level configuration scripts; may be unsuitable for some machines, may run
|
||||||
|
for a while and may require user intervention (e.g. monitoring for errors and installing packages
|
||||||
|
like `gcc`)
|
||||||
|
- `rust`: installs the Rust programming language and adjust bash config files accordingly. May
|
||||||
|
consume ~1 GiB of disk space.
|
||||||
|
- `helix`: installs the Helix editor. May consume ~150 MiB of disk space.
|
||||||
|
- `setup`: Setup guides for Linux machines, mostly focused on Debian & Ubuntu. Includes
|
||||||
|
installation guides (dual boot or regular install) and system and user level
|
||||||
|
setups/configurations.
|
||||||
|
- `system`: system level utilities
|
||||||
|
- `mac-fnmode`: fix function keys' behavior when using Mac keyboards
|
||||||
|
- `sshd`: SSH daemon configuration
|
||||||
|
- Disables password authentication and only allow SSH public key authentication
|
||||||
|
- More secure and defeats brute force attempts on simple passwords
|
||||||
|
- Only users in the `ssh-users` group may log in and prevents remote root log in
|
||||||
|
- Defeats login attempts on system users and root
|
||||||
|
- Needs to be temporarily disabled if you need to unmount home partition
|
||||||
|
- `udev`: lock your screen when new human input devices are plugged in
|
||||||
|
- Defeats Bad USB attacks.
|
||||||
|
- `utils`: Utilities. Currently only includes a script to test for true color (24 bit) support,
|
||||||
|
typically under SSH/Mosh sessions and tmux. A smooth rainbow should be shown on correctly set up
|
||||||
|
systems.
|
||||||
|
- `*.asc`: my OpenPGP public keys
|
||||||
|
@ -21,7 +21,7 @@ fi
|
|||||||
rm -rf helix-git
|
rm -rf helix-git
|
||||||
git clone --depth 1 --branch 23.03 https://github.com/helix-editor/helix helix-git
|
git clone --depth 1 --branch 23.03 https://github.com/helix-editor/helix helix-git
|
||||||
cd helix-git
|
cd helix-git
|
||||||
cargo install --locked --path helix-term
|
cargo install -f --locked --path helix-term
|
||||||
mkdir -p ~/.config/helix
|
mkdir -p ~/.config/helix
|
||||||
rm -rf runtime/grammars/sources
|
rm -rf runtime/grammars/sources
|
||||||
mv runtime ~/.config/helix
|
mv runtime ~/.config/helix
|
||||||
|
@ -21,16 +21,16 @@ fi
|
|||||||
curl --proto '=https' --tlsv1.3 -sSf https://sh.rustup.rs | sh -s -- -y
|
curl --proto '=https' --tlsv1.3 -sSf https://sh.rustup.rs | sh -s -- -y
|
||||||
. "$HOME/.cargo/env"
|
. "$HOME/.cargo/env"
|
||||||
rustup component add rust-analyzer
|
rustup component add rust-analyzer
|
||||||
cat >> ~/.cargo/config.toml << 'EOF'
|
cat > ~/.cargo/config.toml << 'EOF'
|
||||||
[registries.crates-io]
|
[registries.crates-io]
|
||||||
protocol = "sparse"
|
protocol = "sparse"
|
||||||
EOF
|
EOF
|
||||||
mkdir -p ~/.config/rustfmt
|
mkdir -p ~/.config/rustfmt
|
||||||
cat >> ~/.config/rustfmt/rustfmt.toml << 'EOF'
|
cat > ~/.config/rustfmt/rustfmt.toml << 'EOF'
|
||||||
hard_tabs = true
|
hard_tabs = true
|
||||||
EOF
|
EOF
|
||||||
mkdir -p ~/.local/bin
|
mkdir -p ~/.local/bin
|
||||||
cat >> ~/.local/bin/rust-analyzer << 'EOF'
|
cat > ~/.local/bin/rust-analyzer << 'EOF'
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
$(rustup which rust-analyzer) "$@"
|
$(rustup which rust-analyzer) "$@"
|
||||||
EOF
|
EOF
|
||||||
|
@ -1,4 +1,69 @@
|
|||||||
# Dual Boot Ubuntu
|
# Ubuntu Installation
|
||||||
|
|
||||||
|
## Installation steps with encryption
|
||||||
|
|
||||||
|
By following these steps, you will be able to install Ubuntu with a separate `/`, `/home`, and
|
||||||
|
`/boot`, with everything encrypted except `/boot`. A disk password will be required upon boot and a
|
||||||
|
separate user password will be required.
|
||||||
|
|
||||||
|
- Booting Ubuntu 23.04 live image with `Try Ubuntu` option.
|
||||||
|
- Verify that we are using UEFI: `$ [ -d /sys/firmware/efi ] && echo UEFI ||
|
||||||
|
echo BIOS`
|
||||||
|
- Give 1 GiB (or 500 MiB if you are short on space) for `/boot` using GParted and make a partition
|
||||||
|
for `/` as well, at least around 25 GB.
|
||||||
|
- `$ sudo cryptsetup luksFormat --type luks2 --key-size 512 --hash sha512
|
||||||
|
--use-random /dev/<root partition>`
|
||||||
|
- Defaults, spell it out if you want to be extra certain:
|
||||||
|
`--cipher aes-xts-plain64 --iter-time 2000 --verify-passphrase`
|
||||||
|
- `$ sudo cryptsetup open /dev/<root partition> pvroot`
|
||||||
|
- No need to overwrite data since it is originally BitLocker encrypted and would
|
||||||
|
cause loss of performance and lifespan of the SSD.
|
||||||
|
- `$ sudo pvcreate /dev/mapper/pvroot`
|
||||||
|
- `$ sudo vgcreate vgroot /dev/mapper/pvroot`
|
||||||
|
- `$ sudo lvcreate -n lvhome -L 10G vgroot` (`G` refers to GiB according to the
|
||||||
|
man page)
|
||||||
|
- Remember to monitor disk usage and when prompted, live extend the LVs!
|
||||||
|
- `$ sudo lvcreate -n lvroot -L 15G vgroot`
|
||||||
|
- Start the Ubuntu installation from the shortcut icon on Desktop.
|
||||||
|
- Choose extra software and set a password.
|
||||||
|
- Choose `Something else`.
|
||||||
|
- Format `/dev/<boot partition>` as ext4 and mount to `/boot`.
|
||||||
|
- Format `/dev/mapper/vgroot-lvroot` as ext4 and mount to `/`.
|
||||||
|
- Format `/dev/mapper/vgroot-lvhome` as ext4 and mount to `/home`.
|
||||||
|
- Choose the main disk (e.g. `/dev/sda` or `/dev/nvme0n1p2`) as the `Device for boot loader
|
||||||
|
installation`.
|
||||||
|
- Name the partitions if you are feeling fancy.
|
||||||
|
- Once the installation is complete, click `Continue Testing` to make necessary
|
||||||
|
changes to load the encrypted partitions at startup.
|
||||||
|
- Make note of the UUID: `$ blkid /dev/<pvroot-partition>`
|
||||||
|
- Mount the installed Ubuntu OS on `/mnt` and use `chroot` to change the root
|
||||||
|
directory to `/mnt`.
|
||||||
|
```
|
||||||
|
$ sudo mount /dev/mapper/vgroot-lvroot /mnt
|
||||||
|
$ sudo mount /dev/<boot partition> /mnt/boot
|
||||||
|
$ sudo mount --bind /dev /mnt/dev
|
||||||
|
$ sudo chroot /mnt
|
||||||
|
# mount -t proc proc /proc
|
||||||
|
# mount -t sysfs sys /sys
|
||||||
|
# mount -t devpts devpts /dev/pts
|
||||||
|
```
|
||||||
|
- In the chroot: `# vi /etc/crypttab`
|
||||||
|
- Add the following lines to it (replacing `<UUID_PVROOT>` from the value
|
||||||
|
obtained from `blkid` command earlier):
|
||||||
|
```
|
||||||
|
# <target name> <source device> <key file> <options>
|
||||||
|
pvroot UUID=<UUID_PVROOT> none luks,discard
|
||||||
|
```
|
||||||
|
- This guide assumes you have an SSD so we have `discard`.
|
||||||
|
- Update the Linux kernel to load encrypted partitions at startup: `#
|
||||||
|
update-initramfs -k all -c`
|
||||||
|
- Exit the chroot shell.
|
||||||
|
- Reboot.
|
||||||
|
- Select Enroll MOK at the blue screen MOK manager. Be quick! After a minute
|
||||||
|
or so it would reboot and you only get one chance.
|
||||||
|
- Select continue and yes.
|
||||||
|
|
||||||
|
## Dual Boot
|
||||||
|
|
||||||
Here are my personal notes back when I first dual booted Ubuntu, with some
|
Here are my personal notes back when I first dual booted Ubuntu, with some
|
||||||
updates sprinkled in. Use with caution and **backup everything on another
|
updates sprinkled in. Use with caution and **backup everything on another
|
||||||
@ -10,7 +75,7 @@ This guide was first written for Ubuntu 18.04 LTS so some claims may no longer
|
|||||||
be true (please let me know if it is false). Doing this guide we'll dual boot
|
be true (please let me know if it is false). Doing this guide we'll dual boot
|
||||||
Ubuntu and Windows 10 with setup for encryption of root and home mounts.
|
Ubuntu and Windows 10 with setup for encryption of root and home mounts.
|
||||||
|
|
||||||
## Questions before we begin
|
### Questions before we begin
|
||||||
|
|
||||||
You need to think about these things before you do anything. I have attached my
|
You need to think about these things before you do anything. I have attached my
|
||||||
personal answers below but it might be different for you.
|
personal answers below but it might be different for you.
|
||||||
@ -85,66 +150,7 @@ personal answers below but it might be different for you.
|
|||||||
19.04](https://medium.com/@chrishantha/encrypting-disks-on-ubuntu-19-04-b50bfc65182a)
|
19.04](https://medium.com/@chrishantha/encrypting-disks-on-ubuntu-19-04-b50bfc65182a)
|
||||||
- With these questions answered, we can perform the installation.
|
- With these questions answered, we can perform the installation.
|
||||||
|
|
||||||
## Installation
|
### Post Install
|
||||||
|
|
||||||
- Booting Ubuntu 22.10 live image with `Try Ubuntu` option.
|
|
||||||
- Verify that we are using UEFI: `$ [ -d /sys/firmware/efi ] && echo UEFI ||
|
|
||||||
echo BIOS`
|
|
||||||
- Give 1 GiB (or 500 MiB if you are short on space) for `/boot` using GParted and make a partition
|
|
||||||
for `/` as well, at least around 25 GB.
|
|
||||||
- `$ sudo cryptsetup luksFormat --type luks2 --key-size 512 --hash sha512
|
|
||||||
--use-random /dev/<root partition>`
|
|
||||||
- Defaults, spell it out if you want to be extra certain:
|
|
||||||
`--cipher aes-xts-plain64 --iter-time 2000 --verify-passphrase`
|
|
||||||
- `$ sudo cryptsetup open /dev/<root partition> pvroot`
|
|
||||||
- No need to overwrite data since it is originally BitLocker encrypted and would
|
|
||||||
cause loss of performance and lifespan of the SSD.
|
|
||||||
- `$ sudo pvcreate /dev/mapper/pvroot`
|
|
||||||
- `$ sudo vgcreate vgroot /dev/mapper/pvroot`
|
|
||||||
- `$ sudo lvcreate -n lvhome -L 10G vgroot` (`G` refers to GiB according to the
|
|
||||||
man page)
|
|
||||||
- Remember to monitor disk usage and when prompted, live extend the LVs!
|
|
||||||
- `$ sudo lvcreate -n lvroot -L 15G vgroot`
|
|
||||||
- Start the Ubuntu installation from the shortcut icon on Desktop.
|
|
||||||
- Choose extra software and set a password.
|
|
||||||
- Choose `Something else`.
|
|
||||||
- Format `/dev/<boot partition>` as ext4 and mount to `/boot`.
|
|
||||||
- Format `/dev/mapper/vgroot-lvroot` as ext4 and mount to `/`.
|
|
||||||
- Format `/dev/mapper/vgroot-lvhome` as ext4 and mount to `/home`.
|
|
||||||
- Choose the main disk (e.g. `/dev/sda` or `/dev/nvme0n1p2`) as the `Device for boot loader
|
|
||||||
installation`.
|
|
||||||
- Name the parititions if you are feeling fancy.
|
|
||||||
- Once the installation is complete, click `Continue Testing` to make necessary
|
|
||||||
changes to load the encrypted partitions at startup.
|
|
||||||
- Make note of the UUID: `$ blkid /dev/<root partition>`
|
|
||||||
- Mount the installed Ubuntu OS on `/mnt` and use `chroot` to change the root
|
|
||||||
directory to `/mnt`.
|
|
||||||
```
|
|
||||||
$ sudo mount /dev/mapper/vgroot-lvroot /mnt
|
|
||||||
$ sudo mount /dev/<boot partition> /mnt/boot
|
|
||||||
$ sudo mount --bind /dev /mnt/dev
|
|
||||||
$ sudo chroot /mnt
|
|
||||||
# mount -t proc proc /proc
|
|
||||||
# mount -t sysfs sys /sys
|
|
||||||
# mount -t devpts devpts /dev/pts
|
|
||||||
```
|
|
||||||
- In the chroot: `# vi /etc/crypttab`
|
|
||||||
- Add the following lines to it (replacing `<UUID_PVROOT>` from the value
|
|
||||||
obtained from `blkid` command earlier):
|
|
||||||
```
|
|
||||||
# <target name> <source device> <key file> <options>
|
|
||||||
pvroot UUID=<UUID_PVROOT> none luks,discard
|
|
||||||
```
|
|
||||||
- This guide assumes you have an SSD so we have `discard`.
|
|
||||||
- Update the Linux kernel to load encrypted partitions at startup: `#
|
|
||||||
update-initramfs -k all -c`
|
|
||||||
- Exit the chroot shell.
|
|
||||||
- Reboot.
|
|
||||||
- Select Enroll MOK at the blue screen MOK manager. Be quick! After a minute
|
|
||||||
or so it would reboot and you only get one chance.
|
|
||||||
- Select continue and yes.
|
|
||||||
|
|
||||||
## Post Install
|
|
||||||
|
|
||||||
- Adjust the boot sequence in UEFI if you want to boot Windows first.
|
- Adjust the boot sequence in UEFI if you want to boot Windows first.
|
||||||
- `$ timedatectl set-local-rtc 1 --adjust-system-clock` to prevent different
|
- `$ timedatectl set-local-rtc 1 --adjust-system-clock` to prevent different
|
@ -1,18 +1,19 @@
|
|||||||
# Ubuntu Setup
|
# Ubuntu Setup
|
||||||
|
|
||||||
Here's my personal Ubuntu 22.10 setup. (Make sure to enable Wayland on Nvidia!)
|
Here's my personal Ubuntu 23.04 setup. (Make sure to use Wayland on Nvidia!)
|
||||||
|
|
||||||
|
## Packages
|
||||||
|
|
||||||
- Set font size in Terminal to 15 and initial column count to 85
|
|
||||||
- Must haves:
|
- Must haves:
|
||||||
- `sudo apt install curl ddcutil deja-dup earlyoom endeavour ffmpeg flatpak git gnome-boxes \
|
- `sudo apt install curl ddcutil deja-dup earlyoom endeavour ffmpeg flatpak git gnome-boxes
|
||||||
gnome-clocks gnome-software-plugin-flatpak gnome-sound-recorder gnome-weather goldendict \
|
gnome-clocks gnome-software-plugin-flatpak gnome-sound-recorder gnome-weather goldendict
|
||||||
gparted keepassxc mpv needrestart obs-studio ripgrep shadowsocks-libev sshfs synaptic tmux \
|
gparted keepassxc mpv needrestart obs-studio ripgrep shadowsocks-libev sshfs synaptic tmux
|
||||||
trash-cli ufw vim-gtk3 vlc wl-clipboard linux-tools-generic`
|
trash-cli ufw vim-gtk3 wl-clipboard linux-tools-generic build-essential`
|
||||||
- Optional:
|
- Optional:
|
||||||
- `sudo apt install arp-scan asciinema bookworm foliate gimp gnome-firmware gnome-games \
|
- `sudo apt install arp-scan asciinema bookworm foliate gimp gnome-firmware gnome-games
|
||||||
gnome-nettool gnome-packagekit gnome-passwordsafe gnome-shell-pomodoro gnome-usage gthumb \
|
gnome-nettool gnome-packagekit gnome-passwordsafe gnome-shell-pomodoro gnome-usage gthumb
|
||||||
heif-gdk-pixbuf heif-thumbnailer mkvtoolnix-gui openjdk-17-jdk pulseeffectsqpdf ranger \
|
heif-gdk-pixbuf heif-thumbnailer mkvtoolnix-gui openjdk-17-jdk pulseeffectsqpdf ranger
|
||||||
syncplay virtualbox-qt`
|
syncplay virtualbox-qt vlc audacity f3`
|
||||||
- Remove all snaps:
|
- Remove all snaps:
|
||||||
- ```
|
- ```
|
||||||
# if this command fails, do the following then try again:
|
# if this command fails, do the following then try again:
|
||||||
@ -21,23 +22,13 @@ Here's my personal Ubuntu 22.10 setup. (Make sure to enable Wayland on Nvidia!)
|
|||||||
sudo apt-mark hold snapd
|
sudo apt-mark hold snapd
|
||||||
trash ~/snap
|
trash ~/snap
|
||||||
```
|
```
|
||||||
- FlatHub:
|
- Enable FlatHub:
|
||||||
- `flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo`
|
- `flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo`
|
||||||
- Allocate 8GiB for swap
|
- `earlyoom` config: edit `/etc/default/earlyoom` and add:
|
||||||
```
|
|
||||||
# if /swapfile already exists
|
|
||||||
sudo swapoff /swapfile
|
|
||||||
sudo fallocate -l 8GiB /swapfile
|
|
||||||
sudo chmod 0600 /swapfile
|
|
||||||
sudo mkswap /swapfile
|
|
||||||
sudo swapon /swapfile
|
|
||||||
echo '/swapfile none swap defaults 0 0' | sudo tee -a /etc/fstab > /dev/null
|
|
||||||
```
|
|
||||||
- Early OOM config: edit `/etc/default/earlyoom` and add:
|
|
||||||
- `--avoid
|
- `--avoid
|
||||||
'(^|/)(systemd|sshd|mosh-server|ssh|vim|sudo|sudoedit|gnome-shell|gnome-terminal-)$'
|
'(^|/)(systemd|sshd|mosh-server|ssh|vim|sudo|sudoedit|gnome-shell|gnome-terminal-)$'
|
||||||
--prefer '(^|/)(Web Content|Isolated Web Co)$'`
|
--prefer '(^|/)(Web Content|Isolated Web Co)$'`
|
||||||
- ddcutil:
|
- `ddcutil` for monitor brightness shortcuts:
|
||||||
- `sudo usermod -aG i2c $(whoami)`
|
- `sudo usermod -aG i2c $(whoami)`
|
||||||
- External Monitor Brightness Up: `ddcutil setvcp 10 + 10`
|
- External Monitor Brightness Up: `ddcutil setvcp 10 + 10`
|
||||||
- External Monitor Brightness Down: `ddcutil setvcp 10 - 10`
|
- External Monitor Brightness Down: `ddcutil setvcp 10 - 10`
|
||||||
@ -65,16 +56,6 @@ Here's my personal Ubuntu 22.10 setup. (Make sure to enable Wayland on Nvidia!)
|
|||||||
- <https://github.com/gyunaev/birdtray/issues/430>
|
- <https://github.com/gyunaev/birdtray/issues/430>
|
||||||
- Hiding: check all except hide/show by clicking icon
|
- Hiding: check all except hide/show by clicking icon
|
||||||
|
|
||||||
## UFW
|
|
||||||
|
|
||||||
`$ sudo ufw enable`
|
|
||||||
|
|
||||||
## Wayland, if it doesn't show up
|
|
||||||
|
|
||||||
- `sudoedit /usr/lib/udev/rules.d/61-gdm.rules` and comment the two uncommented
|
|
||||||
lines
|
|
||||||
- Reboot or restart gdm3 (didn't try)
|
|
||||||
|
|
||||||
## Apps
|
## Apps
|
||||||
|
|
||||||
- gnome-tweaks
|
- gnome-tweaks
|
||||||
@ -91,20 +72,10 @@ Here's my personal Ubuntu 22.10 setup. (Make sure to enable Wayland on Nvidia!)
|
|||||||
- `flatpak install flathub com.github.tchx84.Flatseal`
|
- `flatpak install flathub com.github.tchx84.Flatseal`
|
||||||
- Firefox
|
- Firefox
|
||||||
- `flatpak install flathub org.mozilla.firefox`
|
- `flatpak install flathub org.mozilla.firefox`
|
||||||
- Use Wayland for correct fractional scaling:
|
- Use Wayland for correct fractional scaling and less bugginess
|
||||||
`sudo flatpak override --socket=wayland --env=MOZ_ENABLE_WAYLAND=1
|
`sudo flatpak override --socket=wayland --env=MOZ_ENABLE_WAYLAND=1 org.mozilla.firefox`
|
||||||
org.mozilla.firefox`
|
|
||||||
- OBS Studio
|
|
||||||
- `$ sudo apt install qtwayland5`
|
|
||||||
- On Ubuntu <22.10, in `/usr/share/applications/com.obsproject.Studio.desktop`, replace
|
|
||||||
`Exec=obs` with `Exec=sh -c '[ "$XDG_SESSION_TYPE" = "wayland" ] && obs
|
|
||||||
-platform wayland || obs'`
|
|
||||||
- Xournal++
|
- Xournal++
|
||||||
- `sudo apt install xournalpp texlive-latex-extra`
|
- `sudo apt install xournalpp texlive-latex-extra`
|
||||||
- < Ubuntu 22.04
|
|
||||||
- `flatpak install flathub com.github.xournalpp.xournalpp`
|
|
||||||
- `flatpak install flathub org.freedesktop.Sdk.Extension.texlive` and
|
|
||||||
choose newest (21.08 at time of writing) for LaTeX support.
|
|
||||||
- cameractrls
|
- cameractrls
|
||||||
- `flatpak install hu.irl.cameractrls`
|
- `flatpak install hu.irl.cameractrls`
|
||||||
- Minecraft
|
- Minecraft
|
||||||
@ -116,9 +87,13 @@ Here's my personal Ubuntu 22.10 setup. (Make sure to enable Wayland on Nvidia!)
|
|||||||
- `flatpak install flathub com.discordapp.Discord`
|
- `flatpak install flathub com.discordapp.Discord`
|
||||||
- Slack
|
- Slack
|
||||||
- `flatpak install flathub com.slack.Slack`
|
- `flatpak install flathub com.slack.Slack`
|
||||||
|
- Denaro
|
||||||
|
- `flatpak install flathub org.nickvision.money`
|
||||||
|
|
||||||
## Optional Apps
|
## Optional Apps
|
||||||
|
|
||||||
|
- Zoom
|
||||||
|
- `flatpak install flathub us.zoom.Zoom`
|
||||||
- Impatience (adjust Gnome animation speed)
|
- Impatience (adjust Gnome animation speed)
|
||||||
- `sudo apt install gnome-shell-extension-impatience`
|
- `sudo apt install gnome-shell-extension-impatience`
|
||||||
- Enable in extensions and set speed to 0.7
|
- Enable in extensions and set speed to 0.7
|
||||||
@ -136,7 +111,7 @@ Here's my personal Ubuntu 22.10 setup. (Make sure to enable Wayland on Nvidia!)
|
|||||||
`https://extensions.gnome.org/extension/750/openweather/`
|
`https://extensions.gnome.org/extension/750/openweather/`
|
||||||
- Set location to La Jolla
|
- Set location to La Jolla
|
||||||
- Switch to metric units
|
- Switch to metric units
|
||||||
- VSCodium
|
- VS Codium
|
||||||
- `flatpak install flathub com.vscodium.codium`
|
- `flatpak install flathub com.vscodium.codium`
|
||||||
- Birdtray
|
- Birdtray
|
||||||
- `$ sudo apt install birdtray`
|
- `$ sudo apt install birdtray`
|
||||||
@ -155,80 +130,108 @@ Here's my personal Ubuntu 22.10 setup. (Make sure to enable Wayland on Nvidia!)
|
|||||||
- Enabled `Mark modified (*)`
|
- Enabled `Mark modified (*)`
|
||||||
- Disable both `Save files on frame deactivation` and `Save files
|
- Disable both `Save files on frame deactivation` and `Save files
|
||||||
automatically if application is idle`
|
automatically if application is idle`
|
||||||
- Zoom
|
|
||||||
- `flatpak install flathub us.zoom.Zoom`
|
|
||||||
|
|
||||||
## Grub background
|
## Services & System configs
|
||||||
|
|
||||||
### Tool
|
### Swap partition/file
|
||||||
|
|
||||||
- `$ sudo apt install grub-customizer`
|
- Allocate 16 GiB for LVM swap partition (if not set during installation):
|
||||||
- Put in background manually
|
|
||||||
|
|
||||||
### Manual Script
|
|
||||||
|
|
||||||
```
|
|
||||||
sudo mkdir /opt/grub
|
|
||||||
sudo cp -r background/ /boot/grub/
|
|
||||||
sudo chown -R root:root /opt/grub
|
|
||||||
sudo chmod -R 700 /opt/grub
|
|
||||||
```
|
|
||||||
|
|
||||||
- Add the following lines to `/opt/grub/cycle-backgrounds.sh`:
|
|
||||||
```
|
```
|
||||||
#!/bin/sh
|
sudo lvcreate -n lvswap-ubuntu-23.04 -L 16G -C y vgroot
|
||||||
cd /boot/grub/background
|
# note down UUID:
|
||||||
mv background.png tmp.png
|
sudo mkswap /dev/mapper/vgroot-lvswap--ubuntu--23.04
|
||||||
mv background-1.png background.png
|
echo 'UUID=<UUID> none swap swap 0 0' | sudo tee -a /etc/fstab > /dev/null
|
||||||
mv tmp.png background-1.png
|
sudo swapon -a
|
||||||
|
```
|
||||||
|
- Or, allocate 8 GiB for swapfile:
|
||||||
|
```
|
||||||
|
# if /swapfile already exists
|
||||||
|
sudo swapoff /swapfile
|
||||||
|
sudo fallocate -l 8GiB /swapfile
|
||||||
|
sudo chmod 0600 /swapfile
|
||||||
|
sudo mkswap /swapfile
|
||||||
|
sudo swapon /swapfile
|
||||||
|
echo '/swapfile none swap defaults 0 0' | sudo tee -a /etc/fstab > /dev/null
|
||||||
```
|
```
|
||||||
- `$ sudo chown root:root /opt/grub/cycle-backgrounds.sh`
|
|
||||||
- `$ sudo chmod 700 /opt/grub/cycle-backgrounds.sh`
|
|
||||||
- Add `@reboot /opt/grub/cycle-backgrounds.sh` to root crontab.
|
|
||||||
- In `/etc/default/grub`:
|
|
||||||
- Add `GRUB_BACKGROUND=/boot/grub/background/background.png`
|
|
||||||
- Change `GRUB_TIMEOUT=10` to `GRUB_TIMEOUT=3`
|
|
||||||
- `$ sudo update-grub`
|
|
||||||
|
|
||||||
## OpenSSH Server & Mosh
|
### UFW
|
||||||
|
|
||||||
|
`$ sudo ufw enable`
|
||||||
|
|
||||||
|
### OpenSSH Server & Mosh
|
||||||
|
|
||||||
|
Installation and configuration:
|
||||||
```
|
```
|
||||||
# trusted PPA from mosh developer for truecolor support
|
|
||||||
sudo add-apt-repository ppa:keithw/mosh-dev
|
|
||||||
sudo apt install -y openssh-server mosh
|
sudo apt install -y openssh-server mosh
|
||||||
sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config.bak
|
sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config.bak
|
||||||
sudo cp ../system/sshd/sshd_config /etc/ssh/sshd_config
|
sudo cp ../system/sshd/sshd_config /etc/ssh/sshd_config
|
||||||
sudo groupadd --system ssh-users
|
sudo groupadd --system ssh-users
|
||||||
sudo usermod -aG ssh-users $(whoami)
|
sudo usermod -aG ssh-users $(whoami)
|
||||||
mkdir -p ~/.ssh
|
sudo systemctl enable sshd --now
|
||||||
chmod 700 ~/.ssh
|
|
||||||
touch ~/.ssh/authorized_keys
|
|
||||||
chmod 600 ~/.ssh/authorized_keys
|
|
||||||
# insert your SSH public keys into the file
|
|
||||||
sudo ufw limit OpenSSH
|
|
||||||
sudo ufw allow 60001:60999/udp
|
|
||||||
sudo systemctl reload sshd
|
sudo systemctl reload sshd
|
||||||
```
|
```
|
||||||
|
|
||||||
## See logs as admin (if not yet in `adm` group)
|
Firewall:
|
||||||
|
```
|
||||||
|
sudo ufw limit OpenSSH
|
||||||
|
sudo ufw allow 60001:60999/udp
|
||||||
|
```
|
||||||
|
|
||||||
|
Per user:
|
||||||
|
```
|
||||||
|
mkdir -p ~/.ssh
|
||||||
|
chmod 700 ~/.ssh
|
||||||
|
# insert your SSH public keys into this file
|
||||||
|
touch ~/.ssh/authorized_keys
|
||||||
|
chmod 600 ~/.ssh/authorized_keys
|
||||||
|
```
|
||||||
|
|
||||||
|
### My system level dotfiles
|
||||||
|
|
||||||
|
See the `system` folder and run each script as they apply to your installation.
|
||||||
|
|
||||||
|
### See logs as admin (if not yet in `adm` group)
|
||||||
|
|
||||||
`sudo usermod -aG adm $(whoami)`
|
`sudo usermod -aG adm $(whoami)`
|
||||||
|
|
||||||
## Proton black screen fix (?)
|
## Legacy
|
||||||
|
|
||||||
Source:
|
### For old Ubuntu versions
|
||||||
<https://github.com/ValveSoftware/steam-runtime/issues/312#issuecomment-739441559>
|
|
||||||
|
|
||||||
```
|
- OBS Studio
|
||||||
sudo mv /usr/share/vulkan/icd.d/intel_icd.x86_64.json \
|
- On Ubuntu <= 22.10, fixed in 23.04:
|
||||||
/usr/share/vulkan/icd.d/intel_icd.x86_64.json.disabled
|
- `$ sudo apt install qtwayland5`
|
||||||
```
|
- On Ubuntu < 22.10, in `/usr/share/applications/com.obsproject.Studio.desktop`, replace
|
||||||
|
`Exec=obs` with `Exec=sh -c '[ "$XDG_SESSION_TYPE" = "wayland" ] && obs
|
||||||
|
-platform wayland || obs'`
|
||||||
|
- Xournal++
|
||||||
|
- < Ubuntu 22.04
|
||||||
|
- `flatpak install flathub com.github.xournalpp.xournalpp`
|
||||||
|
- `flatpak install flathub org.freedesktop.Sdk.Extension.texlive` and
|
||||||
|
choose newest (21.08 at time of writing) for LaTeX support.
|
||||||
|
- OpenSSH server config deprecated alias for `KbdInteractiveAuthentication`
|
||||||
|
- `ChallengeResponseAuthentication`
|
||||||
|
- Mosh: trusted PPA from mosh developer for truecolor support
|
||||||
|
- < Ubuntu 23.04
|
||||||
|
- `sudo add-apt-repository ppa:keithw/mosh-dev`
|
||||||
|
- Firefox
|
||||||
|
- < 23.04
|
||||||
|
- Forcing Wayland in Flatpak Firefox may consume more CPU in certain cases with gnome-shell
|
||||||
|
taking close to 100% CPU
|
||||||
|
- Digimend for Huion tablet (works with H640p)
|
||||||
|
- \>= 21.10 & using Wayland: no longer necessary
|
||||||
|
- = 21.04:
|
||||||
|
- `$ sudo apt install digimend-dkms`
|
||||||
|
- Reboot.
|
||||||
|
- < 21.04:
|
||||||
|
- Download and install from
|
||||||
|
`https://github.com/DIGImend/digimend-kernel-drivers`.
|
||||||
|
- Nvidia proprietary driver screen tearing fix
|
||||||
|
- Ubuntu < 22.04
|
||||||
|
- `echo 'options nvidia-drm modeset=1' | sudo tee /etc/modprobe.d/nvidia-drm-nomodeset.conf
|
||||||
|
> /dev/null`
|
||||||
|
|
||||||
## Proprietary encodings (?)
|
## Dual booting with Windows
|
||||||
|
|
||||||
- `$ sudo apt install ubuntu-restricted-extras`
|
|
||||||
|
|
||||||
## Dual boot
|
|
||||||
|
|
||||||
### Dislocker
|
### Dislocker
|
||||||
|
|
||||||
@ -260,33 +263,69 @@ $ sudo dislocker /dev/nvmen1p6 -p -- /mnt/dislocker
|
|||||||
$ sudo mount -o loop /mnt/dislocker/dislocker-file /media/"$(whoami)"
|
$ sudo mount -o loop /mnt/dislocker/dislocker-file /media/"$(whoami)"
|
||||||
```
|
```
|
||||||
|
|
||||||
## Hardware specific
|
### Unused
|
||||||
|
|
||||||
### Nvidia proprietary driver screen tearing fix
|
#### Wayland, if it doesn't show up
|
||||||
|
|
||||||
For Ubuntu < 22.04: `echo 'options nvidia-drm modeset=1' | sudo tee
|
- `sudoedit /usr/lib/udev/rules.d/61-gdm.rules` and comment the two uncommented
|
||||||
/etc/modprobe.d/nvidia-drm-nomodeset.conf > /dev/null`
|
lines
|
||||||
|
- Reboot or restart gdm3 (didn't try)
|
||||||
|
|
||||||
### Digimend for Huion tablet (works with H640p)
|
|
||||||
|
|
||||||
- \>= 21.10 & using wayland: no longer necessary
|
#### Razer mouse
|
||||||
- = 21.04:
|
|
||||||
- `$ sudo apt install digimend-dkms`
|
|
||||||
- Reboot.
|
|
||||||
- < 21.04:
|
|
||||||
- Download and install from
|
|
||||||
`https://github.com/DIGImend/digimend-kernel-drivers`.
|
|
||||||
|
|
||||||
### Razer mouse
|
|
||||||
|
|
||||||
```
|
```
|
||||||
sudo add-apt-repository ppa:polychromatic/stable
|
sudo add-apt-repository ppa:polychromatic/stable
|
||||||
sudo apt install openrazer-meta polychromatic
|
sudo apt install openrazer-meta polychromatic
|
||||||
```
|
```
|
||||||
|
|
||||||
## Workarounds
|
#### Grub background
|
||||||
|
|
||||||
- [Blanked screen doesn't wake up after locking \[drmModeAtomicCommit: Argument
|
Tool:
|
||||||
invalide\] \[drmModeAtomicCommit: Invalid
|
- `$ sudo apt install grub-customizer`
|
||||||
argument\]](https://bugs.launchpad.net/ubuntu/+source/mutter/+bug/1968040)
|
- Put in background manually
|
||||||
|
|
||||||
|
Manual Script:
|
||||||
|
```
|
||||||
|
sudo mkdir /opt/grub
|
||||||
|
sudo cp -r background/ /boot/grub/
|
||||||
|
sudo chown -R root:root /opt/grub
|
||||||
|
sudo chmod -R 700 /opt/grub
|
||||||
|
```
|
||||||
|
|
||||||
|
- Add the following lines to `/opt/grub/cycle-backgrounds.sh`:
|
||||||
|
```
|
||||||
|
#!/bin/sh
|
||||||
|
cd /boot/grub/background
|
||||||
|
mv background.png tmp.png
|
||||||
|
mv background-1.png background.png
|
||||||
|
mv tmp.png background-1.png
|
||||||
|
```
|
||||||
|
- `$ sudo chown root:root /opt/grub/cycle-backgrounds.sh`
|
||||||
|
- `$ sudo chmod 700 /opt/grub/cycle-backgrounds.sh`
|
||||||
|
- Add `@reboot /opt/grub/cycle-backgrounds.sh` to root crontab.
|
||||||
|
- In `/etc/default/grub`:
|
||||||
|
- Add `GRUB_BACKGROUND=/boot/grub/background/background.png`
|
||||||
|
- Change `GRUB_TIMEOUT=10` to `GRUB_TIMEOUT=3`
|
||||||
|
- `$ sudo update-grub`
|
||||||
|
|
||||||
|
#### Proton black screen fix
|
||||||
|
|
||||||
|
Source:
|
||||||
|
<https://github.com/ValveSoftware/steam-runtime/issues/312#issuecomment-739441559>
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo mv /usr/share/vulkan/icd.d/intel_icd.x86_64.json \
|
||||||
|
/usr/share/vulkan/icd.d/intel_icd.x86_64.json.disabled
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Proprietary encodings
|
||||||
|
|
||||||
|
- `$ sudo apt install ubuntu-restricted-extras`
|
||||||
|
|
||||||
|
#### Blank screen workaround
|
||||||
|
|
||||||
|
[Blanked screen doesn't wake up after locking \[drmModeAtomicCommit: Argument
|
||||||
|
invalide\] \[drmModeAtomicCommit: Invalid
|
||||||
|
argument\]](https://bugs.launchpad.net/ubuntu/+source/mutter/+bug/1968040)
|
||||||
- Put `MUTTER_DEBUG_ENABLE_ATOMIC_KMS=0` in `/etc/environment`
|
- Put `MUTTER_DEBUG_ENABLE_ATOMIC_KMS=0` in `/etc/environment`
|
||||||
|
@ -3,9 +3,12 @@
|
|||||||
This document includes configuration that is per user and remembered in the home
|
This document includes configuration that is per user and remembered in the home
|
||||||
directory.
|
directory.
|
||||||
|
|
||||||
- Clone the terminal configs
|
## Terminal
|
||||||
- `git clone https://git.duckduckwhale.com/DuckDuckWhale/dotfiles`
|
|
||||||
- Open Vim and type `:PlugInstall`
|
- Set font size in Terminal to 15 and initial column count to 85
|
||||||
|
- `git clone https://git.duckduckwhale.com/DuckDuckWhale/dotfiles && cd dotfiles/auto && ./auto`
|
||||||
|
- `cd ../manual/rust && ./rust`
|
||||||
|
- `cd ../helix && ./helix`
|
||||||
|
|
||||||
## Settings
|
## Settings
|
||||||
|
|
||||||
|
@ -4,8 +4,6 @@ Port 22
|
|||||||
PermitRootLogin no
|
PermitRootLogin no
|
||||||
PubkeyAuthentication yes
|
PubkeyAuthentication yes
|
||||||
PasswordAuthentication no
|
PasswordAuthentication no
|
||||||
# deprecated alias:
|
|
||||||
# ChallengeResponseAuthentication no
|
|
||||||
KbdInteractiveAuthentication no
|
KbdInteractiveAuthentication no
|
||||||
UsePAM yes
|
UsePAM yes
|
||||||
AllowTcpForwarding yes
|
AllowTcpForwarding yes
|
||||||
|
Loading…
Reference in New Issue
Block a user