Skip to content

Instantly share code, notes, and snippets.

@loint
Created May 29, 2021 07:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save loint/2c10b0dff8647417033ca3d44184f7b9 to your computer and use it in GitHub Desktop.
Save loint/2c10b0dff8647417033ca3d44184f7b9 to your computer and use it in GitHub Desktop.
ubuntu
#!/bin/bash
touch /etc/apt/sources.list
sudo apt-get -y upgrade
sudo apt-get -y update
#install gnome desktop
sudo apt-get install ubuntu-gnome-desktop -y
#install xrdp
sudo apt-get install xrdp -y
# change access from root only to all users
sudo sed -i 's/allowed_users=console/allowed_users=anybody/' /etc/X11/Xwrapper.config
#start remote desktop session
sudo service xrdp restart
#install Azure CLI
apt-get update && sudo apt-get install -y azure-cli
logger -t devvm "Azure-cli installed: $?"
sudo apt-get -y update
#install VSCode
logger -t devvm "Installing VSCode: $?"
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg
sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'
sudo apt-get update
sudo apt-get install -y code
logger -t devvm "VSCode Installed: $?"
logger -t devvm "Success"
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment