After reading a tip (and the comments) at macosxhints.com about how to mount a server via the finders sidebar using automator I came up with a very easy way to access my server via SSH in the Terminal.
This method lets you open the Terminal, automatically ssh’ed into your server, via Spotlight, the Finders Sidebar, the Dock, your Desktop or anywhere else you can think of.
The following is a step by step tutorial on how to achieve this.
- First you make sure your server is accessible without a password (via ssh public key authentication) for your own convenience. This step can be left out as well but it is much better this way
Read about how to set this up here. The entry is in german but the steps you have to take are in english, so it should be easy to follow.
- Open up TextEdit with a new document and fill in the address to the server in the following form:
Select the text, click and hold until the cursor turns into your normal mouse pointer. Now drag and drop the text to your desktop as shown in the picture to the right (click on it for a bigger view). This creates a shortcut file on your Desktop that you can rename to whatever you want. You can even change the icon on it!
Now close TextEdit.
- Next choose a location for the file in your filesystem. I made a folder called “connections” in my home folder where I plan to keep all my server connection shortcuts. But we’re not stopping here. The shortcut is a normal file as any other in OS X, so you can drag it to your sidebar, keep it in your Dock, search for it with Spotlight or click on it in the Finder.
If you happen to use and love Launchbar like me, there is an even quicker way to open your server connection: Open the Launchbar Configuration ([CMD]+Y in Launchbar) and right click / [CRTL]+click in the left pane where all the different rules are listed. Click on New Rule -> Folder… and in the resulting dialog choose the folder where you keep your connection shortcuts.
Now you can open each of them by just typing the name of the shortcut in Launchbar and hitting enter.
In an attempt to make Growl even more useful on my Mac I added two scripts today.
The first one is Growl Notifications for iCal. It lets you add reminders to events in your calendar via Growl in addition to eMails and the standard giant iCal reminder that always gets in the way.
Thomas Aylott made a little hack for the Mail reminder Applescript for iCal, allowing it to remind you via sticky Growl notifications. This is how it ought to be, it’s perfect in my eyes!
If you want cool iCal notifications as well get his script here (including instructions how to install).
The second Growl addition to my Mac is NewsGrowl. This script is an addition to my favorite newsreader NetNewsWire. It shows you which feeds have new news items and how many there are. Simple, unobtrusive … Growl style!
The script binds into NetNewsWire as a “special subscription” at the bottom of your feed list.
Get NewsGrowl (including installation instructions).
A few month ago I started to look at OpenVPN which has a very good GUI for the Mac called “Tunnelblick“. After I managed to set it up on my server I thought why not share my home directory via the VPN tunnel and mount it on my Desktop. It should be fairly usable, providet I’ve got sufficient net connection on my end, since my server has a 100MBit internet line. So I set up Samba and let it listen only on the VPN interface.
The following is a quick step-by-step how-to on setting up such a setup
Install OpenVPN on your server
Donwload the latest source from http://openvpn.net/download.html
Unpack it and run the usual commands:
Then do some testing:
If it all works fine, you’re good to go.
The other possibility is of course to install it from a package your distribution provides you, in my case this is handled by apt (aptitude install openvpn) which has the advantage of setting up init scripts so the VPN is startet at system boot and taking care that the whole environment on the server is suitable.
Configure OpenVPN on your server
We’re gonna work with a pre shared static key here because it is easier to set up and provides enough security for home use.
My config file on the server side looks as simple as following (/etc/openvpn/home.conf):
ifconfig 10.8.0.1 10.8.0.2
keepalive 10 60
This tells OpenVPN to start a new VPN on the “tun” device with the IP of 10.8.0.1 using the key named “static.key”. The rest are some tweaking commands which should be pretty self explanatory.
Now we only need the static key.
We can construct one by putting in the following command:
openvpn --genkey --secret static.key
The static key file is formated in ASCII and should be kept very private. Send one copy to the computer you would like to connect to your server and keep the other copy besides your config file on your server.
Install and set-up Samba
Next you need to install Samba. I again took the Debian way via “aptitude install samba”. Then I tweaked the standard setup to export the user’s home directories and listen only on the VPN interface and not the normal one.
interfaces = lo, 10.0.0.0/8
bind interfaces only = Yes
comment = Home Directories
browseable = yes
writable = yes
create mask = 0775
directory mask = 0775
The rest of the smb.conf file can be pretty much left alone.
Start openvpn and samba
Provided you installed it via your packaging system or set up the init scripts yourself you can now start the two programs by typing in “/etc/init.d/openvpn start” and “/etc/init.d/samba start” (or wherever your distri keeps it’s init scripts).
If the two started up ok, you’re done on the server side.
Time to move on to the client.
Download it from www.tunnelblick.net, mount the Disk Image and double click on “Tunnelblick-Complete.mpkg” which installs all the necessary drivers and software packages. Now you should have a Tunnelblick icon in your Applications folder.
When starting the program for the first time, it will well you that there is no configuration file present and will offer you a sample configuration.
Simply replace the sample configuration with the following:
ifconfig 10.8.0.2 10.8.0.1
keepalive 10 60
As the last step you have to put the file “static.key” that you obtained from your server earlier in ~/Library/openvpn (this is where your config resides as well).
This should be it. Click on the Tunnel entrance symbol to the left of your Spotlight icon and choose your config, after a short moment the connection will be present.
The last thing to do is to mount your home directory.
Press CMD+K in the Finder (or go to “Go -> Connect to Server” in the Menu) and type in the following:
substituting “user” with your username on the server. After that a new icon should appear on your desktop containing all the files you have in your home directory on your server
The new Adium Version is now open for Beta testing. If you care a bout your system and only want stable software (haha!) don’t attempt to install it. But it is well worth the new features. A list can be viewed on the Beta page.
As noted: “Backing up a copy of the folder ~/Library/Application Support/Adium 2.0/ before using betas or alphas is probably a good idea.”
Most noticeable changes
Major AIM, ICQ and .Mac improvements. This includes working File Transfer, and faster sign on.
Improvements to the default look and feel of Adium.
iTunes integration is much faster, and updates as soon as the song changes.
Added global user profile and buddy icon settings. (Personal Preferences)
General Account improvements. Accounts can now be disabled when not in in use, and friends can now sign on from your Adium without saving their information.
Added an Xtras manager to better handle browsing and removing Xtras.
Major improvements in privacy settings.
Redesigned Previous Chat (Log) Viewer
Requires Mac OS X 10.3.9 or later (Universal Binary)
The longer, complete list can be found here.
Most noticeable on this list are:
- Consulted the Vorlon. <- which is awesome considering they might be blasting our planet to hell anytime soon
- Can now Get Info on contacts who aren’t on your contact list (#2424) & (#193) <- that one’s in there twice so it should really work now
- Added more popcorn to the general preferences. <- might be good for the hours you spend in there
- Added a contextual menu for tabs (#1595)
- Added a contextual menu to make sandwiches tastier. <- nothing to add to this item, food is always good
- Message view window can now be transparent <- I’ve been waiting for that!
- Emoticon text equivalents are not expanded to emoticon images inside of URLs <- I’ve got to implement this into my AJAX chat too …no – to much work *g*
- Now with 200% more cowbell
- Added a dock-like autohiding ability for the contact list <- this might be worth trying out
That’s about it, read the whole list if you’re interested or don’t be a coward and just download it, install it, use it and report bugs to the Adium team.
Wow! Those folks are fast, we’re already on Beta 3 now.
Apparently they are so fast that they traveled into the future, releasing the Beta 3 today while it will come out tomorrow.