Installing Gentoo Linux Desktops
For the last 2 years I have been successfully replacing Microsoft Windows Servers with GNU/Linux servers. As a result, my work load has dropped dramatically, even when the number of servers that I manage has tripled ! Over the same 2 years, the spyware and virus problem on Microsoft Windows computers has grown to astronomical heights. It has gotten to the point where I pretty much have to refuse to work on most of the computers that people want me to fix, and the ones that I do have to cleanse (mostly friends and family's computers), I usually see again in a month or two for the exact same problems.
With the growing spyware problem, the stress levels of many people in the IT Field has also been growing (along with the stress levels of many computer users). Knowing that my workload had dropped so much when switching to GNU/Linux servers, I wanted to know what would happen if I gradually switch over the Microsoft Windows computers that I always have to work on to some sort of GNU/Linux Distribution. Would my support calls increase or decrease ? Would the computer users feel comfortable running something other than Windows ? Well, after battling another spyware problem that basically destroyed the networking stack on a Windows XP machine, I decided that I was going to find out what would happen.
Why Gentoo Linux ?
Many of you are probably wondering why in the heck I decided to go with Gentoo Linux to start replacing Windows machines with. Well, at first I tried various other Distros before I came to use Gentoo, however all of them did not stand up to what I wanted. Some had poor performance, some did not have all the programs that I would be needing, all of them had to be updated to play MP3s and DVDs, and almost all of them needed to be upgraded every 6-9 months.
It was the last item that really turned my attention to Gentoo Linux. Where most distributions rely on a "snapshot" of GNU/Linux software, Gentoo is continually being upgraded. For instance, I have a laptop that I installed back in July 2005, since then I have went through a few upgrades of GNOME, as well as a couple of upgrades of X (I even played with XGL on the machine before reverting back to a more stable X). Most distributions require you to upgrade the entire system in order to get upgrades to major components and I knew I did not want to upgrade/re-install the distribution every 6-12 months.
So really, the only issue that I would face when choosing Gentoo is the fact that there is no graphical Administration Utilities for the system. However, since I was going to set these machines up myself and 90% of the desktops were going to have broadband connectivity (so I could work on them remotely), I felt that this issue was not going to be a very important one anyway.
NOTE: I also knew I would be building a system for Windows Users, where system upgrades normally occur every few years <RANT>unless of course Microsoft happens to lose an Anti-Trust suit, then they decide to wait until the "probation" period ends (Nov 2007) before they release an Upgrade to Windows, thus effectively sidestepping any chance that the "penalties" would actually allow fair competition reguarding Windows software development.</RANT>
Gentoo Linux Basics
Gentoo Linux is what is referred to as a "Source Based Distribution". What this means is that you build all of the software that you will use directly from the "Source Code" - Source Code is what developers can read and adjust, however, computers don't understand Source Code. In order for a program to be usable on a computer, the souce code needs to be compiled into Binaries (the "language" computers understand). Since Gentoo Linux is built from source code, it is a highly configurable distribution. Not only can you tell it to optimize the binaries for your computer (cpu architecture), but you can also tell it to optimize everything for what you want your computer to do (various features).
It is important to note that building everything from source code can take a very long time, especially if you do not have a very fast computer. For instance, building OpenOffice.org from source code (the longest program you will probably ever build) can take days on some systems. Fortunately just about everything will build cleanly the first time, so if you tell Gentoo to compile GNOME or KDE, it will automatically fetch all the sources and build everything required to get a complete GNOME or KDE Desktop to run properly. So, my next step was to document how to get a solid desktop computer to build properly, as well as to have all the features that a user would want.
Instructions for a perfect Desktop
This section will take you from a basic Gentoo Linux Install to a fully functional Gentoo Linux Desktop, complete with GNOME and KDE. Keep in mind that I assume that you followed the Gentoo Linux Handbook, and have a clean install.
Setting your USE Flags
The first step is to set your USE Flags you will want to use. For a complete discussion of Gentoo's USE Flags you can read my guide to USE Flags.
Basically what you will want to do is Download this file, and add it to your /etc/make.conf file. The file is highly commented, so adjust to suit your needs. Please note that I usually set the "doc" use flag, which in turn lengthens the install process considerably (but is worth it). Then you will want to Download this file, and add it to your "/etc/portage/package.use" file - This will set any local USE flags for your desktop. These USE Flags will give you a pretty capable Desktop, so if you don't need all of these features, feel free to remove some flags.
Updating the base Install
Now that you have a nice set of USE Flags, we will want to get your base install to reflect these use flags. So the next thing you will want to do is:
- emerge gentoolkit
- emerge xorg-x11
- emerge -u world --deep --newuse
- emerge texlive
NOTE: When you emerge xorg-x11, ensure that you test it with a -vp to ensure that it will build the drivers for your peripherals and video card. Also note that sometimes a package will depend upon a different package that is not yet installed yet and will fail to build without it. You can usually get around this by "figuring out" which package is missing and manually emerge that package. One other thing to watch out for is sometimes a USE flag will prevent something to build, for instance the "cups" flag will compile cups support into ghostscript, unfortunately cups requires ghostscript, which in turn requires cups, so to get it to build you must run a "USE="-cups" emerge ghostscript" to build ghostscript, then when cups is build simply re-emerge ghostscript.
To get your video card and monitor configured properly, you need to use the xorgcfg setup tool provided by X.org. To do this:
- ln -s /dev/psaux /dev/mouse
- **if it comes up, simply quit and save changes, otherwise run "xorgconfigure" and follow the prompts
If you have any problems configuring X, refer to Gentoo's Xorg Configuration Guide.
Building GNOME and KDE
Once X is installed, it is relatively simple to get a complete GNOME or KDE Desktop:
emerge gnome xscreensaver mtools gnome-cups-manager
emerge rss-glx (if you want more 3D screensavers)
emerge kde (if wanted)
Build Misc Tools
Here is a list of misc packages you will probably want to install at this point:
emerge ntp smeg nfs-utils alsa-utils
emerge ppp (if using dialup)
emerge hplip (HP Printer Drivers and Utils)
Now start alsa with "/etc/init.d/alsa start", then start the alsamixer program and unmute the volume. Also add alsa to the default runlevel with "rc-update add alsa default"
Build X11 extras
emerge blueglass-xcursors golden-xcursors jimmac-xcursors silver-xcursors
emerge gnome-themes-extras mandrake-artwork redhat-artwork ximian-artwork tango-icon-theme tango-icon-theme-extras
emerge corefonts essays1743 freefonts gnu-gs-fonts-other sharefonts ttf-gentium urw-fonts
Adjust /etc/X11/xorg.conf for new fonts
Some programs require the all of the fonts to be registered in the xorg.conf file, so add the following lines to the proper location in this file:
FontPath "/usr/share/fonts/corefonts/" FontPath "/usr/share/fonts/cyrillic/" FontPath "/usr/share/fonts/default/" FontPath "/usr/share/fonts/essays1743/" FontPath "/usr/share/fonts/freefont/" FontPath "/usr/share/fonts/ttf-gentium/" FontPath "/usr/share/fonts/urw-fonts/"
Build Office Applications
Now to build all of the important office apps:
emerge gimp gimp-user-manual dia inkscape app-office/planner glabels bluefish scribus blender
emerge gpp (builds Gnome Photo Printer)
emerge openclipart openoffice
Build Internet Applications
Now to build various Internet applications:
emerge pan gftp gaim gaim-smileys
emerge mozilla-thunderbird (if needed)
Building Multimedia Apps
Here are some Multimedia apps to build:
emerge k3b gthumb amarok rhythmbox tagtool streamtuner streamripper audacious audacious-themes audacity gphoto2 gwenview soundconverter mplayer
emerge celestia (3D ACCEL)
Build other Utils
Here are some other things people have wanted:
- wine - abiltiy to run windows apps on GNU/Linux Systems
- vmware-player (***proprietary app***) - Abilitiy to Run "Virtual Machines"
- galculator - Advanced GNOME Calculator
- acroread (***proprietary app***) - Adobe's PDF Reader
- profuse - Gentoo's USE Flags app
- porthole - Gentoo's Software Manager
- gnomebaker - A GNOME CD Burining
- screen - Program to "disconnect" and "reconnect" to a shell, nice tool for remote updates
Gentoo provides some nice games, here are some good ones:
emerge atanks frozen-bubble monkey-bubble lbreakout2 knights crafty gnuchess gnuchess-book gnubg gtkboard pathological lincity-ng pingus freeciv wesnoth
emerge crack-attack billardgl foobillard trackballs neverball armagetronad (3D ACCEL)
emerge xmame gxmame
emerge childsplay lletters tuxmath tuxtype2 gcompris (for kids)
Adjusting system settings
Some programs you will want to set to start whenever the computer is booted. To do this you must run the following command:
rc-update add * default
Where * is the service you want added to startup. To see a list of services available run "rc-update -s". The following services should be added to startup:
- portmap (if you rely on NFS,etc.)
Fine Tuning your system
Using a Gentoo Splash Theme
If you use the "gentoo-source" kernel package and the genkernel tool to build your kernel it is relatively easy to implement a "Boot Splash" theme.
First, get the required tools and a gentoo splash theme:
emerge splashutils splash-themes-livecd
Now rebuild your kernel using genkernel and add the additional option of a splash theme:
cd /usr/src/linux gensplash --gensplash=livecd-2006.0 --gensplash-res=1024x768 all
Finally add the following to your grub configuration file (on the kernel line).
Getting Midi to Work
If you do not have a hardware MIDI card (or an advanced sound card) you may want to get timidity installed and working:
emerge timidity++ timidity-eawpatches timidity-update -g -s eawpatches /etc/init.d/timidity start rc-update add timidity default
Getting Mono Apps installed
Mono is the new .net implementation for Linux. Some consider it "controversal", but reguardless there are some extrememly cool apps created using Mono. Here is a list of some and how to install them.
Tomboy Notes is a small utility to create personal notes on your computer. What is cool about this is every note you create can be an extension of another note, thus you get a "train of thought" going.
This is a very easy app to install, simply:
Tomboy, and all the dependencies (including Mono) will be built and installed.
Installling "Beta" Packages
The remaining mono based packages are not available (yet) in the stable portage tree, here is a list of packages you must add to the "/etc/portage/package.keywords" file to install these apps:
##### For Mono Applications ##### dev-dotnet/gtk-sharp dev-dotnet/gnome-sharp dev-dotnet/art-sharp dev-dotnet/gnomevfs-sharp dev-dotnet/glade-sharp dev-dotnet/gconf-sharp
Also note that in order for these to build properly, you must specify the "mono" use flag when you compile "sys-apps/dbus", either set it in the "/etc/portage/pacakage.use" or "/etc/make.conf" file and re-emerge dbus. If you are running into difficulties, simply add the app you want to the package.keyword file, try to emerge it and simply add whatever dependencies it is requesting. Working with "Masked Packages" can be quite frustrating at some times, be warned.
F-Spot is a photo organization application, it is in active development, so some of the libraries it depends on has not yet made it into the "stable" tree of Portage.
First you must add the following to your "/etc/portage/package.keywords" file:
Happy Photo Managing
Banshee Music Player
Banshee is a very nice Music Player with Awesome iPOD support. First add the following to your "/etc/portage/package.keywords" file:
##### For Banshee Music Player ##### media-sound/banshee media-plugins/gst-plugins-faac dev-dotnet/ipod-sharp media-libs/libipoddevice media-libs/gst-plugins-good media-libs/gst-plugins-base media-libs/gstreamer media-plugins/gst-plugins-flac media-plugins/gst-plugins-mad media-plugins/gst-plugins-gconf media-libs/gst-plugins-ugly media-plugins/gst-plugins-lame media-plugins/gst-plugins-faad
then simply "emerge banshee"
For your sanity, once you install Banshee, I recommend removing the above entries from your package.keywords file. This is recommended since a "emerge -u world" command will no longer work properly with some of these programs "unmasked".
Beagle Desktop Search
Beagle is a little harder to setup, you must add additional support in the kernel and adjust your /etc/fstab file, but here is a list of masked packages anyway:
##### For Beagle ##### app-misc/beagle dev-libs/gmime dev-lang/mono app-text/wv gnome-extra/libgsf dev-dotnet/evolution-sharp dev-dotnet/gsf-sharp app-office/gnumeric x11-libs/goffice
For now follow the instructions at gentoo-wiki.com.
Changing User Defaults
Sometimes you want to change the default settings of certain programs for all users. There are a few ways to do this, the following sections explain how.