I am feeling a bit nostalgic these days, and so I think I will do something that I haven’t done in a really long time: I’m going to build up a graphical system in Ubuntu. It’s not anything terrifically difficult actually — there is almost no configuration to do, and there’s definitely no compiling.
Why Ubuntu? Well mostly because I took a chunk out of Ubuntu a few days ago when I complained about the weight of the Gnome desktop in Karmic, and I’m still feeling a little guilty about that. And also because I still see random notes here and there about how the button location in Lucid is a dealbreaker :roll: and it’s clear that a lot of people haven’t cued in on how simple (dreadfully simple) it is to get your own system built in Ubuntu.
Just to be daring, I’m going to start with a command-line system installed from the Lucid beta alternative ISO. As far as I know there has never been any way to install a CLI-only Ubuntu system from the desktop (or “live”) CD, which means if you don’t have one of the alternate versions or usually just ignore it … well, the time is ripe.
There’s a little trick to installing the command-line only system, and this is where it’s hiding.
You pick the CLI version from the boot menu when you start up the CD. Select your language, your keymap if necessary, then press F4 for the installation modes. From that menu, pick the command-line system option. And then highlight “Install Ubuntu” and press return.
I leave you to decide how to partition or arrange your machine; if you’re on an older computer — and by that I mean something pre-2001 — I recommend changing the filesystem to ext2 and selecting the “noatime” option. (If you are on a very, very old machine — and by that I mean pre-1998 — remember that your hard drive size may be an issue for your BIOS; if you have an oversized, newer drive in there you better set up a dedicated /boot partition.)
Expect your command-line system to take up about 600Mb, if
df is to be believed. After your system is in place and your network is running and your keyboard is set up, it’s time to get serious. This is probably what your first boot will look like, once you’ve updated from the beta ISO.
Pretty boring. Let’s change that. The first thing we need is the graphical system itself, the software that interprets what you’re doing with the mouse and keyboard and whatnot, and translates it for Linux. Type
sudo aptitude install xorg and you’ll see what that will require.
There’s quite a bit there to install, and while it’s possible to carve some of that out, let’s just go ahead and bring it all in. Once it is downloaded you’ll need to wait while aptitude installs and configures it. Once of the nice things about Ubuntu is that those steps are taken care of, and you don’t need to do a thing. Here’s what it will probably look like, when it’s done.
Believe it or not, most of the heavy lifting is finished. You can actually start a graphical system here, but it’s nothing particularly spectacular — in fact, all you get is terminal emulator, with nothing else behind it. Boring.
Let’s give it something to chew on: A file manager. Try this one, and see if you like it:
sudo aptitude install -y emelfm2.
Notice that I tacked on a
-y to the installation command: I did that because I didn’t want aptitude to ask my permission again. Now let’s start the graphical desktop and see what trouble we can get into:
There’s the terminal emulator I mentioned. Not very exciting. If I type
emelfm2 and press return, the file manager starts up, and will probably look like this.
Nice, but not particularly genius. And we have no window borders. How can we move things around if we want? Or close them? Or maximize them? We need some way to manage our windows.
Okay, here’s a window manager for you:
sudo aptitude install -y openbox.
And if we
startx again. …
Ooh, the background has changed color. And there’s right-click menu now. And boxes have frames and controls on them.
If I start emelfm2 now, by typing the command in the emulator window, it’s much more comfortable.
And that’s the way things work, basically. If you add obconf and obmenu to your desktop here, you can more or less coordinate your entire graphical experience without much work at the command-line:
sudo aptitude install -y obconf obmenu — and yes, you can stack applications to install like that, when you use aptitude.
Add items to your right-click menu by editing the entries in ObMenu, and then using the Reconfigure command in the right-click menu to update it while it runs. Simple as pie.
But now we have a couple other issues that need work: Proper wallpaper, and we must do something about that hideous interface. It looks like a reject from Windows 98. Let’s try gtk-chtheme and gtk2-engines:
sudo aptitude install -y gtk-chtheme gtk2-engines. Now if I start gtk-chtheme, I can switch styles, fonts and appearances.
For wallpaper there are a lot of solutions available to you, but my preference is feh, which can double as an image viewer.
sudo aptitude install -y feh. feh sets the wallpaper at the command line, with
feh --bg-scale wallpaper-name.jpg.
You can get the same results again, at each startup, by opening a little file in your home directory called .xinitrc and adding this line to it.
eval `cat .fehbg` &
That’ll do the trick. There are other ways to set the wallpaper or even just set a color for it; poke around and you’ll probably see dozens more.
So what else can you add to your desktop? How about everyone’s favorite browser. Of course, if you do that —
sudo aptitude install -y firefox — you inherit a huge vat of dependencies, including a lot of Gnome crud. You can avoid that in turn by installing it without the recommended packages, kind of like this, but even that is more than is necessary.
I would recommend downloading the precompiled Linux binary and decompressing it into your home directory. You can edit your Openbox menu to start it directly, and spare yourself the Gordian knot of Ubuntu’s generic Gnomified Firefox. Start here, if that sounds like something you would prefer. P.S., you’ll need the libasound2 and libdbus-glib-1-2 libraries from the repositories to use it —
sudo aptitude install -y libasound2 libdbus-glib-1-2.
I have some other recommendations for software in a graphical system, but you should be experimenting on your own and trying out as many different ones as you can. You have the general idea now — install, add to your right-click menu, and repeat. You have an immense number of choices available to you, and don’t forget things like automounting daemons, audio suites, image managers, e-mail clients, games and video players.
And like I said, the real benefit in doing this yourself is that you have the opportunity to avoid a lot of the weight that comes with Ubuntu in its default forms. Exercise your freedom, build your system your way, and you’ll gain a sense of pride and satisfaction at the same time. :D