2718.us blog » sftp http://2718.us/blog Miscellaneous Technological Geekery Tue, 18 May 2010 02:42:55 +0000 en hourly 1 http://wordpress.org/?v=3.0.4 Text Editors http://2718.us/blog/2008/11/12/text-editors/ http://2718.us/blog/2008/11/12/text-editors/#comments Wed, 12 Nov 2008 20:44:32 +0000 2718.us http://2718.us/blog/?p=113 When I was first learning structured programming, I used an IDE (TurboPascal).  Since then, I have rarely used an IDE outside of specialized language development environments like VisualBASIC.  Mostly, I use a text editor that I link up with a good sftp program to edit remotely or that I use in conjunction with subversion.  For a long time, when I was still programming heavily on PCs, I used TextPad.  It’s probably still toward the top of my list, but it’s been so long since I used a PC as one of my primary machines that it’s hard for me to know.

The lack of TextPad for mac has left me searching, on and off, almost constantly for the “right” mac text editor.  Most of the time now, that search leaves me right back at Komodo Edit, the free cross-platform text editor built on Gecko and Scintilla that I’ve been using for a logn time now.  Every other major editor just seems to be missing something I’ve come to really like in Komodo Edit, even as slow and clumsy as the interface can be sometimes.

I really wanted to like BBEdit, TextWranger, TextMate, skEdit, subEthaEdit, Coda, etc., but none of them seemed to have the simplicity of code-completion (including variable and constant name completion) and intelligent code auto-indenting that Komodo Edit does.  I wanted to like the integration of various resources in Coda, but having the reference materials in the one program versus in a web browser window over on that second monitor there just didn’t seem to make enough of a difference.  I wanted to think that having an editor that could do sftp and subversion was worthwhile, but it just didn’t seem to matter to my workflow.

It’s been so long since I’ve been away from TextPad that I’m not sure even it would compare to Komodo Edit.  Of course, the one tool that is poised at any moment to start eating into Komodo Edit’s share of my use time is MacVim (this is apparently a new port of vim).  Vi/vim is so unbelievably powerful… and so much more my style than Emacs.  Vi has been my text editor of choice at the command line for about a decade or so now.  See also Why, oh WHY, do those #?@! nutheads use vi? and the two graphics below.

Learning Curves

Real Programmers

]]>
http://2718.us/blog/2008/11/12/text-editors/feed/ 0
OS X, Wake-on-LAN, and Passworded Screensavers http://2718.us/blog/2008/08/13/os-x-wake-on-lan-and-passworded-screensavers/ http://2718.us/blog/2008/08/13/os-x-wake-on-lan-and-passworded-screensavers/#comments Wed, 13 Aug 2008 20:35:04 +0000 2718.us http://2718.us/blog/?p=91 The other day, I realized while I was at work that I needed some files from my Mac desktop at home.  Normally, no problem, ssh into my firewall and open a tunnel to my desktop (this is better done with authpf, but that’s a post for another time), use sftp, and done.  The problem is that because of unexplained kernel panics (probably a bad RAM module), my desktop would crash hard if left on all day, so I’ve been putting it to sleep when I go to work.  Now, with my Mac set to wake for remote admin access, I ought to be able to run a wake-on-LAN utility to wake it up and be fine, except that I use a passworded screensaver.  With a passworded screensaver, waking the machine locally or remotely will give 30-60-second window during which the computer is awake and expecting a password to be entered at the physical machine; there doesn’t seem to be a way to do this remotely and unlike earlier versions of OS X, since 10.3 or 10.4 or so, you can’t just kill the screensaver process from the command line (i.e. by logging in with ssh).

On the other hand, ssh is a very robust protocol and somehow ssh sessions seem to readily survive disconnect/reconnect cycles. Making use of this, it is possible to get a workable, if slow, connection to a passworded-and-sleeping Mac.  On one connection to the firewall machine, run a loop of the wake-on-LAN command so that the magic packets that make the Mac wake are being sent every second or so.  Use another connection to ssh into the Mac and do whatever you need to do.  It helps to plan out what you need to do so that you can get the commands in fast, but even during the cycle where the Mac goes back to sleep and gets reawakened by the wake-on-LAN loop, you can type commands; they just won’t appear (not even echoed) until ssh recovers the connection.

While this is an annoying way to use a machine and it’s probably not good for the hardware to cycle in and out of sleep repeatedly in such a short time span, it does give a way to get at a passworded and sleeping Mac remotely.

]]>
http://2718.us/blog/2008/08/13/os-x-wake-on-lan-and-passworded-screensavers/feed/ 0