Dedicated to my late brave, beautiful and silly mummy, Debra Ross. I love you mumster.

Skip navigation

Category archive for x11

Because archives are so much easier than having just hundreds of posts on the home page. I learned that the hard way.

FreeBSD on an Armada M300 rocks

If you remember back a few weeks ago I posted that I had inherited a Compaq Armada M300 subnotebook. It’s no MacBook Air in the design department, but without optical and floppy disk drives, it’s very lightweight and small. It’s also several years old and has very conservative specs (600MHz Mobile PIII from 2002!) though, so it certainly won’t be running Windows Vista any time soon… which is just fine because my favourite OS (for non-Apple hardware of course!) is FreeBSD.

My new (at least to me!) Compaq Armada M300 subnotebook

Before I go any further I have to say this right up front: FreeBSD in the mobile space has come a long way. Despite my preference for the BSDs I always told people up until recently that they were better off running a flavour of Linux such as Slackware or Gentoo (my two preferred distributions) if they wanted to run a free OS that was a bit more technical and capable on their laptops.

Not any more! I popped in a home burned CD of the latest release of FreeBSD (7.0-RELEASE) and booted the installer and was absolutely blown away by the hardware support. Not only did it detect the internal 10/100 ethernet port and the ATI graphics but the PCMCIA wireless card which has always been iffy in past experiences. After installing, booting for the first time, updating the base system, installing Gnome2-lite from ports and configuring Xorg I had a slick and completely usable desktop (rearranged to resemble Leopard of course!):

Gnome on FreeBSD on an Armada M300

What also really blows me away is how responsive all the applications are, especially on a fully fledged DE like Gnome (which itself only takes a few seconds to start) and on such conservative hardware: granted I almost tripled the amount of built in memory from 128MiB to 320MiB and installed a new hard drive with a much larger cache than the previous stock!

I can really see myself using this instead of my MacBook Pro in settings such as coffee shops or for lectures where I’m only running a local wiki for note taking, editing source code and using email; the marketing for the Asus EeePC and the MacBook Air is starting to sink in it seems! I could have used Xfce, Fluxbox or the like, but I’m so impressed with Gnome’s performance as is, currently I don’t see the need.

I’m still in the early stages of setting this machine up with its new OS and DE, but I’ll post more information as I find out. On my current to do list: figure out if and how the "soft buttons" above the regular keyboard can be used somehow, getting high resolution console support compiled into the kernel and figuring out how to adjust the screen brightness on the fly. I haven’t tested the built-in modem yet as I haven’t needed it, but potentially getting that set up to send faxes would be useful too.

Sleek Openbox in KDE on FreeBSD

We all readily admit that KDE is the greatest desktop environment ever developed for BSD, Linux, Solaris and other Unix-like operating systems, but that’s not to say it can be improved by, or complimented with, other software.

ASIDE: Some people may not agree with my statement that KDE is the greatest desktop environment ever developed for Unix-like operating systems. I readily admit that Xfce is also very nice, especially when you’re using lots of GTK+ applications.

If you’re a GNOME person, well I guess we can’t all be perfect ;-)

Case in point, the Openbox window manager. Window managers draw the widgets, title bars, resize handles and other elements onto application windows. Desktop environments such as KDE, GNOME or Xfce bundle their own window managers along with software developed specifically for their environments, such as Konqueror for KDE.

Despite this bundling, it it is possible to replace the default window manager with one that you choose. You may do this to reduce memory usage, change functionality, or even just for a different visual style.

Openbox running in KDE (with Amarok listening to Whole Wheat Radio!)
Openbox running in KDE (with Amarok listening to Whole Wheat Radio!)

To use Openbox instead of Kwin in KDE on a FreeBSD (or similarly configured) machine:

  1. Update your ports tree, then
    cd /usr/ports/x11-wm/openbox/ && make install clean.
    Alternatively, just install the package with pkg_add -rv openbox
  2. Open the .xinitrc config file in your home directory
  3. Comment out # exec startkde (add a pound sign / hash)
  4. Add exec openbox-kde-session

For NetBSD, you’ll want to update pkgsrc then /usr/pkgsrc/wm/openbox/ && make install clean clean-depends instead in step 1.

To make it easier to change visual themes, the layout of the widgets and so forth, you might also want to install the ObConf tool which is also available in FreeBSD Ports and in NetBSD’s pkgsrc.

Leopard’s X11 issues resolved

Apple’s Leopard release of Mac OS X has been great in the user interface department, but their bundled X11 implementation is seriously broken which is a crying shame given it worked so well in Tiger. You can read my rambles about fun with X11 and some applications that didn’t work on it on my Software Compatibility with Leopard post.

Fortunately the X.org folks and Apple have stepped in and provided updated (albeit unofficial… what does that mean exactly?) XQuartz software which you can install from the command line.

bunzip2 Xquartz-<version>.bz2
sudo install -b Xquartz-<version> /usr/X11/bin/Xquartz

I’m running the latest downloaded version and it seems to have solved most of my Leopard X11 problems including having several X11 icons appearing in the dock, the slow tool movements in The Gimp, Inkscape refusing to boot, weird GTK theme failures and so forth.

Inkscape and The Gimp with the patched version of X11 on Leopard

What I want to know is why Apple didn’t choose to bundle and distribute this lifesaving X11 update using their Software Update mechanism or with the 10.5.1 update. I can only theorise that because it’s targeted mostly at power users who probably already run MacPorts or similar utilities that this was more appropriate, or maybe it has something to do with the fact that this is an “unofficial” release or beta.

As far as I’m concerned the X11 that ships by default with Leopard on disc is seriously broken, and this patch solves the problems. I can’t help but wonder though how many people who don’t know much about X11 have been put off Leopard because some of their apps are broken.

You can keep up to date with X11 on Leopard by keeping up to date with the XQuartz on Mac OS Forge website.

Software compatibility with Leopard

Making Camino look like a Leopard app

Having used Mac OS X Leopard now for just over a week I can safely say I’ve had a fairly painless experience using software that was released in the Tiger era, though there have been a few gotchas. In case it’s useful to someone I’m posting information on some of the applications I’ve had minor troubles with.

This is by no means an authoritative study, and it is possible that the software problems I’ve posted here might be a result of my own unique computer configuration or even misunderstanding on my own part, in which case feel free to correct me by posting a comment :).

X11.app

X11 to me feels like it’s exactly the same in Leopard as it was in Tiger; the title bars and bundled apps are exactly the same. I remember reading somewhere that Leopard was going to be bundled with an Xorg distribution instead of XFree86.

Anyway those issues aside, the problem I seem to have is that even though I move the X11.app icon to the Dock from the Utilities folder, whenever I launch an application that uses X11, another identical X11 icon appears at the end of the dock and the first one that I placed there crashes. This has happened on two wipes and reinstalls of Leopard.

The other issue I have is that X11 doesn’t respect the space limits imposed by the Apple menu. If you try and move any normal window on OS X above the Apple menu it doesn’t work, but X11 apps are more than happy to creep behind the menu which makes them that much harder to grab and bring back down again:

Inkscape.app

For some reason when I try and launch Inkscape it informs me that I don’t have an X11 compatible environment installed and promptly quits. To work around this, I launch X11 first then Inkscape and it works. Pain in the arse though to have to launch two apps just to use one.

Inkscape error in Leopard

Last.fm.app

The official LastFM client is really spotty for me in Leopard. Just like X11 when I launch LastFM it launches two concurrent versions of it, one of which instantly crashes.

Last.fm Leopard error

Force quitting the one that’s stuffed up leaves the other working just fine though. Just a small pain to have to deal with every time.

The Good News!

With all those issues you’d think I’ve been having a terrible time in Leopard with third party applications: fortunately the ones that work far outweigh the ones that don’t.

This is my current list of apps I’ve used in Leopard that work just fine: Quicksilver, VMware Fusion (1.0 and 1.1 Beta), Camino (1.5.2 and 1.5.3), Thunderbird (2.0.0.6), iSquint, NeoOffice, VLC, TextMate, Flickr Uploadr, Xee, the MAMP web server, Snitter and Cyberduck.

Modular Xorg on NetBSD from scratch

NetBSD Xorg Orange
That’s a lot of orange! That reminds me, I need more F&N… Orange

NetBSD is one of the last Unix-like operating systems still shipping by default with the XFree86 X Window Server as opposed to the new de facto Xorg distribution. From what I’ve been able to find out doing a quick Google around is that given the system’s strict requirement for portability it’s going to take a lot of work to get Xorg working on every port. I respect that.

So enter pkgsrc and modular Xorg! Modular Xorg is an exciting new way of distributing Xorg because it allows you to cherry pick only the drivers, applications and other whatnot that you want instead of installing one huge package.

For me, I’m using a fresh install of NetBSD 3.1 in a VMware Fusion virtual machine, so you’ll obviously have to take these steps as a guide for your own system.

During the initial install I chose the Custom Installation option and de-selected the X11 Distribution Set. This means I avoided any mess right from the beginning, just as I did when I changed from Monolithic Xorg to Modular Xorg on FreeBSD.

Once you’ve installed NetBSD, do your usual configuration of /etc/rc.conf to enable your network, and add X11_TYPE=modular to your /etc/mk.conf file. DON’T add a X11BASE line!

Then go grab yourself the latest pkgsrc tree and update it.

Now it’s just a matter of make install clean clean-depends -ing each package we want. If you really wanted to, you could just install all the meta-packages:

… but that really defeats the purpose of going modular! For me, I installed the base server, the entire fonts meta-package, only the drivers I needed, and the minimum required apps:

Obviously when I said minimal I wasn’t kidding! These packages are enough to get an X session started, but that’s about it. If you’re installing a desktop environment such as KDE, Xfce or GNOME you can go right ahead and install their respective packages, but if you’re using a vanilla window manager such as OpenBox you’ll really need to install at the very least a terminal emulator. I like urxvt.

It is defintely more work to install modular Xorg, and in many cases the default XFree86 distribution Is Good Enough™, but I like the added control this gives me, plus then I have the added convenience of using similar software on my other BSD and Linux machines. Right Mai?

Is she pissed off or distracted somehow? I don’t know. Maybe she runs OpenBSD instead. It’s 01:52, maybe I actually need to go to sleep now.

X11, FreeBSD, Parallels Desktop, xorg.conf

If you’re in a hurry and just want the damned xorg.conf file, you can download mine here ;).

FreeBSD! If you’ve read any of my blog by now you know I use FreeBSD 6.2 in Parallels Desktop on my MacBook Pro. I’ve recieved two emails from people asking how I got X11 working, so for the benefit of those fabulous people and anyone else who’s interested I thought I’d post a quick how-to.

Essentially configuring X on FreeBSD in Parallels Desktop is the same as a normal machine but with a few quirks, especially if you’re running a widescreen MacBook or MacBook Pro.

Firstly after you’ve installed FreeBSD (I just download the ISOs and mount them directly in Parallels), log on as root and run the X11 configuration script, which will dump an xorg.conf.new file into your /root directory:

Xorg -configure

Next open the xorg.conf.new in a text editor. If you’re fairly new to UNIX and FreeBSD the Easy Editor is probably your best bet:

ee /root/xorg.conf.new

Most of the heavy lifting has been done for you; from my experience FreeBSD in Parallels Desktop detects the virtual keyboard and mouse just fine. We need to add some more information though for our widescreens.

Scroll down until you see Section "Monitor" and add the following lines (make sure each Modeline is on one line though, not wrapped like this):

HorizSync 31.5 - 100.0
VertRefresh 59.0 - 75.0
Modeline "1440x900_60.0" 106.47 1440 1520 1672 1904 900 901 904 932 -HSync +Vsync
Modeline "1280x800" 83.46 1280 1344 1480 1680 800 801 804 828

The modelines allow X11 to use the widescreen displays of the MacBook Pro and MacBook respectively. Even though I have a MacBook Pro I tend to use the “1280×800″ because it fits nicely in a window on my OS X desktop.

Next under Section "Device" add the VideoRam line followed by the amount of VRAM you allocated your virtual machine in kilobytes (ie: multiply by 1024). The default is 16MB, which would be 16384:

VideoRam 16384

Really unless you’re using an external monitor there is no point at the moment allocating more than this to your VM; Parallels Desktop takes this from your host machine’s normal RAM not video memory and uses it to increase supported resolutions.

Now scroll down to Section "Screen". You should see several SubSection "Display" configurations with different colour depths. Scroll down to the last one and add the appropriate Modes line:

SubSection "Display"
Viewport 0 0
Depth 24
Modes "1280x800" (for MacBook) OR
Modes "1440x900" (for MacBook Pro)
EndSubSection

FreeBSD should auto-detect under most circumstances the highest colour depth the VM supports, but I usually put a DefaultDepth line in right under Section "Screen" for good measure:

Section "Screen"
DefaultDepth 24

Now you’re all set! All that’s left to do now is rename and move the changed file over to the X11 configuration directory:

mv /root/xorg.conf.new /etc/X11/xorg.conf

Now the moment of truth: testing if it works!

startx

And that’s all there is to it. To return to the command line, just type ctrl alt delete/backspace.

The next step would be to go to your ports tree and install your favourite window mananger or desktop environment. For example if you want KDE, as root:

cd /usr/ports/x11/kde3
make install clean

Or if you if you’d prefer not to wait two days for the entire desktop to be compiled ;):

pkg_add -rv kde

Then add exec startkde to your .xinitrc in your home directory (create it if it doesn’t exist).

Haruhi KDE FreeBSD

Don’t forget to read the FreeBSD Handbook chapter on X11 Configuration as well.

Mikuru, Fluxbox with ROX-Filer on FreeBSD

In my continuing saga to find the perfect FreeBSD desktop, I decided to set aside the fully fledged desktop environments (KDE, Gnome and Xfce) that I’ve reviewed so far and instead focus on one of the most lightweight window managers: Fluxbox. I figured if I could get it to work, and liked using it, I could adapt it to fit on my boss’s ThinkPad which can only just run IceWM or Windows 98 as it is ;).

Here’s my basic Fluxbox desktop running on FreeBSD on my MacBook Pro with Mozilla Firefox and Xterm with custom colours:

Fluxbox on FreeBSD

As you can see, it’s very lightweight. On a machine like this it loads faster than you can lift your finger off the return key when you type startx to launch it, it’s wild!

Unlike the aformentioned desktop environments and like other vanilla window managers, Fluxbox does exactly what it’s supposed to do; and that’s it. It’s entirely up to you to choose your web browser, email client, office suite, file maneger, terminal emulator and so forth which can take more time on your part but is very rewarding.

The first snag I came across installing Fluxbox on FreeBSD is that the port in the ports collection called fluxbox is actually not the one we want, but rather the fluxbox-devel. Despite the name, fluxbox-devel is the stable release. Caught me out the first time!

fluxbox.png

Once you have the base fluxbox window manager, just add exec fluxbox to your ~/.xinitrc file, then type startx to fire her up.

The configuration files are created in a new folder ~/.fluxbox in your home directory. The customisable settings are in the init file, and you can customise the right-click desktop menu with the surprisingly titled menu file. Is good yah.

To use your own custom desktop backgrounds, you need to install a seperate image viewing program, such as feh which can be found in the ports collection under graphics. After installing, just modify your init file so the line rootCommands: reads rootCommands: fbdeskbg -f /path/to/your/image. You can also pass images to feh on the command line to open them:

Chuck Norris Llamas

Chuck Norris and a Llama, what more do you need? :D ;)

As for file managers I chose ROX-Filer because it’s lightweight and zippy but still allows thumbnailing of images which is very impressive. Again, it’s in the ports collection:

ROX-Filer on Fluxbox

The verdict? Even on slow machines Fluxbox whoops some serious arse, and on my MacBook Pro it works faster than I can type the commands! For many situations I’ll definitely consider it, but I’m a sucker for nice graphics so for my production machines I’ll stick with the desktop environments for now; but I must admit Fluxbox + ROX-Filer is a very nice combination.

Surprisingly the folks over at Fluxbuntu have had a very similar idea and are implementing Fluxbox and ROX-Filer over Ubuntu Linux. If it weren’t for the fact it’s not FreeBSD I’d check it out, looks very intresting.

My other *NIX desktop environment related posts:

KDE user tries Gnome after 8 years!

Since as long as I can remember [the time after the accident], I’ve been a KDE and Xfce user on Linux, and later FreeBSD. From what I can tell from the CDs in my folders from that period my first exposure to FLOSS was the now defunct Red Hat Linux back in the 90’s; and I remember feeling more comfortable navigating KDE than the default Gnome. Purple monkey dishwasher.

Gnome installed on FreeBSD

Anyway yesterday as part of a project I was installing FreeBSD from scratch on my Athlon XP machine (I find that name offensive!). I had to use the GTK+ for it, so naturally I was just going to install Xfce. Just for fun though because I’m such a wild, crazy loco I thought after all these years to install Gnome from ports to see how it has progressed since the old days:

Things certainly have changed, and I am impressed! It’s obviously not as zippy as Xfce, and I’ll certainly be keeping the latter on my older machines, but Gnome worked very nicely on said Athlon XP:

Gnome on FreeBSD

As a long time KDE user one of the first things I noticed about Gnome was the general lack of clutter in the menus. KDE lets you customise anything, and it doesn’t try to hide the fact. Gnome by comparison seems to only make the most common commands visible and makes you use Regedit-isque programs like the Gnome Configuration Editor to change the nitty gritty details. I’m torn over which methadology I prefer; there is something to be said about changing everything you want, but it also seems a tad redundant to have all these options available when often you’ll only be changing them once to your tastes, then leaving them alone.

Intrigued by what I saw so far I installed Gnome on my production machine (my MacBook Pro’s FreeBSD partition) as well to see how well it handled the rough and tumble of real world usage:

Haruhi Gnome on FreeBSD

I really hate to say it, but it seemed more reliable than KDE. Sometimes programs in KDE for no reason would exit and give me the colorful exploding bomb image saying the program quit unexpectedly, but I have yet to have a program quit on me in Gnome. Touch wood ;) .

In terms of bundled applications, I am a fan of *NIX Desktop Environments because they come with everything out of the box , so I don’t have to worry about installing and constantly maintaining disparate packages just to get basic desktop functionality. In that regard a default Gnome install is somewhat leaner than a default KDE install; it seems Gnome is more selective but still bundles everything you need.

Nautilus sure has changed! I remember the last time I used Gnome all those years ago Nautilus was just starting out and it was slow as molasses going uphill while attached to a snail. I am a fan of Konqueror but I was impressed with Nautilus; I was able to browse a simple Secure FTP server, Samba and local directories very easily:

Nautilus on Gnome on FreeBSD

Unlike Konqueror though Nautilus can’t web browse, though Epiphany fills the gap pretty nicely. The advantage with Ephiphany being powered by Gecko is that more websites seem to like it. I was initally turned off by the Internet Explorer 6-ish toolbar layout, but a quick toolbar reshuffle by moving the address bar up to the same level as the buttons and removing all but the Back, Forward, Refesh and Stop buttons brought it closer to what I like. I use del.icio.us for bookmarking, but if I were to use local bookmarks I’m sure I’d appreciate the use of Categories to sort links instead of rigid folders. Seems everything is moving to categories and tags thesedays.

So am I a Gnome convert? I’m not sure; if anything now I’m more confused than I am before over which I prefer! I guess that’s the real beauty of open source software; as a FreeBSD user (or a Linux user) I’m not forced to use any one environment.

My other *NIX desktop environment related posts: