Home > Amazon EC2 > Get GUI luxury on OpenSolaris 2008.11 EC2 Instance

Get GUI luxury on OpenSolaris 2008.11 EC2 Instance

The following instructions describes steps to access GUI on OpenSolaris EC2 Instance using VNC Viewer.

[ Step - 1]
First steps is to set xvm_vnc property to true for x11-server SMF service. For security reasons it is set to false.

On the terminal type in “svccfg” to modify the service configurations. More details on svccfg is available here.
To come out of svc prompt type in “quit” and hit enter.

root@domU-12-31-39-03-CC-A5:~# svccfg
svc:> select x11-server
svc:/application/x11/x11-server>
svc:/application/x11/x11-server> setprop options/xvm_vnc = true
svc:/application/x11/x11-server> quit

[ Step - 2]
Create .vnc directory under /root if it does not exist
root@domU-12-31-39-03-CC-A5:~# mkdir /root/.vnc/

Create /root/.vnc/xstartup file with following lines.

#!/bin/sh
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
gnome-terminal -geometry 100×60 -title “$VNCDESKTOP Desktop” &
/usr/bin/gnome-session

Note: if xstartup file is already exist, replace it with above lines to start gnome terminal session for VNC.

Provide execute permission on xtartup file.
root@domU-12-31-39-03-CC-A5:~#chmod +x /root/.vnc/xstartup

[ Step - 3]
Start the vncserver and set the password.

root@domU-12-31-39-03-CC-A5:~# vncserver

You will require a password to access your desktops.

Password:
Verify:
xauth: creating new authority file /root/.Xauthority

New ‘domU-12-31-39-03-CC-A5:1 (root)’ desktop is domU-12-31-39-03-CC-A5:1

Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/domU-12-31-39-03-CC-A5:1.log

root@domU-12-31-39-03-CC-A5:~#

[ Step - 4 ]
Here we are done with configuring EC2 instance for GUI Remote Access.
Finally we need to authorize and open the listening VNC port on the server with the ec2 group you are using with your instance.

divyen-patels-macbook:~ divyen$ ec2-authorize default -p 5901
GROUP default
PERMISSION default ALLOWS tcp 5901 5901 FROM CIDR 0.0.0.0/0
divyen-patels-macbook:~ divyen$

Screen Shots
VNC client connection configuration
Snapshot1:http://blogs.sun.com/divyen/resource/opensolaris_ec2_vnc_client_img_1.gif
Use public DNS address associated with EC2 instance as the host name.

VNC client connected to OpenSolaris 2008.11 EC2 Instance.
Snapshot2:http://blogs.sun.com/divyen/resource/opensolaris_ec2_vnc_client_img_2.gif

For more details on OpenSolaris AMIs visit http://blogs.sun.com/ec2/

Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • DZone
  • LinkedIn
  • Reddit
  • StumbleUpon
  • Technorati
  • Twitter
Categories: Amazon EC2 Tags:
  1. February 19th, 2009 at 04:08 | #1

    I had to use this line instead:
    setprop options/xvm_vnc = boolean: true
    (Type required for new properties.)

  2. February 20th, 2009 at 09:44 | #2

    Thanks for the comment Andreas!

  3. Hennie de Villiers
    July 24th, 2009 at 08:02 | #3

    If one does not use the EC2 command line tools, would it be sufficient to amend the security group using the Amazon interface or ElastiFox to open the port on the server.

    Is there anything specific that need to be done on the client machine in addition to opening the port on the server?

  4. July 24th, 2009 at 09:53 | #4

    Yes you can use aws console or firefox if you don’t want to use the command line tools. You just need to authorize and open the port on the server with the ec2 group you are using with your instance.

  5. Hennie de Villiers
    July 24th, 2009 at 10:00 | #5

    Thanks for this blog entry and your prompt response to any support questions. Even from your iPhone when you are not at your Mac.
    If there was a ten thumbs up to rate your service… I would click it without a blink…

  6. Hennie de Villiers
    July 24th, 2009 at 10:06 | #6

    Thanks for this blog entry and your prompt response to any support questions. Even from your iPhone when you are not at your Mac.
    If there was a ten thumbs up to rate your service… I would click it without a blink…

  1. No trackbacks yet.