Installation of XFCE in VirtualBox or nvidia driver

Here are the details to install XFCE, a light-weight desktop system.
With the unusable Unity and Gnome switching to Gnome 3, more and more people are moving to such light environments.

This page supposes that you already installed an ArchLinux environment (went to the end of the ISO install).
You might have installed this iso in a new machine or a VirtualBox, this page covers both cases as desktop install is very close for both environments.

When installing a system recommend the following packages:

  • mlocate, when installing from a core image, you may find some corrupted package keys, and may be forced to use pacman-key –init, in this case the command updatedb can accelerate the process
  • readline, zlib and base-devel. Useful for an environment for PostgreSQL
  • iptables, you need absolutely a firewall. But be sure to add iptables in DAEMONS of /etc/rc.conf

A tip here, you can change virtual desktop with Alt+Fn, there are 6 virtual terminals available spacer .

Don’t forget to update your list of packages first!
pacman -Suy

This guide is divided into several parts.

  • 1. Setting up user
  • 2. Xorg stuff
  • 3. Install dbus
  • 4. Graphical drivers
  • 5. Install Desktop
  • 6. Desktop launcher

1. Setting up user

A user $USERNAME has to be added to some specific groups.
useradd -m -g users -G audio,lp,optical,storage,video,wheel,games,power,scanner -s /bin/bash $USERNAME
Then modify its password with this command.
passwd $USERNAME

2. Install Xorg stuff

Install those packages.
pacman -S xorg-server xorg-xinit

3. Install dbus

Install this package.
pacman -S dbus
Start service.
rc.d start dbus
Add dbus in DAEMONS of /etc/rc.conf.
DAEMONS=(... dbus ...)

4. Graphical drivers

This part differs if you use a VirtualBox or an environment with nvidia drivers.

NVIDIA drivers

Install the following packages.
pacman -S nvidia
Run this command to configure your card.
nvidia-xconfig

VirtualBox

Install the following packages.
pacman -S virtualbox-additions kernel26-headers
Then mount the additions to install them on system.
modprobe loop
mount /usr/lib/virtualbox/additions/VBoxGuestAdditions.iso /mnt -o loop

Install the VirtualBox additions.
/mnt/VBoxLinuxAdditions.run
Finally add rc.vboxadd in DAEMONS of /etc/rc.conf.
DAEMONS=(... rc.vboxadd ...)

5. Install desktop

Install those packages, first XFCE stuff.
pacman -S xfce4
Then its goodies (highly recommended).
pacman -S xfce4-goodies
Desktop is now basically installed, but you need a launcher.

6. Desktop launcher

There are several ways to do that, I prefer using slim which is light-weight and fast, so… There are other options also.
pacman -S slim
Then the hardest part, you need to comment the following lines in /etc/inittab.
#id:3:initdefault:
[...]
#x:5:respawn:/usr/bin/xdm -nodaemon

Then uncomment the following lines of /etc/inittab.
id:5:initdefault:
[...]
x:5:respawn:/usr/bin/slim >& /dev/null

This makes your session to balance to slim instead of moving to a terminal at boot.

Then the final part, you need to initialize your session to launch XFCE at login. If this is not done correctly, you will finish with an error at login screen “cannot execute login command”. So create the file ~/.xinitrc. You can also copy the content below:
#!/bin/sh
#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)
if [ -d /etc/X11/xinit/xinitrc.d ]; then
for f in /etc/X11/xinit/xinitrc.d/*; do
[ -x "$f" ] && . "$f"
done
unset f
fi
# exec gnome-session
# exec startkde
# exec startxfce4
# ...or the Window Manager of your choice
exec ck-launch-session startxfce4

Here the essential part is “exec ck-launch-session startxfce4″ used to launch your xfce session for chosen user.

And you are done!

© 2012 Michael Paquier All content is ©Copyright of Otacoo.com 2010-2012. Privacy Policy - Terms of Use
gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.