From 2d2bcd64f8ed58d869b30c45171d18e5bdc84cdd Mon Sep 17 00:00:00 2001 From: Tom Barrett Date: Fri, 6 Dec 2019 09:32:46 -0600 Subject: auto x11 passthru --- lxc/roll | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'lxc') diff --git a/lxc/roll b/lxc/roll index ecd1878..f2e6cf5 100755 --- a/lxc/roll +++ b/lxc/roll @@ -6,7 +6,8 @@ lxc-create -n $NAME -t download -- --dist archlinux --release current --arch amd lxc-start -n $NAME sleep 10 lxc-attach -n $NAME -- pacman -Syu --noconfirm -lxc-attach -n $NAME -- pacman -Sy --noconfirm go git sudo fakeroot binutils make gcc patch +lxc-attach -n $NAME -- pacman -Sy --noconfirm \ + go git sudo fakeroot binutils make gcc patch vim openssh xorg-xauth xorg-xhost lxc-attach -n $NAME -- useradd tom lxc-attach -n $NAME -- mkdir /home/tom lxc-attach -n $NAME -- mkdir /home/tom/yay @@ -14,5 +15,10 @@ lxc-attach -n $NAME -- git clone https://aur.archlinux.org/yay.git /home/tom/yay lxc-attach -n $NAME -- chown tom:tom -R /home/tom lxc-attach -n $NAME -- bash -c 'echo "tom ALL=(ALL) ALL" >> /etc/sudoers' lxc-attach -n $NAME -- bash -c 'echo -e "tom\ntom" | passwd tom' -lxc-attach -n $NAME -- bash -c 'cd /home/tom/yay && sudo -u tom makepkg -si --noconfirm' -lxc-attach -n $NAME -- bash -c 'sudo -u tom yay -Syu --noconfirm' +lxc-attach -n $NAME -- bash -c 'cd /home/tom/yay && sudo -S -u tom makepkg -si --noconfirm' +lxc-attach -n $NAME -- bash -c 'sudo -S -u tom yay -Syu --noconfirm' +lxc-attach -n $NAME -- bash -c 'echo "X11Forwarding yes" >> /etc/ssh/sshd_config' +lxc-attach -n $NAME -- bash -c 'echo "AllowTcpForwarding yes" >> /etc/ssh/sshd_config' +lxc-attach -n $NAME -- bash -c 'echo "X11UseLocalhost yes" >> /etc/ssh/sshd_config' +lxc-attach -n $NAME -- systemctl start sshd +lxc-attach -n $NAME -- ip a -- cgit v1.2.3