Gentoo - The next step

From PS3 Wiki

Jump to: navigation, search

Contents

Introduction

OK, so you've just finished installing Gentoo on your PS3 and you're wondering what you can do with it. Firstly, here are a few things you should do to make your Gentoo experience worthwhile.

What you should do after installation:

  • Change the root password!
# passwd


Edit /etc/make.conf to add GRP package repository

# nano -w /etc/make.conf

Edit the make.conf file and add the last line. Do not touch the rest of the sections above!

# These settings were set by the catalyst build script that automatically
# built this stage.
# Please consult /etc/make.conf.example for a more detailed example.
CFLAGS="-O2 -pipe -mtune=970 -mcpu=970 -mabi=altivec"
CXXFLAGS="-O2 -pipe -mtune=970 -mcpu=970 -mabi=altivec"
# This should not be changed unless you know exactly what you are doing.  You
# should probably be using a different stage, instead.
CHOST="powerpc-unknown-linux-gnu"
PORTDIR_OVERLAY="/root/livecd/overlays/portage"
PORTAGE_BINHOST="http://ftp-chi.osuosl.org/pub/gentoo-ps3/grp32/All/"

Press Ctrl X, then Y.

Updating Portage

Since there are a few bugs in the current version of Portage, it is recommended that you use atleast portage-2.1.2-rc4-8 if you want to download pre-compiled binaries of applications (GRP Packages).

echo "sys-apps/portage ~ppc" >> /etc/portage/package.keywords
emerge -u portage

You can now emerge GRP packages using the -G / -g switch while installing them.

Note that if you did not use emerge --sync in the fist part of the tutorial, you should do it now

Changing Desktop Environment/Window manager

The main difference between a Desktop Environment (DE) and a Window Manager (WM) is that while DEs are a totally integrated environment with integrated applications, WMs are just a basic shell which provide a dock to switch between different applications and an optional launcher to launch already-installed applications.

This is something which varies from person to person. While some prefer minimal WMs, others would rather have a full blown DE. It's just a matter of taste, and thankfully, with Gentoo, you can easily switch to whatever you prefer. Here's a small list of the popular DEs/WMs: Desktop Environments:

  • KDE - K Desktop Environment
  • GNOME - GNU Object Model Environment

Window Managers:

While it would be possible to write how-tos for each of those and maybe more, I'm constrained by time right now, so you'll have to install them on your own if you wish.

Installing applications

The magic word to install any application in Gentoo is emerge. Gentoo's package manager, known as Portage, stores information for over 25,000 applications. At any point of time, if you want to install an application, all you have to do is:

emerge <name of application>

So for example, if you want to install mplayer, all you have to type is

emerge mplayer

While this will install mplayer and all of its dependencies automatically, there are a few things which you should do before actually installing it.

emerge -p <app>

What this will do is pretend to install the application. What it means is that it will show you the list of dependencies it will install when you install that specific application. Go ahead, try emerge -p mplayer. It will show you a list of dependencies for mplayer. Similarly, emerge -p openoffice will show you the list of dependencies which it will install before installing OpenOffice itself.

emerge -v <app>

Verbose output.

emerge -G/g <app>

One of the most useful switches for emerging applications on the PS3 is -G. What it does is look for pre-compiled binaries of applications in the BINHOST which we specified in the /etc/make.conf file. Since these binaries are compiled by others running Gentoo on the PS3, you can be sure that they will run on the PS3. Last check of the BINHOST shows hundreds of pre-compiled applications.

emerge -pvG mplayer

Or

emerge -pvg mplayer

This will a) pretend to install mplayer, b) show verbose output, c) check in the BINHOST if an mplayer binary is available. Since it is available, just remove the -p switch to install the mplayer binary.

If you get an error about paranoia.so you must also instal dev-libs/libcdio-0.77

# emerge -G libcdio

Unfortunately, not all applications have pre-compiled binaries. For those, you will have to do the regular emerge -v <app> to install it.

For more emerge switches, just do man emerge in the command line, or here

Changing the WM/DE

Alright, so now you guys know how to install applications. What if you want to install KDE, since you prefer it above the minimalistic fluxbox. The process is just a couple of steps, and after a restart, you will be looking at your new KDE desktop.

emerge -pvG kdebase

Since it is available as a binary,

emerge -vG kdebase

This will install the base of KDE 3.5. In Gentoo, KDE has been divided into small meta packages which allow you to keep KDE lean and mean without installing all the useless bloat. You can check for more info here.
Now that kdebase is installed, we must change the /etc/rc.conf file to make it start KDE instead of fluxbox.

/etc/rc.conf

# nano -w /etc/rc.conf

At the end of the file, you will see the variable:

XSESSION="fluxbox"

Just change it to:

XSESSION="kde-3.5"

Then save and exit nano by pressing Ctrl X -> Y. The next time you start your PS3 or restart xdm, you will boot into KDE. Same goes for GNOME, or any other WM you would like to try. If you get confused by what you're supposed to replace in the XSESSION variable, just check the contents of /etc/X11/Sessions

# ls /etc/X11/Sessions
Xsession  fluxbox  kde-3.5

Here, you can see that I can either put kde-3.5 or fluxbox as the XSESSION variable. Depending on what WM/DE you install, you will see more sessions.

Until next time, have fun with Gentoo! :)

Personal tools