Category Archives: General

scponly, rsync and Fedora

A few years ago I wrote about the backup script that I use to do daily and weekly backups of my computers. Since this script must run unattended it makes use of a passphrase-less SSH key. The SSH key in question only exists on my main workstation and is used to login as a user which does not own any other files. While this isn’t a big security problem it would be nice to limit the privileges of this user. To this end I started using scponly some time ago. Scponly is a restricted shell which limits a logged in user to only executing a few commands such as scp, sftp and rsync. This small set of available programs greatly reduces the chances that the user will be able to find a local exploit. Scponly is already packaged for Fedora so installing it is simple.

yum install scponly

Setting an user’s shell to scponly is accomplished with the usermod command.

usermod -s /usr/bin/scponly backup

Like any shell, scponly must also be added to /etc/shells. Just add “/usr/bin/scponly” (without the quotes) to the end of this file.

As I mentioned when describing the backup script, the script works great except for large amounts of data such as media collections. Over time my photo collection has grown to over nine thousand images and now consumes more than eighteen gigabytes of disk space. So today I decided to cron up rsync to synchronize my photos to the same location where my backups are sent every night. Unlike my backup script, rsync will only send the changes to the remote server not the entire archive.

After much debugging I discovered that the most recently released version of scponly does not work with rsync. The thread where this problem was first discussed started in March 2006. More related posts can be found in subsequent months. Fortunately the scponly authors have fixed this bug in their CVS repository so I built a RPM for the CVS version.

scponly-4.7CVS20071229-1.fc8.x86_64.rpm

scponly-debuginfo-4.7CVS20071229-1.fc8.x86_64.rpm

scponly-4.7CVS20071229-1.fc8.src.rpm

This package successfully upgrades the scponly package provided by Fedora. Hopefully these RPMs are useful to someone.

Downloading source RPMs in Fedora

The main yum executable doesn’t have an option for downloading source RPMs. Fortunately, this task is made easy by yumdownloader which can be found in the yum-utils package.

yum install yum-utils
yumdownloader --source scponly

This will leave a copy of the scponly source RPM in the current directory.

Thesis

Several weeks ago I successfully defended my MSc thesis. For anyone interested here is the abstract and a PDF version.

The IP Per Process Model: Bringing End-to-end Network Connectivity to Applications

Abstract:

The application of the end-to-end principle in the design of the Internet has been fundamental to its success. One of the most important advantages of the end-to-end principle is that it allows the introduction of new services and protocols into the network without requiring changes to intermediate nodes. This greatly reduces the difficulties associated with developing and deploying new transport layer protocols and network services.

Traditionally network protocol implementations are placed inside the operating system kernel. An alternative to this design found in the computing literature is user-level networking. User-level networking places the protocol implementation and processing inside the application. Among other advantages this design simplifies network stack development and deployment.

This thesis offers a network stack model based on user-level networking which has the primary goal of extending the benefits of the end-to-end principle to applications. This model is referred to as the IP per Process Model. A prototype of this model named Pnet/UNL has been built and evaluated against the Linux network stack. Performance evaluation shows this prototype to compare favorably against the Linux network stack on a 100 Mbps network but the performance gap widens at 1 Gbps.

Thesis in PDF format

Ontario Linux Fest

This past Saturday I spent the day at the Ontario Linux Fest which was held at the Toronto Congress Centre. Despite this being the inaugural year for the event it was very well organized and I think, well attended. The number I heard was approximately 350 attendees. The most enjoyable aspect of the event was that it had a really nice community feel. Everywhere you looked there were groups of people chatting and having a good time. The only negative thing I can say is that many of the presentations were very high level. Given the broad audience this is not necessarily a bad thing but personally I was hoping for more technical detail. I really hope the organizers are able to this again next year because I’ll definitely be there.

I didn’t have a real camera along so the best I can offer is this picture of Jon ‘maddog’ Hall‘s closing presentation taken with my N800.

Picture from the Ontario Linux Fest

Theme update

I have been using the default WordPress 2.3 theme for the last little while. The reason for this is that I wanted to use the new widget functionality in WordPress but my old theme did not support it. The widget feature I wanted most was the pull-down menus for the archive and category lists. These lists were simply getting too long and taking up too much space.

This weekend I got around to modifying my theme to support widgets and also making a large number of other small changes. Nothing huge but the theme is a lot cleaner now.

Unfortunately, due to a couple of WordPress bugs (#4287, #5168) the HTML on this site won’t validate anymore. I find this quite annoying but manually patching WordPress files seems like to much trouble to do after each release. Hopefully these bugs get fixed soon.

New keyboard (or bye bye RSI)

I spend a lot of time in front of a keyboard. It is one the negatives that come along with having your work and play intersect. As a result I have had some small RSI problems over the years. It has never gotten to the debilitating stage but it is has definitely caused me to go watch TV when I’d rather be working on the computer (I hate watching TV).

In an attempt to reduce the RSI problems I have tried a quite a few different keyboards. For many years I used my trusty MS Natural Keyboard. This is an original MS full size natural. I bought it as part of the first computer I paid for by myself, sometime around 1995. It still works perfectly. The layout is better than most keyboards but the keys are pretty stiff, this may be age related.

MS Natural Keyboard

I also have an really nice keyboard that came with an IBM iSeries server. It is a traditionally shaped keyboard but the keys are really nice. Unfortunately, using this keyboard didn’t do much good (or bad) for my RSI problems.

IBM Keyboard

I have also tried a small laptop size keyboard. This was probably the worst of the many keyboards I have tried to use. I don’t know what I was thinking.

Laptop-like keyboard

There are many more less memorable keyboards that I have tried which were also of little use in reducing the RSI pain.
Not only have I tried many different keyboards I have tried adding a keyboard tray with an attached mouse tray to get the proper posture and positioning. I think this helped but it did not solve the problem.

During the time I have been experimenting with other keyboards I knew about Kinesis keyboards. There are probably very few computer geeks who haven’t ooogled over a Kinesis contoured keyboard at some point. These keyboards look cool and are designed to be ergonomic. Unfortunately, they also cost a small fortune.

Kinesis keyboard picture 2

Kenesis keyboard picture 1

A few months ago, with the inspiration of my friend Andrew, I finally broke down and bought a Kinesis contoured keyboard. Honestly, this is the best ~$350 I have ever spent. After using this keyboard for a few months most of my day-to-day RSI symptoms are gone. It only took a few days to get reasonably fast at typing on the Kinesis but there are still moments when my fingers instinctively go to the wrong spot (especially after a day at work with a normal keyboard). The fact that the Kinesis lacks a keypad is also a nice plus; this keyboard actually sits centered in the keyboard tray and if you use it on a desk surface it doesn’t force your mouse to be far off to the right. The feel of the keys is also the best of any keyboard I have tried. I am reasonably confident that the combination of this keyboard and the keyboard tray is responsible for the improvement in my RSI symptoms because it only takes a few hours at a normal keyboard before the symptoms to return.

So why am I writing this little story? There is a lesson here. For several years I was too cheap to buy the proper equipment that may have helped my RSI problems and I paid for it a little each day with unnecessary pain. Don’t be like me. If you have RSI problems get yourself a keyboard designed for your hands not ease of manufacture.

I’m probably buying a second one to have at work.

Torvalds interview

Q&A: Torvalds on Linux, Microsoft, software’s future

CW: Lots of researchers made millions with new computer technologies, but you preferred to keep developing Linux. Don’t you feel you missed the chance of a lifetime by not creating a proprietary Linux?

Torvalds: No, really. First off, I’m actually perfectly well off. I live in a good-sized house, with a nice yard, with deer occasionally showing up and eating the roses (my wife likes the roses more, I like the deer more, so we don’t really mind). I’ve got three kids, and I know I can pay for their education. What more do I need? . . . So instead, I have a very good life, doing something that I think is really interesting, and something that I think actually matters for people, not just me. And that makes me feel good.