Archive

Archive for April, 2007

Using Graphviz to Visualize Debian Package Dependencies

April 30th, 2007 jesse No comments

Have you ever wondered just how inter-related debian packages are? Or perhaps wondered why so many other packages were pulled in when you went to install something relatively simple?

Well, if you’re building a system from scratch it helps to know these things; especially if you only want to install some but not all of the Gnome packages.

There are many ways to manually inspect package dependencies (apt-cache depends …), but few visual tools. However, with a quick script and the Graphviz tools, we have an excellent set to tools to visually inspect any package dependencies we wish.

The Graphviz web site has all the tools and manuals you’ll need.

To start, I wrote a simple script in Ruby (my first Ruby program) to recursively call “apt-cache depends” beginning with the debian package of our choice. The script results are a recursive list of package dependencies output in DOT graph format, which you can then enter into Graphviz to create your graphs.

The Ruby script is here: depends.rb

I also wrote a quick shell script to automatically create different types of graphs, so I could choose the simplest or clearest one.

The graph-making shell script is here: makegraphs.sh

Here are some example graphs with links to the full, SVG versions.

Linux-Image

Linux Kernel Image – Full Recursion

 

Gnome - Force Graph

Gnome – 2 Levels Deep – Force Graph

 

Gnome - Horizontal Graph

Gnome – 3 Levels Deep – Horizontal Graph

Categories: Linux Misc Tags:

My OS X Wish List – A New Finder

April 26th, 2007 jesse No comments

Number 1: A New Finder

Apple’s Spotlight is great for launching apps. Really great. It’s world’s better than the Windows Start button.

However, for managing files and contributing to productivity, Apple’s Finder is just miserable. Windows File Explorer is the Gold standard, but Gnome Nautilus is more flexible. Both are tremendously more usable than Finder.

Here’s my list of peeved reasons why I do not like Apple’s Finder:

Usability

You must be able to navigate with the keyboard. It’s more efficient, faster, better, stronger, etc. If you can type, there are 104 reasons why the keyboard is a more efficient data-entry and command interface to the computer. Windows understands this concept and has included it throughout the operating system. Excellent. Finder – well, you’re a slave to the mouse.

Screenshot- Windows Explorer
Windows Explorer – Near Perfect

All the common features you want in a file navigator and manager are awkward in Finder. Enter equals select and open, right? Nope. That’s Rename! Retrain yourself to use Open-Apple Down Arrow. You can delete a file by pressing Delete, right? Nope. Drag & drop or use Open-Apple Backspace. You get the picture. It’s non-intuitive and awkward.

Difference for it’s own sake doesn’t always equal better. Mirroring the Windows key bindings in Finder would go a long way for OS X. At least give me the option to change them!

Previews and Thumbnails

Nautilus does this feature spot-on. In both list and icon view you can scale the image size up and down to accommodate the task at hand. Managing files? Small print. Managing pictures or movies? Large icons. Easy.

Screenshot- Nautilus File Browser
Gnome Nautilus – Very nice

Explorer has the best list-view. Compact and efficient, with small type. All the items are consistently sorted as you would expect – folders, then files, all by type.

Flexibility & Expandability

Nautilus and Explorer are expandable via scripting. Nautilus is more approachable, and the scripts can be context sensitive and can be C, Python, shell, whatever works for you. Explorer requires VBasic or VisualC or other MS tool nonsense.

One feature I really like about Nautilus is related to the rant above about key-bindings. Nautilus will let you map any event or function to any key binding you wish. The defaults are as you would expect (following the Windows examples) but you can add any new combinations you want.

Consistency:
Explorer wins here. It will set my preferred view to all folders and not bother me with the details. Nautilus and Finder remember how I viewed each folder and automatically adjust, a feature that’s just plain annoying. If the task I’m working on changes, I’ll change how I want Finder to behave. This concept of anticipating what I want is actually a loss of control: both counter-intuitive and just annoying.

Design:
Finder’s launch bar is a very convenient feature for accessing commonly used locations, directories and applications. However, Nautilus’s take on the two column file manager is by far the best implementation I’ve seen yet. What do I like about it. Simple: I can select what the left column shows depending upon what I need to do.

Navigating directories and managing files? Great. Use the tree view. Working with network drives, which you need to automount or re-mount? Easy, use the locations view?

So which do I prefer to use?

For sorting and organizing files? Explorer by far.

For general working with files? Nautilus is the most flexible.

For using as little as possible? Finder. It finds files fine, but is a lousy tool to manage them.

Screenshot- Apple Finder
Apple Finder – Yuck!

Categories: Nonsense Tags:

How to Compile a Debian Kernel

April 25th, 2007 jesse No comments

Compiling a custome linux kernel is quite easy (make menuconfig, make bzImage, cp bzImage, reboot….)

But what if you want the debian-”family” of software management tools to know about your new kernel and it’s associated modules?

Falko Timme has written a very good How-To for building your custom kernel into a debian package, which you can then install and manage with dpkg.

Falko’s web site How-To is here.

I’ve also captured a PDF version in case that goes away.

Categories: Linux Kernel Tags:

Building your own Linux LiveCD

April 24th, 2007 jesse 1 comment

I wrote a step-by-step how-to for building a Linux LiveCD. I also wrote a series of shell scripts to automate the process.

Document Abstract:


Now that we know how to disassemble a Linux LiveCD, let’s learn how to build our own. The process of creating a Linux Live-CD is essentially the same as process as decomposing one, only in reverse. We must first build a root disk for the system to use, then create a boot disk to load the system, and finally we combine them together with a boot loader to make our bootable CDROM. In summary:

  • Create a working root disk
  • Create a boot disk
  • Configure the system boot loader
  • Compress the root disk with squashfs
  • Combine the compressed root and boot disk into a temporary staging area
  • Create a Live-CD ISO from the combined boot and compressed root disks
Categories: Linux Misc Tags:

Unwrapping the Ubuntu LiveCD

April 24th, 2007 jesse No comments

A document I wrote describing how it’s done. Available in PDF: Unwrapping the Ubuntu LiveCD

Abstract:

The Ubuntu live CD is elegantly simple. It can be unwrapped in three quick steps.

  1. Extract the boot file system to understand stage 1 and 2 booting
  2. Extract the initrd file system to understand loading the kernel and system initialization for a live CD environment
  3. Extract the root file system to learn how the live system works

Preparations:

  1. Download a Ubuntu ISO
  2. Create three working plus one temporary directories
  • fs-boot-ubuntu
  • fs-initrd-ubuntu
  • fs-root-ubuntu
  • fs-tmp
Categories: Linux Misc Tags: