Skip navigation

Tag Archives: Vim

In the summer months this year (and hopefully more summers in the future), my office will be getting some student interns who will work for us for half of the day and then learn things from us for the second half.  One of the first lessons I’m planning is a crash course in Linux.  There are, of course, about a million different distros available, from mainstream releases like Ubuntu/Debian and Fedora to more–specialized releases, such as RebeccaBlackOS.  For my purposes, though, I’m just going to focus on Ubuntu and two variants (the MATE and Cinnamon versions of Linux Mint) because, well, I’m most familiar with Ubuntu and some of its quirks, and while installing a new OS will be part of the first project, I don’t want to spend all of my first class just working through stupid install issues that I can’t help solve quickly.

But I’m offering several different variants because most of what I hope to teach will be happening on the command-line, and it won’t hurt these kids to get to make a few choices about their desktop environment.  I like Unity quite a bit at this point (though I did initially downgrade from 10.10 netbook to 10.04 because GNOME 2 was a lot more stable back then), but I understand that there is a learning curve, which is why I’m offering the more Windows-like Cinnamon and MATE, a fork of GNOME 2 for those who might like a more classic Linux feel (not that I expect any of them to have any working knowledge of Linux coming in to the project).

For those of you who might like to play along at home (I plan to share some of my lessons here if I think they’re any good as a learning tool), I’m starting everyone out with a pretty basic load-out beyond the basic install.  I’m asking everyone to install Guake, my favorite Quake-like drop-down terminal emulator, and Vim, because emacs is for losers and Nano, the default text editor, is no better than just using Notepad.  If you’ve never used Vim before, you should probably go download it and run vimtutor from the command line so that you can get the basics.

Advertisements

Well, I said that I was going to build a server to do a larger-scale test for AirPrinting from iOS devices here on campus, and by gum I did.  Right now, under my desk, there’s an Ubuntu 12.04.1 Precise server named Goodmountain (see what I did there?) whose only job is to serve up AirPrint printers for campus iDevices.

Nothing more glamorous than an old ThinkCentre shoved under a desk, amiright?

Here it is (center).  Nothing more glamorous than an old ThinkCentre shoved under a desk, amiright?

So how’s it working so far?  Well, I’ve printed a couple pieces of short fiction from my iPad to two of the printers that I’ve made available for this pilot program, and everything’s gone just fine.  There aren’t any students around this week, and I don’t know how much demand there’s been for iPad printing.  For this pilot, I’ve only made four printers available in the locations where the iPads get used most often, and I’ll be waiting to see if there’s more demand and/or how much the service gets used before I do anything else.  Top on my list of priorities is moving this to an actual server that isn’t hanging out under my desk, but that only happens if this is something that there’s heavy demand for.

Now, what have I learned?  Well, top on my list is that the Ubuntu server installer doesn’t recognize full-sized Apple SATA drives (or at least drives that have been pulled out of the bin and have an Apple logo on them–I don’t actually know if it’s the drives or something about the partitions, and I don’t care to test that right now).  More important than that, though, is that if you’re going to be serving multiple printers, you need to have a separate .service XML file under /etc/avahi/services/ for each printer or none of them are going to show up.  If you’ve already built a nice big file for all your printers and you need to cut it up into a bunch of individual files, just consider it more Vim practice.  Yank is your friend.

Expect to see another report here once I have some usage statistics.

Don’t get me wrong, Vim is very powerful and well worth knowing if you’re going to spend any time at all on the command line, but I’m far from an expert. You could read the man page, sure, but Vim is one of those things you need to learn by using it.

Here are two resources, the first platform-independent.

The Interactive Vim tutorial

On Linux, you can also just type in vimtutor on the command line. If you get an error and you didn’t mistype the command, you’ll probably need to install a couple of packages. On Ubuntu, run the following:

sudo apt-get install vim vim-runtime

Now go learn some Vim.

:wq