Posts tagged with “linux”

Fix Title Bar Issues in Ubuntu 8.10 (Intrepid Ibex)

Towards the end of November, I upgraded (read: completely rebuilt) my Linux partition from 8.04 (Hardy Heron) to 8.10 (Intrepid Ibex). I’ll have more to say about the latter in a future post, but after the upgrade I was immediately faced with two problems. One, the inability to establish a VPN connection, that was critical to my ability to use this as my primary work computer and the second, an issue with my title bars that, though extremely annoying, was really just aesthetic.

The solution to the VPN issue is detailed in an earlier post and today I finally got around to fixing the title bar issue. It took me a while because, though the solution itself is relatively simple, I had a lot of trouble finding the entire solution in one place. Thus, the birth of this post.

The Problem

They say that a picture is worth a thousand words, but unfortunately I neglected to take a screenshot before fixing the problem. Nonetheless, I’ll try to keep my description well under a thousand words.

Frequently and inconsistently, my active title bar would go grey and the appearance would fracture. I don’t know how to describe it any better except to say that if Picasso himself had painted a title bar in shades of grey, it would have probably looked much like mine. Cubist, indeed.

The problem, in a nutshell, is with the NVIDIA video driver. If you don’t have an NVIDIA video driver, you probably don’t have this problem. Intrepid Ibex ships with three proprietary NVIDIA driver versions: 96, 173 and 177. I don’t remember which was installed by default, but I encourage you to trust me when I say that not one of them worked.

The Solution

First, of course, you need the right driver. I read somewhere that version 180.06 worked as expected so that’s the one I downloaded. I’ll save you the suspense and tell you that this version did work for me. It can be downloaded from the NVIDIA site, but be sure to select the 32 bit or 64 bit version, as appropriate. I downloaded it to my desktop. Once you have the appropriate driver:

  1. Close everything except for a terminal window. I do mean everything because you’re about to stop the X Windows process.
  2. In the terminal window, type sudo killall gdm and hit Enter.
  3. Once the screen goes black, hit Ctrl+Alt+F1 to switch to a new terminal.
  4. You should see a terminal prompt so switch to the directory where you downloaded the driver file. My command was cd ~/Desktop.
  5. It may be sufficient to just use sudo here, but just to be sure, I dropped into a root shell by typing sudo -s and hitting Enter.
  6. Execute the driver file. If you didn’t rename the file, the terminal command should look something like this: ./NVIDIA-Linux-x86_64-180.06-pkg2.run.
  7. Follow the prompts through the installation process. You may see some scary messages about the driver having “no precompiled kernel interface”, but allow the install to do what it needs to do (it’ll ask to check for one and, failing that, it will ask to compile its own). I let it go about its business and had no problems at all.
  8. Once the install is complete, you can probably just type startx and hit Enter, but again, I wanted to be really, really sure, so I did a full reboot. If you used sudo -s as I did and choose to simply restart X, I’d recommend logging out of the root shell first or else you’ll start X as root.

That’s all there is to it. So far, everything looks good, but I have noticed one thing that looks odd to me:

Ubuntu Hardware Drivers Window

Seems Ubuntu thinks I’m still using version 177. As I said in my last post, Ubuntu is pretty solid, but not everything “just works”.

Intrepid Ibex VPN Connection Fails

At the end of last week, I performed an upgrade from Ubuntu 8.04 (Hardy Heron) to 8.10 (Intrepid Ibex). Although it’s not really part of this story, I should specify that I tried to perform an upgrade. The upgrade was so catastrophically botched somehow, that it ended up being a complete repartitioning of my work laptop. Nonetheless, over the weekend I got back to a reasonable level of stability and productivity except that I was completely unable to connect to my office VPN.

Evidently this is a pretty well-reported bug affecting a number of folks. My attempts to connect to VPN “out of the box” were greeted with a complaint that “no valid VPN secrets were found.” A number of folks reported success if they simply removed their password from the configuration dialog, but that didn’t work for me. After doing so, I got a spectacularly unhelpful message that my “Connection to [my network] failed.” Super. Thanks for playing.

I spent hours searching and trying various “solutions” before finally stumbling on a clearly articulated set of instructions that worked. They did, however, require updated network-manager packages. In case I ever have to do this again, I don’t want to spend those same hours, so I’m going to try to document the steps I took so I can reflect on them later. Maybe they’ll help someone else too.

To get those add the following source to /etc/apt/sources.list:

deb http://ppa.launchpad.net/network-manager/ubuntu intrepid main

Once done, update:

$ sudo apt-get update

Once updated, system updates should be reported and they should include network-manager and network-manager-pptp. Those need to be installed. Once everything is installed, these instructions should finish the job and provide a working VPN connection.

Ubuntu is pretty solid, but not everything “just works”. Quite.

Remove Conflicted Files from Dropbox

Because I use Dropbox to share selected runtime data (read: Firefox profile information) across machines and because I occasionally forget to exit the runtime environment (read: Firefox) when I move between those machines, Dropbox creates conflicted files from time to time. The conflicted files are saved separately and are named something like this:

places (my.machine.name's conflicted copy 2008-11-13).sqlite

The file above is my Firefox bookmarks database. I have no idea how it came to be in a conflicted state, but the ugly truth is that I don’t care. I assume that Dropbox saves these files as a safety measure against losing their customers’ data and so that the customer can perform a diff on those files if they choose. I don’t choose. I keep convenience files in my Dropbox, not critical files, so the files themselves are not worth the effort it would take to find and evaluate the delta between the “good” file and the conflicted file.

To that end, I’ve taken to simply removing them and because I don’t want to browse the directory structure or do this in any other manual way, I let my operating systems do the work for me. This is easy in Unix and, since two of my machines (my two primary machines) are Unix-based (OS X and Linux), it’s easy for me:

$ cd ~/Dropbox
$ find . -type f -name "* conflicted *" -exec rm -f {} \;

Poof. Now they’re deleted and Dropbox will delete them from my Windows boxes for me. I’m sure that there’s a way to do something similar on Windows, but my DOS skills atrophied many moons ago.

Strip ^M Characters from Files

Because I regularly move between operating systems, I often need to use Windows-created files on Linux. Because of the difference in EOL notation between the operating systems (notice how I carefully avoided any editorial comment on that difference?), that means regularly encountering the ^M character.

While I’ve never found a situation where the character creates a real problem for me, it’s certainly annoying to see those things all over a large file. In the past I’ve used elbow grease and/or various shell scripts to clear these, but today I found out that Ubuntu (probably other distros, as well) offers a utility to do this quickly and easily.

The package is named tofrodos and, while not installed by default, is available in the repository. To install & use:

$ sudo apt-get install tofrodos
$ dos2unix <file to convert>

Couldn’t be easier, right? This is the thing I love best about Linux.

Rethinking the Taskbar

Over the last couple of weeks, I’ve noticed something about how I’ve organized my desktop: it no longer includes a taskbar. And, although it’s one of those computing metaphors that been around forever and seems timeless, obvious and necessary, I don’t miss it at all. In fact, I really like not having it around.

The taskbar, as it exists by default (but with variances) in each of the three operating systems that people talk about when they talk about operating systems, exists to serve three primary purposes:

  1. Application launcher
  2. Window manager
  3. Notification area

What I’ve gradually realized is that the only capability I really need and use is the notification area. The other two concerns are better handled, I think, in other ways.

Application Launcher

In the interest of full disclosure, I’ll admit that I keep this functionality around on my desktop, but only in the interest of fallback. Except in the case of emergency, I used a third party key-based application launcher that is unobtrusive and more productive for me. My choices: Quicksilver (Mac), GNOME Do (Linux) and Launchy (Windows).

There’s no escaping the fact that a few key taps is easier and faster than wading through layers of nested menus.

Window Manager

The window manager is the visual metaphor that indicates which applications are running and/or which windows of a given application are open. On Mac, this is a function of the dock, on Linux it’s a panel accoutrement that can be added or removed like every other panel option and on Windows it’s that middle area of the taskbar between the Start button and the system tray (now called the notification area). But why do we need it?

Once I noticed that I’d effectively removed it from my consciousness, I started thinking about why. The fact is that I already know what windows are open when I need to know. At any given time, only one window is, and can be, active. If I need another application or window, I use the keyboard-based task switcher to access that application or window. On a Mac, that’s Cmd+Tab to switch applications and Cmd+` to switch between windows of the active application. On Windows and Linux, Alt+Tab does both. In order to switch tasks, the task switcher includes a display of the other applications or windows that are open.

In my mind, the only time I need to know what other applications and windows are available to me are when I no longer want the one that’s currently active. At that time, I’m using the task switcher anyway, so the constant visual cue on the taskbar is actually just visual clutter.

Customizing the Desktop

Unfortunately, removing the window manager and application launcher isn’t possible on Windows, but I no longer use Windows on a regular basis and it is possible, at least superficially, on both Mac and Linux.

Mac

Mac separates the three purposes of the taskbar nicely for me. The application launcher and window manager are contained within its dock while the notification area exists on the menu bar. I can’t remove the dock without doing some potentially detrimental system-level hacking, but I’ve set it to auto-hide and moved it to the left of my desktop where I’m less likely to hover over it and make it display. Although it’s still around and available, I haven’t used the dock in a very long time.

Linux

Linux, or more accurately, the Gnome desktop environment that I prefer, does an even better job of separating these concerns. Gnome uses a panel metaphor on which the user can place different functional components. My desktop includes a single panel at the top of my screen that looks a lot like my Mac menu bar. It contains my application launcher – as I’ve admitted, I do keep it around just in case – and my notification area, but no window manager.