Unable to open terminal in remote desktop after rebooting aws ubuntu ec2 instance

504 Views Asked by At

I have installed tightvncserver on my ubuntu ec2 server and I am able to get the remote desktop access but when I restart my server and connect to the ec2 remote desktop then I am not able to open the terminal.

I have installed the tightvncserver with help of this digitalocean's article https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-vnc-on-ubuntu-20-04

My xstartup looks like this

#!/bin/bash
xrdb $HOME/.Xresources
startxfce4 &
1

There are 1 best solutions below

0
On

It appears that you are running this script via the User Data field on the Amazon EC2 instance.

User data scripts only run on first boot. They do not run on subsequent boots.

You can either:

  • Install the server in some way that it automatically starts when the system starts, or
  • Put a script in /var/lib/cloud/scripts/per-boot/ -- it will automatically run on every boot