Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GUI in Amazon EC2 Linux instance

I would like to use Amazon EC2 but I need to know if an AMI with Linux distribution with GUI exists.

like image 521
calejero Avatar asked Mar 25 '11 09:03

calejero


People also ask

Is there a GUI for EC2 instance?

Amazon ec2 Linux instances do not come with a GUI. By default, you need terminal access for all application configuration. Most of the developers/sysadmins working with Linux would prefer the command line over Graphical User Interface.


2 Answers

This works on RHEL 6.3 64-bit: (note: # means superuser and can be replaced by sudo)

# yum groupinstall "Desktop"    
# yum install tigervnc-server xorg-x11-fonts-Type1
# vncserver 
# chkconfig vncserver on

# vi /etc/sysconfig/vncservers 

Edit the last two lines, uncommenting them, where myuser is a created user (usually ec2-user).

VNCSERVERS="2:myuser"  
VNCSERVERARGS[2]="-geometry 1280x1024"

Save changes.

Edit iptables:

# vi /etc/iptables

Add this line:

-A INPUT -m state --state NEW -m tcp -p tcp --dport 5902 -j ACCEPT

Restart iptables:

# service iptables restart

Next, edit the xstartup file:

# vi /root/.vnc/xstartup

Make the last line be:

exec  gnome-session

To finish:

  • Reboot the instance (to reset your vncserver services)
  • Ensure the amazon security group allows tcp 5902 traffic
  • Launch a VNC Viewer such as RealVNC's on your local computer
  • Connect to public_ip:5902
like image 200
dmohr Avatar answered Sep 29 '22 02:09

dmohr


I don't know if it exits. But you can usually install a VNC server on any Linux installation, including existing AMIs. And then connect using a VNC client to get remote desktop.

Or use an NX server and client.

Or even plain X protocol, but this will be very slow.

like image 37
liori Avatar answered Sep 29 '22 01:09

liori