Rigol Ultrascope under Linux with VirtualBox

Ultrascope in Action
Ultrascope in Action

I recently bought a Rigol DS1102E (um, well… maybe it was a DS1052E and I ).

Being a Linux user, I wondered if Rigol’s software, Ultrascope, would work somehow on Linux. The device is USB and it shows up perfectly well as a usbtmc device, so if you want to write your own software on Linux, that’s pretty easy.  But it also means not much chance of Wine running Ultrascope (although maybe with the serial cable; I didn’t try that). However, I have XP running under VirtualBox for just this sort of thing.

I installed the drivers and Ultrascope off the CD. Big mistake. The CD has the service manual on it and the operator’s manual, so don’t throw it away. But don’t install any software off of it either. Here’s what you need:

1) Latest NI Drivers: 

2) The Rigol USB drivers have the wrong USB ID or something on Linux is changing the ID (vendor=1ab1,pid=0588 in Linux/VirtualBox, the Rigol.inf file vendor=0400,PID=05dc). Of course, I was so smart, I changed the INF file and got it mostly working. WRONG. Use the NI driver. What that means is in Device manager, it should say “USB Test and Measurement Device”


“Rigol USB Test and Measurement Device”. If you already have the Rigol drive installed, do an update driver, tell it to Install from a list and “Don’t search I will choose the driver to install.” If you have the NI stuff installed you should see two choices: Rigol USB Test and Measurement Device and USB Test and Measurement Device. You want the one WITHOUT

Rigol in the name.

3) The VISA version of Ultrascope (this was my big mistake, using the “regular” version). See . Even on a “plain” Vista install the regular version had small issues.

Of course, for Virtualbox, you need to go to the Devices menu and “connect” the Rigol USB device (this one will say Rigol and that’s ok). You can also change your setup to add it automatically, but I’m going to assume you know how to do that.

And the results? Well, Ultrascope is probably of marginal value anyway. You can always dump data files and images to a USB drive right on the scope. I guess if you had a lot of setups, or wanted to use the measurement pass/fail feature. The Memory waveform will let you open the WFM files the scope dumps of waveforms, so I guess that’s something too.

Oh. And I haven’t tried it, but the fact that it is just using the NI VISA drivers tells me it ought to feed LabView with no problems. Of course, you could probably run that directly under Linux too.

KMyMoney QIF Import from PayPal

I have been trying to switch some financial record keeping (as I do every tax time) to the computer. This round I’m trying KMyMoney which is a Linux program and seems to work well. The way it sucks up bank records automatically is awesome. However, the PayPal QIF export is lame. It makes a bunch of accounts on its own. It also insists on making payee info for everyone who sends you money (most of whom are just one shot eBay payers). It also splits every transaction into a main part and a fee even when the fee is zero.

So… KMyMoney allows you to filter QIF data before it tries to read it and I wrote an awk script that cleans it up from my point of view. It might work for you. It might now. It might cripple your dog and cause premature balding. I don’t know. But if you are brave, here it is:

 #!/usr/bin/gawk -f
# This script cleans up PayPal QIF for import
# I use it with KMyMoney
# It may or may not work for you

# All fee splits are renamed to Business:Bank Fees
# I assume all payments have fee=0 and so
# the fee is stripped out along with the split data
# All payers get renamed to PayPal Customer and
# the category becomes Business:Revenue
# All payments sent have their categories stripped
# so the import system will match the payee info for it


    CFG_FEE_TEXT="Business:Bank Fees";   # mark paypal fees
    CFG_REVENUE="Business:Revenue";      # revenue account
    CFG_CUSTOMER="PayPal Customer";      # All Pay Pal customers
    inrec=0 }

/^!/  { inrec=1; newpay=0; fee=-1; nosplit=0; print; next;  }
/^[\^]/  { inrec=0; newpay=0; fee=-1; nosplit=0; print; next; }

nosplit && /^(S|[$]|E)/ {

/^SFee/ { fee=1; next; }

fee==1 {
    if (match($0,/\$0[.]00/)==0) {
	print "S" CFG_FEE_TEXT;

/^L.*Payment Sent/  {

/^S.*Payment Sent/  {

/^L.*Payment Received/  {
    print "L" CFG_REVENUE;

/^S.*Payment Received/  {
    print "S" CFG_REVENUE;

/^SSecure Card Purchase/ {
/^LSecure Card Purchase/ {

/^P/ {
    if (newpay!=0) { print "P" newpay; next; }

  { print; }

Put all that in a file and make it executable. If you don’t know what that means, maybe you shouldn’t be slicing and dicing your finances with a script.

If I were you, I’d try it from the command line on some QIF exports and examine the output very carefully before I used it for real. I’d also backup my database before any import. But you are doing that anyway, right? Right?


I’ve been enjoying KDE 4.4. The new Window management features are really nice — grouping windows as tab (check the system menu or middle click and drag a window title onto another one) is cool. I also like being able to tile or maximize windows by dragging them to a screen edge (even the edge of one of my multiple monitors — hooray).

There is a Blog tool included in the latest KDE call Blogilo. I’m using it to write this. Very nice editor interface and easy enough to set up.

Now if I could just get it to interface with one of my other Blogs that I don’t control….

Kubuntu KDE4 Toolbar Icons for KDE3 Programs

I noticed that a few programs (like kpdf, piklab, pikloops, etc.) were not showing icons in their toolbars. The common element seemed to be that they were all KDE3 programs and I was using KDE4. But that should work.

It took a little detective work, but here’s the solution: I had changed theme files and apparently most these have a missing line that enables this to work. In my case, I was using Nuvola, but the same principle will work with any theme.

1) Find the index.theme file for the theme you are using. In my case, it was in /usr/share/icons/nuvola/index.theme.

2) Edit it (you’ll need to be root — that is use sudo) to save it. Add a single line:


I don’t know that it matters where you put it as long as it is in the [Icon Theme] section. I put it right under DisplayDepth=32.

3) I don’t know if you have to reload the theme, but I did. I just picked another theme, hit Apply, and then picked Nuvolo again and hit apply. You also need to restart any programs that you expect this to fix.

4) Enjoy toolbar buttons with icons.

Linux, Gambas, and Physical Computing

Creating embedded applications is easy using the

— if you are a Windows users. But what about Linux?

The GP3’s always had a Linux library available (which was recently updated to make creating a shared library easier). And you can always use Java if you can get Java to work with your serial ports. But a Windows developer can always slap together something in Visual Basic in a .

shows you how to use Gambas, a Linux rapid application development tool, to work with the GP3. Gambas is a lot like Visual Basic, but in fact its better.

The GP3 support for Gambas includes a Gambas component so you can use the GP3 on Linux as easy as Windows user with VB!

The sample program flashes an LED and watches a PIR sensor to dismiss your computer’s screen saver when you approach the PC. Of course, that’s just a simple example. You can access all of the GP3’s analog and digital I/O functions easily with Gambas.

Select your OS at reboot (KDE 4.1)

If you use grub and have a boot menu with several different entries, did you know you can configure KDE to let you pick which one to use when rebooting?

Go to System Settings and on the Advanced tab, pick Login Manager. On the Shutdown tab, pick Grub as the Boot Manager.

That’s it. Now when you see a restart button it will have a little arrow that will allow you to pick any of your grub entries for the next reboot only.

Pretty cool.

Flash! (Adobe) for AMD64 Linux/Ubuntu

One of the downsides of using 64-bit Linux (I use Kubuntu, a variant of Ubuntu) is that there hasn’t been a 64 bit Flash plugin. Sure, you could use a 32 bit browser, but that seems wrong. You could also use nswrapper to provide a 64 bit front end to a 32 bit plug in, but performance is not so good and it occasionally fails mysteriously.

I guess Adobe got tired of hearing folks whine, so they’ve released an alpha version of a 64 bit flash plugin. So far so good:

apt-get –purge remove nonfree-flashplugin nspluginwrapper

wget http://download.macromedia.com/pub/labs/flashplayer10/libflashplayer-10.0.d20.7.linux-x86_64.so.tar.gz
tar xvf libflashplayer-10.0.d20.7.linux-x86_64.so.tar.gz

sudo mv libflashplayer.so .mozilla/plugins/

Restart Firefox and check the about:plugins page.

YouTube videos still play in squashed fullscreen if you have dual monitors but that’s not a 64 bit issue.

Enjoy! Now if only Sun would give us a good 64 bit Java plugin….

Better Screen Shots for KDE4

By defualt Kubuntu with KDE4 (at least) sets up Print Screen to work with ksnapshot. This program grabs the screen (or a window with the -c option). The program is minimal and lets you save a file, copy it to the clipboard, or open it with a program.

However, you can use apt to install kgrab. This program is functionally the same as ksnapshot but it has an actual menu as well as a way to directly print screen shots.

However, both the KDE “input actions” and Compiz were trying to handle the print screen key. Changing ksnapshot to kgrab didn’t do anything! So the solution was simple:

cd /usr/lib/kde4/bin
sudo mv ksnapshot ksnapshot.orig
sudo ln -s kgrab ksnapshot

That does it.

Office 2007 Documents for Open Office

The Open Office suite that installs with Kubuntu can read Office 2007 formats (e.g., .docx for Word, .pptx for PowerPoint, etc.). But the filter is pretty rudimentary — it pretty much just draws in plain text.

has packages that include a much better filter along with the integration hooks required for Open Office. The resulting document has special characters, graphics, headers, footers — the works.

The only hitch I found is that I already had the odf-converter package installed which prevented the integrator from installing. I guess it has its own copy. The key was to use apt to remove the existing converter and then install the integrator as described on its Web page.

NVidia TwinView Problems (and Solutions)

One crucial element to my new Linux install was to get my dual monitors working. I have a NVidia 8500 card, and early testing with Kubuntu off the live CD were not promising.

NVidia does have a “restricted” (that is, not open source) driver that you can automatically install. However, my second monitor would not go beyond 640×480! There were a few other issues as well.

To cut to the solution, the installer misread my monitor’s info and guessed wrong at the sync frequencies the monitor could handle. I wound up having to manually change the sync frequencies in /etc/X11/xorg.conf to match my monitor’s range:

Section “Monitor”

HorizSync       31.0 – 80.0

VertRefresh     43.0 – 72.0

Of course, you need to be root to change that file.

Also under Screen, I set:

Option         “AddARGBGLXVisuals” “True”


Option         “Coolbits” “1”

The first option seemed to speed up my display quite a bit. The Coolbits setting lets the nvidia-settings program change the clock speed of the card which can significantly speed it up.

Two notes: First, if you want the nvidia-settings program to save data, you must run it as root (I use sudo although you should probably use gksudo or kdesudo. The other issue is that even as root, the utility does not save clock speed ups (since they could crash your machine). So when you know you want to save the clock speeds, you’ll have to arrange for the settings program to run on startup. I have mine in my session start, for example:

/usr/bin/nvidia-settings -a GPUOverclockingState=1 -a GPU2DClockFreqs=544,581 -a GPU3DClockFreqs=544,581

Assuming, of course, you want to set the core to 544MHz and the memory clock to 581MHz.

Update: Also, some settings get stored under your home directory and won’t reload without a -l in the above command line. Gamma settings, for one.