Back when I started out with Linux, the biggest source of information I found were how-to documents - particularly the kernel how-to. In that spirit, I thought I should repay the favour in at least a small way

. EDIT: Mods, feel free to move this post if you think it's beyond the scope of "absolute beginners".
I managed to get the Enlightenment desktop environment up and running on my Raspberry Pi recently - using the real hardware, no qemu or virtual machines - under
Arch Linux, so I thought I'd share my method here. For those who are not aware, Enlightenment is a lightweight display/desktop manager which I think looks rather pretty

.
I used the current
Arch distro, dated 29/04/2012. I'm writing this so that a complete novice should be able to follow it, but please feel free to point out any corrections needed, or if I just plain got it wrong

. I realise that you can install all the required packages with just one pacman command, but the reason I've split them out is so that I can explain what they are why they're needed.
Firstly, I am by no means a Linux expert or a developer, so some of what I post may not be 100% accurate or correct. I followed these instructions myself (broadly - after much trial and error) and ended up with a working desktop when I started with nothing but a bare system and a command line prompt. If you don't have any other SD cards to try this out with, back up your current SD card (using Win32DiskImager or dd under Linux) in case something goes wrong and you need to wipe it!
Secondly, this will likely eat up all the available space on the standard
Arch Linux image - you probably won't be able to achieve this with a 2GB SD card, and even with a 4GB card you'll need to adjust the partition sizes on another machine which has GParted (or something similar). Have a look at
http://gparted.sourceforge.net/ for more info - it can be booted as a LiveCD/USB, so you don't have to wipe an existing PC.
BUT! Don't let all that put you off - you never know what you might learn

I can't guarantee I'll have all the answers, but feel free to ask any questions or point out any corrections - I'll do my best to answer.
How-To:
When
arch first boots, you have pretty much nothing besides a root login and a command line. When I first started using linux all those years ago, the first advice I was given was to never ever *ever* use a root account for daily purposes! Using the root account can easily hose your system if you're not sure what you're doing, and is very bad for security.
First thing to do once logged in as root is to set up a new user:
Code: Select all
useradd -m -g users -G audio,lp,optical,storage,video,wheel,games,power,scanner username
(Everything after -G specifies which additional groups the user should belong to - most of these are just standard groups, but the group wheel is important). Now you need to set a new password:
You'll be prompted for a new password at this point. Since you are going to need administrative privileges with a normal account, you'll need sudo - this isn't installed by default, so type the following:
(Question for those more familiar with
arch: is it best to always use the -Sy option rather than just -S? I found that just using -S led to lots of 404 errors when retrieving packages)
That's not the end of the story though; we now need to give the new user rights to execute the sudo command. To do this, type:
This will open up a text editor (vi) so that you can edit the sudoers file. You can't edit this file directly in any other text editor - you have to use visudo. At some point, you will see a line that reads:
Because visudo launches the editor vi, you'll need to go into "edit mode" in vi in order to make any changes. To do this, either press "a" (if you want to add text after the cursor) or "i" (if you want to insert text before the cursor). vi is a little awkward, but this is probably the only time you're going to be
forced to use vi. You need to modify the line above so that it reads like this:
It's very important that the hash (#) is removed from the start of the line - the hash "comments the line out", meaning that it will be ignored by sudo. This line tells sudo that all members of the "wheel" group can execute all sudo commands and do not need to enter a password. You can drop the "NOPASSWD:" part if you wish, but it means that you're going to be re-typing your password an awful lot over these steps - and any time you want to use the sudo command.
Once you're finished editing the file, press Esc to move into command mode. Now type:
Then press enter - this saves the file and closes visudo. Thankfully, after this point we can use nano instead of vi - it's much friendlier! Now that you have a normal user account set up with sudo privileges, logout by typing... well... logout! Now log back in with your regular user account. From this point onwards, you should have no (or at least very little) need to ever log in with the root account again.
The first thing I did at this point was to upgrade all installed packages to the latest version. I'm not sure how important this is, so skip it at your own peril. To update all packages, type:
It will probably compain that pacman (the
Arch Linux package manager) needs to be updated first. Let pacman update, and run the command again when pacman is updated. Once the system is updated, we can get started on installing all the packages necessary for getting Enlightenment up and running. First, we need to install a few pre-requisites that will be needed later. First, install these two:
base-devel installs all the required packages for compiling code, and wget is a *very* handy utility to download files over the internet from a command line. Now we need to install the X server and associated utilities:
Code: Select all
sudo pacman -Sy xorg-server xorg-xinit xorg-server-utils xterm
I've added xterm in there because you'd have no terminal under Enlightenment, otherwise. I'm not sure if the next package is 100% required, but it may be needed if/when there is an accelerated driver for X - perhaps someone more knowledgable can correct me here. It won't harm anything to have it there if it's not needed.
Now we need to install video drivers, otherwise the X server won't know how to draw anything to the screen! As we don't have any Pi-specific drivers at this point, I opted for the bog-standard "vesa" video driver. When I tried this on it's own however, the X server failed to start and complained about fbdev being missing. Therefore, install these drivers next:
Code: Select all
sudo pacman -Sy xf86-video-fbdev xf86-video-vesa
We're not quite done with the pre-requisites yet though:
dbus is a messaging protocol to allow applications to "talk" to each other. I'm not exactly sure of it's functionality, but it definitely needs to be there. Before going any further, we now need to start dbus, so type:
We also need to add it to the file /etc/rc.conf so that it runs on every boot, so type:
Right at the end of the file, there will be a line that reads along these lines:
Edit this so that it now reads:
Don't delete anything else that's there, just add "dbus" at the end.
To quit nano, press Ctrl+X - you'll be asked if you want to save, so type y; you'll then be asked for a file name to save to - don't change this, just press enter. Isn't that far simpler than vi?! Purists might want to string me up for this, but I utterly hate using vi!
Finally, before we start installing all the required parts of Enlightenment, we need at least one TTF font:
*Now* we're ready to install Enlightenment. When I first found the
Arch E17 Wiki page, I totally skipped over the easy parts and proceeded to try and compile it myself. That was a complete bust. In my haste, I missed the part that said you can install Enlightenment with a very simple command:
That's still not the end of the story though, there are a few additional extras you might want to install. Firstly, it's probably a good idea to get the extra applications:
The wiki recommends that a network manager is also installed, and
Connman seems to be the preferred choice. In order to install connman, you have to replace the normal network manager that starts on boot - I'm not sure what (if any) benefit this gives you. If you're using (or plan to use) WiFi, connman gives you a nice graphical interface in Enlightenment, but I'm not really sure what other benefit it has. If you don't install it though, every time you start Enlightenment it will complain that connman is missing and I hate having annoying popups!
Connman is in the AUR, the
Arch User Repository, and there isn't a package available by default. I'd highly reccomend reading up on how to build & install packages from the AUR, as there's some very useful stuff in there - PKGBUILD/makepkg is one of the very good things about
Arch.
To expedite matters however, I've uploaded the binary that I compiled on my Pi. Type the following:
Code: Select all
wget http://dontclogthetubes.net/raspberrypi/arch/connman-1.0-2-arm.pkg.tar.xz
sudo pacman -U connman-1.0-2-arm.pkg.tar.xz
We now need to make connman start when the system boots:
Find the line that specifies the daemons to run - the same line edited earlier - and add "connmand" after dbus. Note: make sure you type "connmand", not "connman", and obviously don't include the quotes! You also need to delete the entry for "network", since we're going to use connman to run the network instead - no point in having two services trying to do the same thing.
There are just a few more things to sort out before we can try running the X server... First - and this really is optional - there are some additional themes available. To save you the tedium of building this package yourself, I've uploaded it to my webserver. This is a pretty hefty (around 200mb) download, so just be patient
Code: Select all
wget http://dontclogthetubes.net/raspberrypi/arch/e17-themes-20110216-1-any.pkg.tar.xz
sudo pacman -U e17-themes-20110216-1-any.pkg.tar.xz
Finally, we need to tell the X server what to run when we tell it to "startx". To do this, you need to edit the ".xinitrc" file in your home directory:
This file probably doesn't exist yet, so you'll be presented with a blank window - just add this line:
Now quit, and save the file. Finally, type "startx" to load the Enlightenment desktop environment. All being well, you should now be greeted with the Enlightenment initial setup!
Whenever I start E17, it does constantly complain that the graphics adapter is not running in 24/32 bit mode, which is required for compositing to work properly. I'm afraid I don't know how to get around this error - I suspect it's down to the X driver, but I'm really not sure.
Anyway, feel free to post any questions - I'll do by best to answer, but I can't guarantee that I'll actually know the answer!
