Tag Archives: ubuntu

USB Passthrough with VMWare and Ubuntu 7.10

While I don’t run windows on any physical hardware, I have a VMWare windows xp guest on my laptop that I use for a couple of applications. One of which is the programming software for my Logitech Harmony remote.

In my recent laptop update to Ubuntu 7.10, VMWare Server lost the ability to pass through the USB bus to the guest. Fortunately, a quick search on the VMWare forums came up with the following:

Please open the following file: /etc/init.d/mountdevsubfs.sh by following command – gksudo gedit /etc/init.d/mountdevsubfs.sh

Find the following lines:
#mkdir -p /dev/bus/usb/.usbfs
#domount usbfs “” /dev/bus/usb/.usbfs -obusmode=0700,devmode=0600,listmode=0644
#ln -s .usbfs/devices /dev/bus/usb/devices
#mount –rbind /dev/bus/usb /proc/bus/usb

Unmark them so that look like this:
mkdir -p /dev/bus/usb/.usbfs
domount usbfs “” /dev/bus/usb/.usbfs -obusmode=0700,devmode=0600,listmode=0644
ln -s .usbfs/devices /dev/bus/usb/devices
mount –rbind /dev/bus/usb /proc/bus/usb

Restart and your usb devices will be recognised

This worked like a champ, and now I can do the rest of my pre thanksgiving tweaks on the remote. 🙂

On returning to Gnome

Just over a week ago I completely my conversion to Ubuntu (my laptop was the last machine over).  One of the reasons for doing this conversion was to get the benefits of some of the gnome stack, like dbus, which are very nicely configured in the Ubuntu environment.  It meant that after about 1.5 yrs with Ion, I gave it up for the default Ubuntu Gnome environment.

Running Ion for a year and a half gave me perspective on a few features that are really nice:

  • Go to Window By Name – Alt+G, start typing a window title name, go
  • Go to Urgent – Alt+K, jumps you to windows that need your attention
  • Go to Prev – Alt+K, if no urgent, jumps between current and last window
  • Dynamic Desktop Creation – for a new work effort move everything to a new workspace that is relevant to it
  • Kludges – policy based placement of windows so Pidgin stays on it’s own workspace
  • Full screen windows are the way to go
  • Scratchpad – a frame that is smaller than the rest of the workspace that pops up and back on demand.

There were also a lot of drawbacks:

  • Ion had so many key bindings it tended to collide with xemacs bindings (like Alt+G).  I lost some xemacs functionality while running Ion
  • Ion didn’t really do multi window applications well, like Inkscape or Gimp.  There was a float workspace type which acted like very old fvwm.  As such I tended to use Gimp and Inkscape less because they were hard to manipulate in the environment
  • Tumo (the Ion maintainer) decided that people were forking his software, so he removed access to the darcs repository, and you could only get snapshots.  And he changed the default license to something very odd.  Running a software stack that is fundamentally unsupportable because the maintainer is actively trying to make it hard for people to get source access is bothersome.
  • Config formats changed, and 2 attempts to roll forward to something current wasted 2 hours each.

One of the reasons for Ubuntu is that their community support is pretty good, and using main path base software was what I was looking for.  But I learned a lot of lessons in the time with Ion about things that I liked, and wanted to duplicate in a gnome environment.

Policy Engine

After watching many people in meetings on MS Windows get a sensitive IM while they are giving a presentation, and scrambling, you realize the value of a policy engine for windows placement.  IMs are always on Workspace 5, always.   My presentation won’t be on  Workspace 5, so  I can get to the IMs when I’m ready to deal with them.

One upon a time, the default gnome window manager did this.  Then we got Metacity, which pretty much can’t do anything (interesting enough that compiz is bringing features like this back).  The fact that useful features are being slipped past the anti-feature HIG overlords under the guise of eye candy has a certain irony that you don’t find many places. 🙂

However, my laptop is old.  It can’t do compiz.  That’s ok, as Devil’s Pie can do it for you instead.  Devil’s Pie lets you create small policy files in lisp which control window behavior.  Before you run away screaming because of this being lisp, look, it isn’t that bad:

(if (is (application_name) “firefox_bin”) (set_workspace 2)

See, didn’t make you blind or anything.  The policy for devil’s pie is way easier to grok than ion’s kludges file, and provides a few more options.

Scratchpad for Terminals

Remember Quake?  No?  Well it’s that first person shooter all us old folks rave about, as it existed prior to 3D hardware, and let us waste nights in college on our brand new Pentium computers.  When you hit the tilda button, you got a drop down console, that did an overlay on your screen, and let you type in commands, or Say stuff.

Behold Tilda.  The default configuration actually does look like the Quake overlay.  With a bit of configuration you can make it look like an Ion scratchpad with a terminal embedded.

Unfortunately I’m having mixed success with rendering in Ubuntu 7.10 (plus a bad interaction with the next piece of software).  I’m bad, and haven’t sent in a bug report, but I will so.  When tilda was working for me, it was great. 

In full disclosure I need to say I found out about Tilda by listening to LUG Radio, where Aq brought it back in the spring.

Desktop Navigation

Once I started to use Gnome again I knew I needed better desktop navigation than the default.  I even set aside most of a weekend to write my own “go to window by name” program, as I was convinced that libwnck would give me enough to do that.  While writing a bunch of sample code that would get, but couldn’t set window properties, I found superswitcher.

Superswitcher takes over your Windows key and/or Caps Lock and creates all manner of interesting key strokes to navigate and control your work spaces.  I’m pretty convinced it was designed as the ideal test can for libwnck, as it seems to use all the features in there.

You can dynamically create/destroy workspaces, navigate very nicely through windows based on typing partial names.

Things that I still want

Tilda to work.  After a few rez / derez of tilda on gutsy, it stops displaying properly.  I need to file a bug on this.

Jumping to urgent windows with Alt+K, and a command line interface to “Go to window by name”, which let’s me have an edit command that loads a file in xemacs, then jumps my focus there.  With the code provided by superswitcher and devilspie that shouldn’t be too bad, as soon as I figure out why libwnck was ignoring all my set requests for focus and workspace changing.

Superswitcher currently segfaults when tilda is running.  This has to do with tilda not being in any workspace, which defies the superswitcher logic.  Should be an easy fix, just need to carve out an hour or two to do it and send it in.

What makes you productive in Linux?

Sit down and think about it some time.  Post a comment about it, I’d love to hear your thoughts on this, as well as any experiences with other interesting Linux desktop tools that collectively make your environment optimized.

Switching to Ubuntu

In the last month I decided to switch my primary Linux distro from Mandriva to Ubuntu. It will take me until the end of the year to fully switch over, mostly because my work laptop can’t really afford the downtime, and it is scheduled for replacement come November anyway. There were reasons for leaving Mandriva, such as:

  • Stuff doesn’t “just work” on Mandriva any more. Recently I was doing some work where I wanted to reevaluate IDEs. The monodevelop and eclipse packages that I could get for the distro fell over sideways immediately. 😦 Even f-spot doesn’t work out of the box.
  • The perpetual issue that it took a month after release for the package install mirrors to sort themselves out, and the club urpmi repository has broken ssl certs, so curl won’t work with them.
  • 2007.1 breaks 3D on my laptop, so I can’t upgrade. Even though it is only basic 3D, it is enough to run the test apps I need for my work. In the current rev of Mandriva, I’m SOL.

There were also plenty of really good reasons to go to Ubuntu:

  • Being familiar with what I’m handing out. 12 months ago Ubuntu became the clear winner in the “Hey new person at our LUG, if you want to try Linux you should start with this“. Canonical sends me a bag of CDs whenever I ask for them, and they make good give aways at the LUG. I’d say better than 50% of our LUG is now on Ubuntu.
  • Easy for schools. I started doing some work with public schools in getting free / open software into them. Ubuntu / Edubuntu is definitely a good place to start. Again, being able to help support these folks with what they are using is a good thing.
  • Mono Integration. Ubuntu has been staying on top of the bleeding edge of Mono, as they use it for a lot of their featured desktop aps. Mono/C# is now part of my day job, so having the latest and greatest is a good thing.
  • Mark Shuttleworth.
  • Launchpad. Unlike all the rest of the distros the Canonical folks are actually spending time on their own support infrastructure, which is really good. While I wish they would support hg in addition to bzr for source management, it is a quite good start.
  • Polish. Ubuntu installations only start from a Live CD, so you can know that your system works with Ubuntu before trying to install. This means your risks of having a multiday failed install are drastically lowered.
  • Mark Shuttleworth. Seriously, go read his blog. He is an incredibly inspiring guy, and has really provided a vision of Linux hackers / users as human beings instead of IT trolls snapping at users.
  • Raw numbers. The number of Ubuntu users are on the rise, quickly. For instance, nomachine offers Ubuntu packages for their NX software. This has the side effect that I’ll be able to create less custom packages, as many more folks are packaging for the platform.

I’m sure I’ll think of more reasons, and rationale as I progress down this new road. I’ll also post on various bits about Ubuntu I’ve found either good or bad in the process. Other than the lack of a service command (which I’m just going to build my own package for, as muscle memory on tab completing that is too hard to break), the transition has been very smooth. My home desktop was migrated last weekend, and the media server just a couple of hours ago. Once I get back from vacation, I’ll start hitting some of the boxes at work that I maintain.

Nagios revisited, the debian way

I have to give the debian/ubuntu folks some credit for their packaging of nagios. While the mandriva configuration was pretty straight forward, you had to normalize things a lot yourself, otherwise you were adding 20 new lines for each service and/or host.

The configuration that is default in ubuntu uses hostgroups very effectively, so you setup a host group for every type of service. If you want to monitor a webserver on a host, you just add it to http_servers. In about an hour I had completely rebuilt my monitoring setup for home and offsite servers, and was getting alert emails again when things go funny.

Nicely done folks, nicely done.