Skip to content

Instantly share code, notes, and snippets.

@arindampradhan
Created October 5, 2016 09:06
Show Gist options
  • Save arindampradhan/2a763c74e9c7658f63662e51314b80db to your computer and use it in GitHub Desktop.
Save arindampradhan/2a763c74e9c7658f63662e51314b80db to your computer and use it in GitHub Desktop.

Revisions

  1. arindampradhan created this gist Oct 5, 2016.
    8 changes: 8 additions & 0 deletions steps_taken.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    #!/bin/sh
    # Step 1 : Copy the above gist xstartup to .vns/xstartup. Remember the password you use for accessing the vncserver. Kill vncserver -> vncserver-kill :1
    # Step 2 : Add the port no 5901 in your ec2 security group -> Custom TCP Rule | TCP | 5901 | 0.0.0.0/0
    # Step 3 : Run tightvnc viewer, Write your public ip in remote host text box and port no. publicIp::port

    sudo apt-get install ubuntu-desktop
    sudo apt-get install vnc4server
    sudo apt-get install gnome-panel
    16 changes: 16 additions & 0 deletions xstartup
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,16 @@
    #!/bin/sh
    # Uncomment the following two lines for normal desktop:
    unset SESSION_MANAGER
    # exec /etc/X11/xinit/xinitrc

    gnome-session -session=gnome-classic
    gnome-panel

    [ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
    [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources

    xsetroot -solid grey
    vncconfig -iconic &

    x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop"
    & x-window-manager