Posted by: skyshab | January 11, 2009

3 Ways to Control a Headless Server From Your Dock

Having just finished building my HackBox Media Server, I started actually using it, and found myself a little perplexed at how best to access it. While setting it up, I had it hooked up to my monitor with a keyboard and mouse plugged into the front USB ports. However, my intention for this server was that it would run headless, that is, without needing the monitor/keyboard/mouse in order to interface with it.. The method with which I was most familiar, was waiting for it to show up in my Finder window under “Shared”. This worked OK, but sometimes it took a really long time to connect. Other times, it just wouldn’t connect at all. I then discovered the “Connect to Server” tab, which is in the “Go” menu of the Finder Menu Bar. I found that I could use ‘afp’ to mount the volume, and ‘vnc’ to start screen sharing. It even remembered the two addresses and my password, which made accessing my server only a couple clicks away.

Well, it wasn’t long before the Little Lazy Guy and the Wee Geek that reside in the back of my brain got together and conspired to get me to make it even easier. “What would really be nice”, I thought, “was to access my files and initiate screen sharing from my dock. In one click. Oh, and in a visually appealing way.” (Apparently, Little Lazy Guy and Wee Geek also consulted with Diminutive Design Critic)

After a half hour of Googling, I was able to figure out a pretty elegant solution. But, there was still one problem, and a big one at that. I couldn’t mount the remote volume, or access the screen of my server, if it was taking a snooze. And I didn’t want to leave it running all the time. I mean, I know its an Atom processor, which will probably only use the equivalent of a couple of drinks at Starbucks worth of electricity a year. And surely, this thing will be completely obsolete and sold on eBay 3 or 4 times before the CPU has burned through its limited-number-of-hours-lifespan. But there’s something in me (we’ll call it the Minuscule Environmentalist) that cringes at the idea of leaving it running 24/7. However, Little Lazy Guy pitches a fit at the mere thought of having to use the power button on the front of the server for wake and sleep. I mean Geez, it’s a whole 18″ away from my keyboard. I’m a busy guy! Back to Google.

I found a few scripts for waking a remote computer up. And, a way to put it to sleep that involved the sending of an email. But these weren’t necessarily the integrated ease of use solution that I was searching for. Then, I found what I was looking for. A single, simple, and free application that would allow me to sleep and wake my home server with a solitary click. We’ll start with that.

1.Wake on LAN

Wake on LAN does, well, exactly what I described above: Wakes or Sleeps a remote computer on your LAN.

The app automatically scans your local network, and shows everything it detected in a simple window.

Wake on LAN

To wake a remote machine up, you just select the machine in the window, and click “Wake”. If you don’t want to bother launching the above window for access, you can also right-click the Wake on LAN icon in your dock, and a little menu pops up from which you can select the computer to Wake/Sleep. Or, there’s also a dashboard widget.

To sleep a computer, you just need to enable “Remote Login” and “Remote Apple Events” on the computer that you’re wanting to sleep. Wake on LAN will ask you for the remote machine’s password, twice in fact, the first time you try to sleep the computer, and then stores the info securely in your keychain. However- and I don’t know if this is a bug or if there is a setting in my network that I need to change- Wake on LAN somehow ‘forgets’ my password if I quit the application. I have gotten around this by leaving it running in my dock at all times.

So, that’s basically it. There’s a few handy advanced functions, like scheduled wake/sleep and so forth, but the application is very basic and easy to figure out. There’s even a great sleep debugging tool that helps you discover the cause if the sleep function is not working for some reason.

You can read more about and download Wake on LAN HERE.

2. Mount a Remote Server Volume From Your Dock

Initially, in order for this trick to work,  you need to mount the remote volume one of the old fashioned ways, such as through the “Connect to Server” method I discussed earlier. Then, proceed to the next step.

Step one: Click on a Finder window, and press Command-Shift-G. Or alternately, in  Finder>Go,  select “Go to Folder”

Step two: Enter “/Volumes” (minus the quotes of course)

Step three: You should now see a list of mounted volumes, including the one from your remote computer. Now,  just click and drag the volume to your dock.

That’s it!

Now, as long as your server is awake, you can click on the icon in your dock, and the folders inside will be a click away. This is so simple, I almost hate to call it a “trick”. However, it’s not the most obvious thing, even if you are fairly experienced on a Mac. I also added my main hard drive to the dock this way, and found that it makes for a nice workflow.

3. One Click Screen Sharing

This trick isn’t as obvious as the last, but it is just as easy.

Step one: Open up your Browser (Firefox, Safari, whatever), and type “vnc://remote.computer.ipaddress” (obviously, type in the local ip address of the computer you want to connect to, and not the words “remote.computer…”)

DO NOT HIT RETURN!

Step two: Select the vnc address that you just typed into your browser, and drag it to your desktop. It should make a file with the extension “.vncloc”.

Now, if you’re aesthetically snobbish like I am, you’ll want to change the icon of this file before proceeding to the next step. There are several ways to do this, but I use the application CandyBar.

Step three: After changing the icon to your liking, put the file some place out of the way, like in your Documents folder. Then, just drag it to your dock.

Here is a screenshot of my dock with the  icons for opening the remote volume and launching the screen sharing window.

screenshot-3-ways

Ta-dahh!

You can now wake your headless server, open up a vnc screen, easily access your files, and put your server back to sleep, all from your dock, and with just a few clicks! You just saved like, 3 seconds of your life! Now you have the spare time to write that novel you’ve been wanting to start. Or a blog post or something.

Tiny Time Management Guru is pleased.

Advertisements

Responses

  1. Hi,

    your hackintosh case is sold with 110/230V PSU (i am from EU, and the EU standard is 230V)?
    Can you post me the xbench results of your build?

    p.s: where i can buy that sexy hackintosh sticker?

  2. […] and Sleep a Media Server from your iPhone In a previous post, “3 Ways to Control a Headless Server From Your Dock“, I detailed ways of waking/sleeping a server, and mounting the desired volume easily from […]


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Categories

%d bloggers like this: