Archive for the 'Tips' Category
The problem – your department’s network won’t let you ssh or connect directly to your work Mac, you can only ssh to one special computer, and then from there you can ssh to your Mac. But, you’d like to be able to use Apple file sharing or sftp directly to your work Mac.
Well, SSH Tunneling (Port Forwarding)[sic] is great, clear, explanation of how to use SSH tunneling to directly connect to an ssh-enabled machine that doesn’t allow ssh connections from people offsite/off-campus, etc. It shows how, even when you can only access the work machine through the “gateway” machine (a situation I face here at UF), that you can setup an ssh tunnel through the gateway machine to access your work machine directly.
The best part about this? I can now use sftp (specifically fugu and its ability to edit external text files in TextWrangler) on my work quad core mac from home. I always knew this sort of thing was possible but … now at last I’ve figured out how to do it!
Update Oh, it gets so much better. Because in addition of using port 22 to forward ssh to your work machine, you can also forward port 548 (appleshare).
So, a variation on the tip from the site would be like so (where work is the Mac on your desk that has ssh and appleshare running (actually for this tip, your Mac only need be running file sharing, not ssh) and gateway is the one machine you’re allowed to ssh into from off-campus.
ssh -l myuserid -L 7778:work:548 gateway cat -
Then minimize this terminal window, and then use the Finder to “Connect to Server” in the Go menu. Enter “localhost:7778″ as the server address and boom, you should see the standard apple file sharing login window for your work machine. Enter your user name, password, and choose what you want to mount. Nice. (I use 7778 here, but you could use 7777. Obviously, if you use 7777 for forwarding port 22, you need to use a different port to forward 548).
Tags: apple, appleshare, networking, port forwarding, ssh — .
New versions of MacFUSE and sshfs are available at the Google Macfuse page. You may remember that with MacFUSE and sshfs you can mount any ssh server in the Finder. It’s pretty nifty. FUSE in general makes it easy to add support for additional file systems.
There’s also a new tool, MacFusion that provides a new GUI for MacFUSE, but I haven’t tested it out yet myself.
.
Well, Apple just can’t keep Kerberos working. Upon the most recent Apple security update, again with the ssh segmentation violations. It’s getting highly annoying.
The trick is to use Pacifist to replace the Kerberos.framework file (or something) with that from the 10.4.9 update. Described, more or less, in this thread here.
.
So, this was annoying, but upon a recent upgrade to 10.4.9 that blasted kerberos related error returned – this time I noticed effecting my ability to mount my iBook over AFP, and it also gave me the same ssh segmentation error I wrote about earlier this month.
The same fix worked, only this time I used pacifist on the 10.4.9 combo update. Which, makes this so frustrating because clearly the correct files are there in the update yet somehow they don’t get written out write by the installer. At least I knew how to fix it.
.
If you have any issues getting IDL to properly record/recognize the cursor position or mouse clicks, you may want to try this command in the terminal
defaults write com.apple.x11 wm_click_through -bool true
Frank Varosi here at UF gave me this tip, which he found at this french site. What this command does is it changes a window manager preference in Apple’s X11. This probably only effects the so-called “Quartz VM” which is the default window manager. If you switched to the enlightenment or some other window manager, my guess is this click-through preference has no effect, but I can’t say for sure.
Personally, I’ve yet to write IDL programs that look for the cursor location, but I figure this may be helpful to others.
Update As a commenter noted, you will have to restart X11 for this to do anything, since it’s changing a preference in Apple’s quartz-vm window manager.
Update II As commenter Josh Shiode noted, the Macosforge X11 (and possibly any X11 with Leopard) requires a slightly different command:
defaults write org.x.x11 wmclickthrough -bool true
Tags: apple, IDL, Leopard, x11 — .
You may already know about this, but there are some useful Applescripts that Apple includes with OS X. You can enable the script menu (if it’s not there already), by using the Applescript Utility, which is in /Applications/Applescript/. Also, be sure to check “Use Library Scripts.”
Once enabled, you’ll see a variety of scripts for several programs in the Script menu. It’s the Finder scripts where the case script is located. Just select one or more items in the Finder, and pick the “Change Case of Item Names” script. You’ll be prompted for upper or lower case. Then, the Finder does it thing. Pretty handy.
If you’re interested in writing your own Applescripts, looking at all the included examples, including this one, is a good place to start. Also, check out the pdf of the Applescript Language guide which is a handy reference. Or if you’re really hardcore, check out “AppleScript: The Definitive Guide, 2nd Edition” (Amazon link).
.
This may be common knowledge among some IRAF users, but I came across this in the IRAF.net forums and its news to me. You can make shell scripts that call the CL, to use IRAF tasks from outside of IRAF. Check out the details here.
.
Well, I’m not sure what did it, perhaps the recent Quicktime 7.1.5 update or maybe one before then, but recently I found myself unable to use ssh. I’d get segmentation fault errors whenever I tried, and this would effect scp and sftp as well. I found the solution in this thread on Apple Support discussions, which requires using Pacifist to extract the Kerberos.framework from the 10.4.8 combo update and put it in /System/Library/Frameworks..
It worked, ssh is up and running again. Kind of an annoying bug though.
.
Wow, this tip really works. Probably more so on slower machines (like my iBook G4) than newer ones (like the Mac Pro in my office.)
Via Daring Fireball, it’s on the Hawk Wings web site. You use sql lite to do something to the Envelope Index file. There’s no period once you get into sql lite. The only suggestion I have is that there’s no period on the vacuum command of course, so once at the sqlite> prompt just type:
vacuum subjects;
and then wait for a bit while it vacuums. Afterwards, Mail really is significantly snappier at loading folders.
.
There is a handy IDL syntax coloring plug-in for Textwrangler that I find quite useful. It colors built in IDL functions, among other things.
Installation is fairly easy (you put the file in TextWrangler’s language module folder and then assign .pro to IDL) and described on the download site.
.