Terminus on OS X
Yes, it can be done, and yes it is beautiful. Actually, Terminus proper is out of the question, but the True Type version of Terminus works great, provided you use it at the appropriate resolutions.
Posted in mac | no comments |
On setting up a Mac
When I sit down with a new computer, I enter the Configuration Zone. Not a distant cousin of the Twilight Zone, it can be a joy or a nightmare. My expectations are generally well-defined, and I tend to get upset when they are difficult to fulfil.
My expectations for a laptop and the OS on it:
My productivity. This means
- Web
- Console
- ssh
- IM/IRC
- Keyboard acceleration
In Linux, that means Firefox, xterm, ssh (duh), gaim, and currently FVWM. In Windows, it's Firefox, putty, cygwin if I'll be suffering for a prolonged period, gaim, and enough patience to endure the lack of useful keyboard acceleration.
In OS X:
- Safari is OK, but there's no tabs so Firefox was one of the first downloads.
- The terminal is good enough for most of what I use a terminal for. It needs a little tweaking, though. Namely, I need to figure out how to get it to pass the pgup/pgdn keys to the application and not steal them for scrollback, and I need to figure out how to get mutt in screen on falcon to display properly. The font needs serious work, too (I wonder if I can get Terminus to work in OS X).
- ssh, check.
- IM: iChat is neat in some ways, but the conversation UI is a terrible waste of space and it doesn't support Jabber. Adium X seems to be what I'll stick with, unless I gravitate to gaim later on, but I was intentionally steering clear of X apps in X11 to try the "OS X" way of doing things.
- IRC: I usually do this in screen over ssh with irssi, but I did check out irssix and Colluquy. They both look worthy of use as a native IRC client, should I change my habits.
- Keyboard: I have been quite pleased with the keyboard usage in OS X. I was afraid OS X might be too mousy for me, but the accelerators are consistent and very useful if you take a moment to learn them. I just need to find a quick reference card now. The funky key (command key) is my friend. Thayne tried to tell Jayce^ and I once that you couldn't remap CAPS to ctrl in the Apple laptops, but you can indeed do it with a nifty tool called uControl. One of the most important keystrokes to learn is ctrl-f2, which brings the menu bar into focus.You probably want to switch things so that the function keys are function keys first and nifty laptop feature keys second—the opposite is the default. I also remapped enter to fn, to make the fn versions of the arrow keys easier to access.
Configurable but usable in default configuration. OS X is very usable, and quite configurable in the important ways. I had fun going through the system preferences, but didn't really change a lot. One thing I wish I could figure out is how to go back to the Show All view with the keyboard.
Sleep. This has eluded so many laptops I've used it's not even funny—both in Linux and even in Windows. Works great in OS X on this iBook, we'll see about Linux in a week.
Wireless. This is where I will be disappointed in Linux until I get a usb wireless thingy, but I went into that with my eyes wide open. Works great in OS X, except on boot it doesn't seem to join my network automatically. I'll have to tinker with that.
I ought to mention also that I think a laptop should be light and portable, but that was part of the decision going in and has nothing to do with setup. I am happy with the size of my iBook. Oh, by the way, his name is Gandalf.
Posted in mac | no comments |
Welcome, iBook
I bought a 12" iBook for my upcoming graduate school adventure. I've wanted a Mac for some time now, basically since OS X came out. I can't say yet whether I will like OS X more than Linux or whether I will end up running Linux primarily on it, but I know Apple has good hardware and that linux support for the iBook is purportedly excellent with the exception of the broadcom-chipset Airport Extreme.
I'm going to spend the first week in OS X only, then install Linux. I have used OS X and Mac Classic briefly on other computers, but this is my first time as a Mac user and owner.
I will be chronicling my experience here in perhaps the liveliest flurry of activity this blog will ever see. Sit back and enjoy the ride.
Posted in mac | no comments |
My Clue Variant
This variant of Clue will make the game more challenging without making it less fun. There are two differences from the original: how you move and who may show you cards to disprove suggestions.
Throw away the dice, you won't need them. You can move your token anywhere you want, or stay in the same room for as long as you want. There is no restriction on moving. But you will want to be more careful about where you go, as you will see.
Take a moment to notice how the Clue board is laid out around the perimeter of the mansion. Closeness of two rooms is defined in terms of rooms around the perimeter. So the Hall is two rooms away from the Dining Room, and the Kitchen is three rooms away from both the Billiard Room and the Hall.
When you make a suggestion, only the closest players may show you a card, and each of the closest players must show a card if they can. For example, if you are in the Ballroom with one other player, only that player may show you a card. If you are alone in the Ballroom, with a player in the Conservatory and two players in the Kitchen, then those three players may show you cards. All of this is calculated after you make the suggestion, so if you suggest Miss Scarlet did it and one of the players is Miss Scarlet, then only that player and any other players already in the room may show you a card.
That's all there is to it. The resulting game is more challenging because you get less predictable and less complete information, which means you need to be more creative in your deductions. It is less boring (or at least not more boring) because you don't have to worry about getting stuck walking in the halls or across the board from where you need to be.
My brothers and I have played this way a few times with exciting game play to the end each time. Usually when we play normal Clue the game ends quickly, before anyone feels like they've had a chance to do any serious thinking.
Posted in life | no comments |
Essential SNMP
By Douglas Mauro, Kevin Schmidt
1st Edition July 2001
ISBN: 0-596-00020-0
326 pages, $39.95 US, $59.95 CA, £28.50 UK
All I knew about SNMP was that SNMP could tell you stuff about your network. That sounded like a cool thing, but every time I had tried to grok SNMP on the web, I had learned that the Simple Network Management Protocol is not Simple at all.
Then the auditor told us that SNMP was a security risk to our network, rattling of strange jibberish like "community strings," "public/private," and "mibs." So I curled up with Essential SNMP over a weekend and promptly became competent. This book will get you up to speed in SNMP in a jiffy. It is exactly what it claims to be—the essentials of SNMP. Those essentials are probably everything you need to know to start making SNMP work for you in your network.
This book is a little aged; it was published in 2001. (I'm writing this in mid-2005) Luckily, SNMP hasn't changed much since then. Most devices you will find in your existing network probably don't even support SNMPv3, and some probably only support SNMPv1. The book does explain all three versions well.
SNMP may not have changed much, but the tools have changed slightly. For example, none of the Net-SNMP examples will work with recent releases. However, the idea of what you can do is still important, and translating from the book's examples to current syntax is simple enough once you learn what has changed in syntax since 2001. (Hint: RTFM) There is a chapter on MRTG, which is useful, but if it were written today they might have chosen Cacti instead. I can only hope that OpenView has become more administrator-friendly since this book was written.
Book Organization
Chapters 1-3 cover the basics of SNMP. They are by far the most valuable chapters. By the time you finish them you should understand what SNMP is good for, what it can do for you, and why you need to be careful with SNMP devices on your network. Graciously, O'Reilly has put chapter 2—the meatiest chapter of this trio—online for all to read.
The remainder of the chapters go into great detail on how to configure your NMSes, agents, and everything else SNMP. The spotlighted NMSes are Net-SNMP, HP OpenView, and Castle Rock's SNMPc. Many other SNMP softwares are covered lightly in appropriate places. More importantly, I think, is that the nooks and crannies of SNMP itself are explored. You can learn how to grok MIBs, build your own MIBs and how to write your own agents or NMSes in Perl (with a spattering of examples). That chapter on MRTG also lies in this section.
The appendices cover various topics in more detail and provide a nice reference for things like which RFCs to read for more information.
You will consume this book quickly, because you will skim over much of the details in the latter portion of the book. Especially if you can't afford OpenView. When you're done, you'll go on a network management rampage, not resting until you've set up all the cool SNMP stuff you can find, e.g. Cacti, Net-SNMP, and whatever cool commercial NMS trial versions you can get your hands on. And you'll have fun doing it.
Posted in reviews | no comments |
Good-bye, Nagios.
I hate configuring Nagios. I thought I would get used to it, but I just can't. (I must admit that Nagios is an improvement over Big Brother, which is what we used to use at work.)
I don't know how I missed it for so long, but I just stumbled on mon. mon is easy to configure, well thought out, modular, and just plain better than Nagios, IMHO. In a couple of hours time I had mon doing more than I had been able to muster the gumption to configure nagios to do in the past 2 months. That's perhaps the biggest benefit of mon over Nagios: mon is fun, Nagios is a chore.
Posted in linux | no comments |
Ajax
Ajax? What's that?
I have done my time as a web developer. I don't like it a whole lot, but I think the basic skillz are important ones for any IT or CS professional, like writing and communicating. The reason I don't like it is because I feel it is a poor platform for doing what so many people try to get it to do. I also used to feel that it was a futile excercise to keep trying - a waste of effort.
Then Google hit me upside the head with Google maps. Amazing things were happening there, and it wasn't a plugin. Then I start hearing about this Ajax thing which I at first thought was a new language or server or something. No, it's more comparable with MVC than JSP. The guy who coined the term (in this article) put it well:
Q. Is Ajax a technology platform or is it an architectural style?
A. It's both. Ajax is a set of technologies being used together in a particular way.
I hear some people are acting fairly childish and close-mindedly about the name Ajax. Go away, or we shall taunt you a second time.
Q. Why did you feel the need to give this a name?
A. I needed something shorter than "Asynchronous JavaScript+CSS+DOM+XMLHttpRequest" to use when discussing this approach with clients.
So now you know what Ajax is. I still would mostly object to a web app where a GUI would be better, but at least now there's enough tech, talk, and doc to make a reasonable interface for the user on the web.
Posted in cs | no comments |
Minicom and SLIP
I was trying to establish a SLIP connection with a stupid managed switch that claimed it talks SLIP in the docs. It doesn't - it talks serial just like everything else with a serial console port. But that was hard to discover because using slattach to try to establish a slip connection seemed to render my serial port useless. I imagine you could reset it somehow with setserial, but I'm easily confused by serial stuff so I just rebooted. Store that away in your databanks: using minicom after slattach (even if you rmmod slip and all that good stuff) doesn't work without voodoo or reboot.
Posted in linux | no comments |
gpg-agent is here (finally)!
I have been waiting for this for a long time. Finally, finally, it is here.
The gentoo people, bless their hearts, have documented gpg-agent more than anybody else. Thanks to them and Google I discovered that keychain supports gpg-agent, and keychain is exceptionally-well documented.
This excerpt from keychain(1) on my Debian box:
This snippet would work in .bash_profile (for bash) or .zlogin (for
zsh) to load two ssh keys and one gpg key:
keychain id_rsa id_dsa 0123ABCD
[[ -f $HOME/.keychain/$HOSTNAME-sh ]] && \
source $HOME/.keychain/$HOSTNAME-sh
[[ -f $HOME/.keychain/$HOSTNAME-sh-gpg ]] && \
source $HOME/.keychain/$HOSTNAME-sh-gpg
In addition to that, I configured my gpg-agent thusly in ~/.gnupg/gpg-agent:
pinentry-program /usr/bin/pinentry
no-grab
default-cache-ttl 28800
Now configure gpg to use the agent:
$ echo use-agent >> ~/.gnupg/gpg.conf
Tell mutt to use the agent:
$ echo set pgp_use_gpg_agent >> ~/.muttrc
mutt for some reason requires that GPG_TTY be set (thanks to dato on #mutt on
freenode), so add this to your
~/.bashrc:
export GPG_TTY=`tty`
Enjoy!
Posted in linux | no comments |
Truncate at 72 characters with sed
I like to make cron jobs to mail me interesting information, e.g. the output of clog. Often, I want to truncate at 72 characters rather than deal with the wrapping, so I use this cute little sed script: sed "s/^\(.\{72\}\).*$/\1/"
Posted in linux | no comments |
