|
|
|
SearchCategories
|
Load an EC2 GUI on Your Mac OS X Box
Posted 8 months ago
in Tools of the Trade.
Using straight shell access on EC2 servers works just fine, of course, but there are images available that include the full desktop environment. If you use one of those, you can activate GUI programs on the EC2 server. Now you can't plug a monitor into your EC2 instance, so you will need to tunnel the GUI bits down to your local box. Luckily, Unix pretty much just handles all of this for you and if you can SSH into an EC2 instance and you have Apple's X11 installed, you are all set to try this. I know at one time Apple's X11 environment was an optional install. I can't remember if it still is, but you can see if you have it by looking for a program called X11 in Once you've confirmed X11 is ready, you need to fire up an EC2 instance. Create a Key Pair and configure a Security Group to at least allow SSH access. Then just launch an EC2 instance (I use the AWS Managment Console for that) with the needed desktop environment tools. I chose one of the wonderful Ubuntu Images by Eric Hammond. Once the instance is running you are past all the hard parts! All that's left is to connect to the instance, with a few more options than you probably use normally. Here's the full command:
Replace Just FYI, here are the meanings of all the switches I used:
When you're done playing around an plan to use an instance long term, I recommend creating a user, switching your Enough setup, let's get to playing! Want to browse the instance files using a GUI browser? This command will launch Nautilis:
Need to download something to the instance? You could
You get the idea. NotesAvoid the Mac conventions of going after a I also seem to need to kill my SSH session (with a control-C) after I've been using GUI applications, even though I logout normally. I'm not sure why that is. |
|
|
|
The reason for the Ctrl+C is because logging-out ends the terminal session but not any forwarding. This also occurs if you use any of the other port forwarding options (eg -D, -L or -R).
Also, seeing as you're using Eric's builds, you should give the mac NX client a go - should be faster than plain X forwarding, and you can easily get a full session.
This is great. I wonder why we aren't all renting our computer power directly at this point. You could build a little netbox just to run the GUI and have as much power as you wanted to pay for. And then have it just turn on and off the instance as you went. I was just loading up GIMP inside a instance and it worked great. Very cool.
Note: i have a really fast connection so it makes it a little smoother than the average users experience would be.
I was following along, but couldn't seem to get my DISPLAY environment variable to set on the EC2 instance having SSH'd as above... after some head banging, it turns out that it helps (a lot!) to 'yum groupinstall "X Window System"' first, if your instance didn't already have X11. :^)