The Path to Root - SysAdmin Blog (Beta)
A log of learning Linux, UNIX, Free Software, computing systems, and networking.
Thursday, September 06, 2007
Logging a Terminal Session in Linux with Script
Ever wonder how you can capture the output of your terminal session to a file for reference later? Check it out:
—Uwe Hermann2007-02-10 17:25 — Uwe Hermann
Have you ever wondered how you can easily capture a console session on Linux (and probably most other Unix-like OSes) without the need for special video recording software?
Here's how: you can use the script(1) command (part of the
bsdutilspackage).
- Start the
scriptcommand. Without parameters the sessions will be logged to a file calledtypescript. You can also supply a filename on the command line:script mysession.log.- Type whatever you want to record...
- End the recording session with
exitorCTRL-d.- You can now view the file with
less -r mysession.log(it contains line feeds, escape sequences etc., so a simple text viewer will probably display garbage). You can even print it with lpr(1). Or simply display it on the terminal withcat mysession.log.An even cooler feature is that you can replay a script with the correct timing information:
- First you have to also record the timing information using the
-tswitch:script -t 2>mysession.timing mysession.log.- You can then replay the script:
scriptreplay mysession.timing mysession.log.
See the script(1) and scriptreplay(1) manpages for more details.
Now you know! Thanks Uwe!
8:22 PM | Logging a Terminal Session in Linux with Script
Sunday, August 12, 2007
Introduction to Hamachi, Part 1

A few months ago, a friend of mine turned me on to Hamachi, but I didn't get around to trying it out until now. Hamachi is a free (as in beer) multi-platform software package for the creation of ad-hoc Virtual Private Networks (VPNs).
To truly appreciate Hamachi, you have to understand the problems with traditional VPNs. The short of it is that VPNs have traditionally been:
- Static: tunnels had to be set up per connection type or even per user in some cases.
- Complex: tunnels were based on multi-stage handshaking routines that required one or more VPN specific ports to be open on a routing device or firewall.
- Slow: the levels of encryption and "layers" of routing and encapsulation necessary for tunnels in many cases require hardware acceleration and are typically very latent.
- Centric: Traditionally, VPN configuration has been in the hands of the network administrators and users could only make connects preconfigured by those network administrators.
This is where Hamachi comes in. Hamachi is as close to the "Holy Grail of VPNs" as I have seen. Hamachi solves in spades virtually all of the problems with traditional VPNs:
- Dynamic: Hamachi allows you to set up VPNs on-the-fly, adding and deleting clients or dissolving entire VPNs at will.
- Simple: To set up a network requires only the installation of the software and the name and password for a given network. That's it.
- Fast: Because the tunnel created by Hamachi is peer-to-peer (stretches to and from only those systems that are communicating) and does not involve intermediaries, it is as fast as those two peers at either end.
- Distributed: Because it is based on a software package and is exceedingly simple, Hamachi puts VPN setup in the reach of users.
The best explanation of how Hamachi works is the Hamachi Security Architecture description, but it basically boils down to Hamachi using the same public key cryptography that made personal cryptography feasible.
My Mileage, YMMV
My personal experience with Hamachi has been extremely positive. I have created VPNs and made connections successfully under several different conditions, including through a proxied Internet connection. One of Hamachi's nicer features is its ability to create multiple networks on one machine. Because of its peer-to-peer model you can, in effect, configure multiple VPNs to multiple computers (up to 64 separate networks with the free version).
In "Introduction to Hamachi, Part 2," I will be addressing the Hamachi Linux client, so stay tuned...
More Reading & Resources...
- LogMeIn
- Security Now
- Security Now podcast on Hamachi
- Transcript of the Security Now podcast on Hamachi
- How Hamachi Works
- Hamachi Security White Paper [PDF]
Labels: firewall, linux, vpn, windows
4:54 AM | Introduction to Hamachi, Part 1
Wednesday, August 08, 2007
xkcd: Linux User at Best Buy

xkcd. Great comic.
4:32 AM | xkcd: Linux User at Best Buy
Sunday, July 29, 2007
OLPC News 2007-07-28
"Free Drop: Mary Lou Jepsen and Quanta reviewed all the 10-point free-drop data that we have been collecting over since December 2006. The units are dropped on all corners, all side bumpers, and front and back. Initially, we had dropped onto plywood, but this spring we made the test tougher: we have been dropping on a hard steel plate, with and without a carpet. B4 units pass a 150cm 10-point drops onto a carpet-covered steel plate; a 105cm simulated slanted-desk 'slide' onto a steel plate; and a 80cm 10-point free drop onto a steel plate. The laptop, when dropped on the antennas, withstands a 150cm drop. To put these data into perspective: a standard laptop only passes a 45cm 10-point drop on plywood (a much softer material than steel)."
I am consistently impressed by the engineering on the One Laptop Per Child systems. The system is the "greenest" laptop yet, consistently passes and exceeds torture tests, and boasts some of the most advanced wireless engineering available for laptop clients. Oh, and it boasts one of the most inexpensive price points for any portable computing device.
4:33 AM | OLPC News 2007-07-28
Monday, June 25, 2007
Crash Course in Slackware

If you are interested in learning Linux, Slackware is the way to go. And, if you're interested in getting a jump start on Slackware, Chess Griffin—creator of the Linux podcast "Linux Reality"—has a great (audio) crash course in Slackware Linux.
- Special Episode 1 - Slackware [OGG Vorbis]
- Special Episode 1 - Slackware [MPEG Layer 3]
Check out these other Slackware resources as well...
Slackware Official Resources
Reference
Other respectable, trustworthy resources....
6:49 PM | Crash Course in Slackware
Monday, June 18, 2007
Your Computer is a Heater. No, Really.

"Believe it or not, the average desktop PC wastes nearly half the power delivered to it."
I have seen articles over the years about Google's interest in the power efficiency of PCs but this is the first I have seen their initiative formalized. It is good to see, too, that this extends down into the "user space," and is not simply a corporate initiative for Big Business. So many of these kinds of programs are launched as marketing campaigns and then there is a long, drawn-out wait before any real, tangible results materialize, if at all. But then, I shouldn't be surprised. It has always been the Google way to not just "Do no evil," but to "First do, then say," and I respect them greatly for this.
As a system administrator, you are probably interested in the efficiency of your power supplies, what you can do to participate and how your infrastructure can change.
Personally, I find the prospect intriguing, and not just from a "Green" perspective. Computers are hot, noisy, and inefficient. Nothing bugs geeks more than inefficiency. OK, few things.... Back in the day, you might have entertained the idea of turning your systems off on a schedule, but now it is just out of the question. On the other hand the idea of all of your servers just hemorrhaging heat and electrical power is just as annoying. Add to it that in most cases you combat this by pounding these systems with cold air and venting the hot... all this entropic nightmare just expending even more energy. I look forward to checking power supply inefficiency off my list of hardware annoyances.
Now if Google would just come up with a Silence Savers Computer Initiative.
More information
- Towards a more efficient computing infrastructure at the Google Blog
- Climate Savers Computing Initiative at the Google Blog
- Google Press Release: Intel and Google Join with Dell, EDS, EPA, HP, IBM, Lenovo, Microsoft, PG&E, World Wildlife Fund and Others to Launch Climate Savers Computing Initiative at Google
- Efficient Power Supplies
- Standby Power Home Page at Lawrence Berkeley National Laboratory
Labels: google, hardware, power-mgt
4:41 AM | Your Computer is a Heater. No, Really.
Friday, June 15, 2007
Notes for Slackware on the Dell Inspiron 5150
I have recently overhauled one of my laptops with Slackware 11 and am again picking my quest for a fully-functioning, full-documented configuration.
One of the first items on my list is power management. If you are (un)lucky enough to have purchased a Dell Inspiron 5150, then you are aware of the chronic overheating issues. As a start I found this PDF with some helpful information on loading the ACPI sensors in Slackware using a custom rc.acpi script: Inspiron 5150: Making the most of Linux.
The follow are also some good resources for information on how to install Linux on the Dell Inspiron 5150:
- cRaig Forrester's Google Notebook: Linux: Dell Inspiron 5150 Installation Notes
- Gentoo Linux on the Dell Inspiron 5150
- Creating a Dual-Boot Dell Inspiron 5150 Laptop: Windows XP Pro and Ubuntu Breezy 5.10
Of course, the obvious thing to keep in mind is that, while these sources provide plenty of good information on what works or does not, the instructions pertain to the specific distribution. The is still plenty of information to be gleaned, however. My ultimate goal is to get all of the hardware features, including function keys, special hardware switches, power management, wireless, et al. to work and fully document both the process of installation and the configurations themselves.
Stay tuned...
Labels: installation, linux, slackware
9:41 AM | Notes for Slackware on the Dell Inspiron 5150
Lists
|
|
| Subscribe to treehead.net |
| Visit this group |
URLs
treehead.net blogs
treehead elsewhere
Previous Posts
- Logging a Terminal Session in Linux with Script
- Introduction to Hamachi, Part 1
- xkcd: Linux User at Best Buy
- OLPC News 2007-07-28
- Crash Course in Slackware
- Your Computer is a Heater. No, Really.
- Notes for Slackware on the Dell Inspiron 5150
- Can The Path to Root Be Moved?
- Deleting "Temp" Directory in Local Profile on Wind...
- Windows Shell Extension: Open Cygwin Shell Here (S...
