Install VNC Client And Connect To Amazon EC2 VNC Server. The -i “/Users/……/key.pem” argument should be provided also, otherwise, it will throw the error Permission denied (publickey). Open a terminal and run the below SSH command to connect to the VNC server first.This step should be processed first before connecting the VNC client to the VNC server. Run Below SSH Command To Redirect Local Port Request To VNC Server. But each time you reboot the Linux server, you should start the VNC server manually.ģ. Run command vncserver in terminal to start it again.Press the ESC key, and then press the key :wq! in sequence to save above file changes and exit vim.X-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" & # Uncomment the following two lines for normal desktop: And change line 5 to exec sh /etc/X11/xinit/xinitrc. Uncomment below line ( line 4 and line 5 ) in.vnc/xstartup command to edit the VNC server startup file. You can see that there is a folder named.
Now you can run command pwd to get the current directory path, and ls -al to list all the files ( include hidden folders and files ) in the current directory.Run the below command to stop the VNC server.Starting applications specified in /home/ubuntu/.vnc/xstartup Xauth: file /home/ubuntu/.Xauthority does not exist You will require a password to access your desktops. Run command vncserver in the amazon ec2 ubuntu Linux ssh window, it will prompt you to enter the password for the vncserver, please remember this password, you will use it to connect to this VNC server from VNC client later.
run sudo apt-get update & sudo apt-get upgrade.This is mostly based on but has been hacked to work with systemd