Archive for the ‘Technology’ Category

The Tablet and the Jackalope

Thursday, June 18th, 2009

Yesterday, I did something that I’ve never done before – a mid-semester major distribution upgrade.  I have a Thinkpad X61 Tablet which I use for teaching, and that tablet runs Ubuntu Linux.  I’ve also set Patty up with a Thinkpad X41 tablet to replace her ancient Thinkpad X31

So how did it go?

Thinkpad X41 Tablet

Ubuntu has been broken by default on tablet PCs for some time.  By “broken”, I mean that after an installation, the tablet stylus doesn’t work.  If you know what you’re doing, it’s not too difficult to make it work, but it’s still a headache that shouldn’t exist.

With the latest Ubuntu (Jaunty Jackalope), the tablet pen functions without any additional configuration.  In fact, essentially all of the X41’s most important hardware is configured on installation.  But there are a few exceptions, and here they are!

Fingerprint reader

The fingerprint reader is not set up automatically.  Since I don’t use the reader, I didn’t feel that manually setting up the fingerprint reader was a deal-breaker.

Tablet keys

The tablet keys (underneath the display) are not configured by default.  This one is a bigger deal, since you’ll need those keys to use the tablet as, well, a tablet.  After is bit of googling, here’s the fix to get the X41 tablet keys going.

Essentially, make a script that contains this:


#!/bin/sh -e
setkeycodes 6e 109
setkeycodes 6d 104
setkeycodes 69 28
setkeycodes 6b 1
setkeycodes 68 130
setkeycodes 6c 131
setkeycodes 67 132

… and save it as (or add it to) /etc/rc.local

This script is executed every time you boot up.  It assigns the correct keycodes to the tablet keys.  (This is something you didn’t have to do in previous Ubuntu releases.)

Rotation

To use the tablet as intended, you probably want to rotate the display.  As with all previous incarnations of Ubuntu, this is not set up for you after the installation.  You’ll find various scripts on the internet for rotating the screen and stylus, but most of them won’t work on Ubuntu Jaunty Jackalope because of … the way the tablet pen is automatically configured.  So, the pen is now set up for you, but it’s set up in such a way as to make changing its behavior (which you’ll need to do to rotate the screen) more difficult.

Here’s a simple rotation script thta works with Ubuntu Jaunty Jackalope on the X41 tablet and X61 tablet, provided you have the 1024×768 screen.  If you have a larger screen, you’ll need to modify the script accordingly.  Save it as /usr/local/bin/rotation.sh


#!/bin/bash
orientation=`xrandr -q | grep -c 1024x768`
echo $orientation
if [ $orientation -eq 2 ]; then
/usr/bin/X11/xrandr --orientation right
xsetwacom set "Wacom Serial Tablet PC Pen Tablet/Digitizer" Rotate 1
xsetwacom set "Wacom Serial Tablet PC Pen Tablet/Digitizer eraser" Rotate 1
xsetwacom set "Wacom Serial Tablet PC Pen Tablet/Digitizer" xyDefault
xsetwacom set "Wacom Serial Tablet PC Pen Tablet/Digitizer eraser" xyDefault
else
/usr/bin/X11/xrandr --orientation normal
xsetwacom set "Wacom Serial Tablet PC Pen Tablet/Digitizer" Rotate 0
xsetwacom set "Wacom Serial Tablet PC Pen Tablet/Digitizer eraser" Rotate 0
xsetwacom set "Wacom Serial Tablet PC Pen Tablet/Digitizer" xyDefault
xsetwacom set "Wacom Serial Tablet PC Pen Tablet/Digitizer eraser" xyDefault
fi

Execute the script, and the screen and stylus will be rotated. Execute it again, and the screen and stylus will return to their normal orientation. This is good to assign to the “rotate” button underneath the screen, but you can execute the script from a terminal as well.

Thinkpad X61 Tablet

Setting up Ubuntu Jaunty Jackalope on the X61 tablet is fairly similar to setting it up on the X41 tablet.  As before, much of the important stuff is automatically set up by the installation.  However, the X61 tablet has a few more quirks than the X41 does.  Here they are!

Fingerprint reader

Same as the X41 tablet.

Tablet keys

By default, the directional keys, enter, and the escape button work as expected.  The other keys will require a similar script to the X41 9above).  I haven’t messed with figuring out the keycodes for the X61 tablet yet, though.

Rotation

Same as the X41 tablet.

Desktop effects

On the X41 tablet, these “just work”.  On the X61 tablet, they will “just work” when a certain set up updates is made official in Ubuntu Jaunty Jackalope.  But as of 6/17/09, you’ll need to enable the “proposed” repository (which contains the newest updates that haven’t gone through as much quality control as what you’d get through the normal update channel). 

Here’s how to enable the proposed repository.  You need the latest compiz and xserver-xorg-video-intel packages to get desktop effects working.

Or, you can wait until the compiz and xserver-xorg-video-intel updates become official.

Improving video performance

The X61 tablet (and the X41 tablet, too) have Intel video cards.  The Intel video driver for Linux is currently in the middle of a redesign.  That’s bad for laptop users, because it makes video performance in recent releases of Ubuntu quite horrible.  The X41 tablet is affected somewhat, but the X61 tablet suffers terribly from the reduced performance.

The real fix for the video problems won’t come until the next release of Ubuntu, but you’ll likely want to be able to use your computer properly before then.  Here’s what you need to do:  Follow this HOWTO from the Ubuntu forums.  I used the “optimal” procedure, and am getting better video performance without any crashes so far.

(This procedure will also work for the X41 tablet, but with a more modest performance gain.)

Changing the pen’s behavior

The X61’s stylus features an eraser tip, a side button, and a pen tip.  I wanted the side button to bring up context menus and the eraser to paste (when not being used by an application like xournal).  So, I made a little script to change the behavior of the buttons.


#!/bin/bash
xsetwacom set "Wacom Serial Tablet PC Pen Tablet/Digitizer" Button1 "button 1"
xsetwacom set "Wacom Serial Tablet PC Pen Tablet/Digitizer" Button2 "button 3"
xsetwacom set "Wacom Serial Tablet PC Pen Tablet/Digitizer eraser" Button1 "button 2"

I saved this as /usr/local/bin/stylusbuttons.sh, which i have set to run when I log in. Now the stylus buttons work the way I want.

I’ve managed to get though a day of teaching wit hthe new install without incedent.  So far, so good!  Anything to add?  Improvements to the stuff above?  Configuration questions?  I’m all ears!

You can’t fight dumb with more dumb

Wednesday, December 10th, 2008

I’m something of a Linux advocate.  I use Linux in my everyday work as an educator, and the only machine in my house that runs a Microsoft OS is the Xbox 360.  So I found this mess linked by both Slashdot and Linux Today somewhat interesting.

If the linked blog post is accurate, a Texas middle school teacher confiscated a boy’s Linux discs because she believed that distributing the discs was illegal.  That’s definitely ignorance on the teacher’s part.  A typical Linux distribution can be freely distributed, and distribution maintainers typically encourage this sort of thing.  That a Texas middle school teacher is not aware of this isn’t really surprising.  And the teacher’s response to Linux distributions is quite silly:

No software is free and spreading that misconception is harmful. [...] I along with many others tried Linux during college and I assure you, the claims you make are grossly over-stated and hinge on falsehoods.

After all, all that’s missing from here is “…I didn’t inhale.”***  Clearly, this teacher is in need of some education on what free software is.  She’s clueless.  But the response by the blogger who’s causing all the fuss is just as dumb.

Then again, being a good NEA member, you would spout the Union line. Microsoft has pumped tens of millions of dollars into your union. Of course you are going to “recommend” Microsoft Windows”. To do otherwise would probably get you reprimanded at the least and fired at the worst.

Keep in mind that this is happening in Texas, where teachers are prohibited by law from collective bargaining (or striking).  Texas just isn’t a union shop, and it’s entirely possible that this middle school teacher doesn’t even belong to a union.  And if she did, it’s unlikely to be one that could get her “reprimanded or fired” for using Linux.

Sheesh.  You can’t fight dumb with more dumb.


*** The “I tried Linux in college” quote is the reason I still think the whole thing is satire, and should be posted on The Onion.

OpenOffice.org 2.4.0

Friday, March 28th, 2008

OpenOffice.org recently released the 2.4.0 version of its free office software. I’m a Linux user, so I’ve used OpenOffice for years on my own machines.

There’s a Windows version, but I’ve always been hesitant about replacing Excel on our lab machines with OpenOffice Calc. Why the hesitation? Excel had one feature that OpenOffice Calc did not. A small feature, but one that saved my students a lot of time.

We don’t have anything in our lab that requires Excel, and our students usually use Excel for simple plotting of calibration curves. Excel could do simple regression analysis on the data and with one or two additional clicks, print a chart that included the regression line and its equation.

OpenOffice.org could print a chart that included a regression line, too. The problem was the equation. To get the equation of the regression line, you had to redo the regression somewhere else in the spreadsheet. If you wanted the equation of the line displayed on the chart, you had to manually type the equation onto the chart as a subtitle. This added a lot of extra steps to what should have been a simple one-click process. I teach chemistry, not computers. Wrestling with software to get it to do something that should be simple is a waste of my time.

That’s finally changed with OpenOffice 2.4.0. it’s now easy to display the equation on a chart, as you can see below.

[Regression line AND equation: OpenOffice 2.4.0]

… so now I should be able to use OpenOffice in my student labs. And if you haven’t looked at OpenOffice for data workup in student labs, check it out. It’s one less piece of software for your school and your students to buy.

Plug it in, plug it in.

Thursday, March 20th, 2008

I’ve been driving the same car for quite some time, now. It’s not that I can’t buy a new car. It’s more that no automaker wants to sell me the car I would like to buy. In the years since I bought my current car, the price of gasoline has soared, yet most of the current offerings from the major auto makers are no more fuel efficient than the car I already own.

The way I see it – with my commute to and from work, I shouldn’t even need to use any gas. My commute is about 15 miles each way.

If I’m going to take the plunge and buy a new car, I want something more than just a slightly less gas guzzling car than I have now. In short, I’d like a plug-in hybrid. It’d be a good deal more efficient, and it might even be less polluting – since it’s a lot easier to control emissions from one large source (a power plant) than it is from lots of tiny, separate sources (like individual gasoline engines).

It’s too bad that no one will sell me one.

C&E News has an article that surprised me a little.

The Department of Energy lab study assumes that by 2025, one-quarter of U.S. cars will run on a combination of electric and liquid fuels and will require plug-in charging. If all cars are charged at 5 PM, when electricity demand is high, some 160 large power plants will be needed nationwide to supply the extra electricity, according to the study. However, it says, if the charging is done after 10 PM, when demand is minimal, as few as eight—or possibly no—new power generation facilities will be needed, depending on the availability of regional electricity.

I’d assumed that putting lots of plug-in cars on the road would mean that lots of new power plants would be needed rather quickly. Apparently, that’s not the case as long as these cars designers make them default to charging during off-peak times.

So, automakers … where’s my plug-in hybrid?

The TVisto 3500 SATA Multimedia Hard Drive Enclosure

Friday, February 22nd, 2008

A few posts ago, I described my experience in trying to use my XBOX 360 as an mp3 player for my home theater system. Unfortunately, the 360 is crippled. You can’t copy your music from your computer to the internal hard drive.

Enter the “multimedia hard drive enclosure”, a class of small devices that promise to play all your music, movies, and pictures from a small quiet device that plugs right into your stereo. That sounded like just what I needed!

[TVisto]

I found a good price on a TVisto 3500-SATA, a small device that’s barely bigger than the 3.5″ hard drive that it encloses. Along with the TVisto, I picked up an inexpensive 500GB SATA drive to store my stuff. So how well does it work? Read on
to find out.

(more…)

XBOX 360: The little media center that couldn’t

Thursday, February 14th, 2008

I’ve had an XBOX 360 “Elite” (the one with the 120 GB hard drive) for a while now. Since the hard drive in my 360 is largely empty, I thought it might be nice to use the 360 as a media center. More specifically, I thought the 360 might be useful as a music center, since it’s got the ability to play mp3 files.

I’ve ripped all of the family’s CDs. It’s nice to be able to listen to anything in the music collection without going to the CD racks and searching. But listening to these music files on the stereo in the living room is a bit awkward. The DVD player will play mp3 files from CD, but that still means I have to shuffle discs around. Plus, the DVD player’s interface for doing this is clunky at best.

So why not use the 360? It’s got plenty of disk space for holding our music collection, and it’s already hooked into the stereo. Unfortunately, the 360 is a typical Microsoft product. By that, I mean it’s been hobbled – either accidentally or by design. How?

  • You can – albeit very slowly – rip audio CDs to the 360’s hard drive.
  • You can play mp3 files from a data CD.
  • You can plug an external hard drive into one of the 360’s USB ports and play the mp3 files on the drive.
  • You cannot transfer mp3 files from the external hard drive or a data CD to the 360’s internal hard drive***. If you put in an audio CD, there’s an option to copy the music to the hard drive. If you hook up an external drive or put in a CD with mp3 files on it, that option disappears. (What the f#%?)

I guess it’s all for the best. It’s rather difficult to hear quiet music over the roar of the 360’s jet-engine-like fans.


***If you can actually copy mp3 files to the 360’s internal hard drive and play them from there, clue me in on the method. In the meantime, there’s always my TVisto

JAFO: Just another FREAKY observer

Thursday, October 4th, 2007

While on my weekly Target run, I noticed something new in the electronics department. There was a small kiosk devoted to this device: The ClearPlay DVD Player.

[ClearPlay DVD Player]

Looks like a plain old DVD player, even if the color scheme is a bit goofy. So, what’s the big deal? Does the player, perhaps, try to clean up digital artifacts on early DVD releases so the picture is … clearer?

Well, not exactly. I’ll let Clearplay themselves explain it:

What is ClearPlay?
Great question! ClearPlay is a fancy DVD Player that can play regular DVD movies — but without profanity, violence and nudity.

Wow! How does that work?
It’s really quite ingenious. We create filtering information on a movie by movie basis, and then put those “filters” into the DVD player. This way, the DVD player knows when to skip or mute while the movie is playing.

You buy this player, and then pay ClearPlay for downloadable “filters”, so the player can possibly skip “offensive” parts.

Want Little Johnny to be able to watch Saving Private Ryan (no, really) without any yucky talk about fucking sons of bitches? Well, just buy this player and the filter, and Little Johnny can take in all of the entertaining violence without the horrifying swear words! (If you look at the description of the filter for Saving Private Ryan, much violence remains uncut.)

What a senseless waste of perfectly good electronic circuitry. Here’s a novel idea. Why not simply … avoid watching movies that you find offensive, or avoid leaving them around where your kids can watch them?

Teaching with technology – on a shoestring budget

Monday, October 1st, 2007

It’s an unfortunate reality in education that if you want to use modern technology to teach, you’re quite likely going to be on your own. You can get some help from grants – if they’re available. You might be able to get some technology from all-too-eager textbook publishers, but these come with a price. Your students will likely foot the bill, and if you live in an economically depressed area areas like I do, your students can’t afford it.

So what do you do if you want to use technology, but you’re on a limited budget. You can’t, for instance, shell out the cash for a Sympodium. (Especially if the funds come out of your own pocket!) If you’re willing to put in a little effort, though, you can bring some modern technology into your classroom with relatively little cost. That’s what I’ve been doing this semester with my (used, but new to me) tablet PC.

At the beginning of the semester, I decided that I’d purchase a Tablet PC for classroom use. Since I was unable to get one through the school, I decided to scour Ebay for a used model. My choices were between a Toshiba PortegeM200 and a Thinkpad X40. Since the Toshiba was cheaper and sported a higher-resolution display, I went with the Toshiba. At the time, the Ebay price for a Toshiba M200 was around $500. I added another $100 to max out the memory so the system will run its fastest. Since I was due for a laptop upgrade anyway, this wasn’t such a bad cost to absorb. The problem was – that was about all the cost I could absorb. (Education salary, you see. :) )

(more…)

A little earbud told me

Monday, April 30th, 2007

There’s an article up on CNN about a new fad for cheaters – cheating via iPod.

Some students use iPod-compatible voice recorders to record test answers in advance and them play them back, 16-year-old Mountain View junior Damir Bazdar said.

This suggests to me that some of these classes might have other problems than iPods. How did these kids got “the answers” to record?

Others download crib notes onto the music players and hide them in the “lyrics” text files.

This is actually somewhat clever. It’s the twenty-first century equivalent to hiding notes as formulas in programmable calculators – a practice which goes back at least twenty years.

The solution to this particular problem is pretty obvious, though. As we do with cell phones, we simply disallow the use of iPods during tests. In most classes, the iPod would have any legitimate use during a test! Of course, some students are not happy with such policies:

Kelsey Nelson, a 17-year-old senior at the school, said she used to listen to music after completing her tests — something she can no longer do since the ban. Still, she said, the ban has not stopped some students from using the devices.

To that I’d simply say … Kelsey, blame the students who decided to use their iPods to cheat. Were it not for them, you could still listen to your music. Of course, the school could modify the policy to state that iPods were allowed after a test had been turned in.

“You can just thread the earbud up your sleeve and then hold it to your ear like you’re resting your head on your hand,” Nelson said. “I think you should still be able to use iPods. People who are going to cheat are still going to cheat, with or without them.”

Sure, some people are going to cheat no matter what***. Banning iPods during testing, though, has two points:

  1. To make it a little more difficult to cheat. There are a substantial number of people out there who would be tempted to cheat instead of study if cheating was very easy to do. Those are the ones we are trying to prevent from cheating. The hard-core cheaters … well, those we just have to catch and get rid of****.
  2. To make it easier to bust cheaters who try to hide their cheating devices. All we’ve gotta do with a no-iPods policy in place is show that the cheater had an iPod out during a test. Otherwise, it’s much more hassle to get a cheating accusation to stick – since it would require us to find out exactly how the student hid the information on the iPod.

Despite iPods being all the rage, here at the college the old ways of cheating seem to be the most common ways. Notes written on a desk or body part, small pieces of paper pushed up the sleeve, a strategically placed scrap of notes on the floor … all of these are still in common use. Even formulas in calculators pop up occasionally – though this seems a little less common these days. Most of my students view their TI-99 calculator much like someone of my generation would have viewed a slide rule. (I can’t tell you how many students I’ve had to teach to do simple math functions on their TI!) I guess the iPods and cell phones are easier to use!


***These folks almost always have terrible grades – at least in college where I encounter them.****Sound harsh? The hard-core cheaters often brag about it to other students, lowering the morale of the entire class.