Skip to content

Instantly share code, notes, and snippets.

@lokeshsoni
Last active April 16, 2020 07:33
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 lokeshsoni/8ee25ef04edcd4043bd242fc923e299d to your computer and use it in GitHub Desktop.
Save lokeshsoni/8ee25ef04edcd4043bd242fc923e299d to your computer and use it in GitHub Desktop.
Android Studio Setup on Google Compute Engine
gcloud compute disks \
create disk1 \
--image-project ubuntu-os-cloud \
--image-family ubuntu-1804-lts \
--zone us-central1-b
gcloud compute images \
create nested-vm-image \
--source-disk disk1 \
--source-disk-zone us-central1-b \
--licenses "https://www.googleapis.com/compute/v1/projects/vm-options/global/licenses/enable-vmx"
sudo apt update
sudo apt upgrade
sudo apt install gnome-shell ubuntu-gnome-desktop autocutsel gnome-core gnome-panel gnome-themes-standard
sudo apt install tightvncserver xfonts-75dpi xfonts-100dpi
touch ~/.Xresources
tightvncserver
cat <<EOF > ~/.vnc/xstartup
#!/bin/sh
autocutsel -fork
xrdb $HOME/.Xresources
xsetroot -solid grey
export XKL_XMODMAP_DISABLE=1
export XDG_CURRENT_DESKTOP="GNOME-Flashback:Unity"
export XDG_MENU_PREFIX="gnome-flashback-"
unset DBUS_SESSION_BUS_ADDRESS
gnome-session --session=gnome-flashback-metacity --disable-acceleration-check --debug &
EOF
vncserver -kill :1
vncserver -geometry 1024x768
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment