diff --git a/config/ssh/config b/config/ssh/config index 17c823b..33eac15 100644 --- a/config/ssh/config +++ b/config/ssh/config @@ -17,12 +17,16 @@ Host maxocull.com HostName maxocull.com User entourage IdentityFile ~/.ssh/id_rsa + ForwardX11 yes + ForwardX11Trusted yes Host leviathan - HostName 192.168.1.72 + HostName 192.168.1.11 #ProxyJump maxocull.com User max IdentityFile ~/.ssh/id_rsa + ForwardX11 yes + ForwardX11Trusted yes Host rb3011 HostName 192.168.1.1 @@ -38,3 +42,5 @@ host libreelec HostName 192.168.1.30 User root IdentityFile ~/.ssh/id_rsa + ForwardX11 yes + ForwardX11Trusted yes diff --git a/install.sh b/install.sh index baa5c8f..1754304 100755 --- a/install.sh +++ b/install.sh @@ -113,11 +113,13 @@ link_source "config/fontconfig/" 0 ".config/fontconfig" link_source "config/pcmanfm/" 1 ".config/pcmanfm" link_source "config/xmrig.json" 1 ".config/xmrig.json" link_source "config/redrum.ini" 1 ".config/redrum.ini" -link_source "config/mimeapps.list" 1 ".config/mimeapps.list" -link_source "config/mimeapps.list" 1 ".local/share/applications/mimeapps.list" link_source "config/btop/" 1 ".config/btop" link_source "config/Kvantum/" 1 ".config/Kvantum" +mkdir -p "${HOME}/.local/share/applications/" +link_source "config/mimeapps.list" 1 ".config/mimeapps.list" +link_source "config/mimeapps.list" 1 ".local/share/applications/mimeapps.list" + mkdir -p "${HOME}/.config/variety" link_source "config/variety/variety.conf" 1 ".config/variety/variety.conf" @@ -383,6 +385,9 @@ case "$response" in sh -c "$(curl -fsSL https://raw.githubusercontent.com/Shougo/dein-installer.vim/master/installer.sh)" -- "${HOME}/.cache/dein" --use-neovim-config fi + # Forcibly fix permissions on the GnuPG directory + chmod u+rwx,go-rwx "${HOME}/.gnupg" + # Pull GPG keys for max.ocull@protonmail.com gpg --receive-keys 9AC8DC8D17BA0401CBD0F4E16077844530A4A68E @@ -1220,6 +1225,44 @@ case "$response" in ;; esac +read -r -p "Would you like to remotely share the clipboard over SSH on this system? [y/N] " response +case "$response" in + [yY][eE][sS]|[yY]) + # install xvfb, xauth, xsel for all systems + if [[ -x "$(command -v dnf)" ]]; then + sudo dnf install -y \ + xorg-x11-server-Xvfb \ + xorg-x11-xauth \ + xsel + elif [[ -x "$(command -v apt)" ]]; then + sudo apt install -y \ + xauth \ + xvfb \ + xsel + elif [[ -x "$(command -v pacman)" ]]; then + sudo pacman -Syu --needed "$AUTOMATED_PACMAN_FLAGS" \ + xorg-xauth \ + xorg-server-xvfb \ + xsel + elif [[ -x "$(command -v pkg)" ]]; then + sudo pkg install \ + xauth \ + xorg-vfbserver \ + xsel + fi + + # ensure that X11Forwarding yes is set in /etc/ssh/sshd_config + if grep -q '^X11Forwarding no' /etc/ssh/sshd_config; then + sudo sed -i 's/^X11Forwarding no/X11Forwarding yes/' /etc/ssh/sshd_config + else + sudo echo "X11Forwarding yes" | sudo tee -a "/etc/ssh/sshd_config" + fi + ;; + *) + echo "Skipping remote clipboard setup" + ;; +esac + read -r -p "Would you like to setup system permissions? [y/N] " response case "$response" in [yY][eE][sS]|[yY])