Installing Xfce4 on FreeBSD 8.1


Installing X11

Xorg is the default X11 implementation for FreeBSD and can be installed using the following command as the root user

# pkg_add -r xorg

After installing add the lines to /etc/rc.conf as follows

moused_enable=”YES”
dbus_enable=”YES”
hald_enable=”YES”

Check the installation using the following command as an unprivileged user

$ xinit

If the setup is working, there should be a minimal X session running. Press CTRL+ALT+F1 to move to the first terminal in which the command was executed. Press CTRL+C to stop it.

To create a xorg.conf.new file run the following command as the root user. Reboot the server after installing Xorg if the following command doesn’t work.

# Xorg -configure

A file named xorg.conf.new will be created in /root. To check the file created run the following command as root

# Xorg -config /root/xorg.conf.new -retro

If the configuration is working properly, a background with mouse cursor is seen. Press CTRL+ALT+F1 to move to the first terminal in which the command was executed. Press CTRL+C to stop it.

Copy the file to  /etc/X11/ as xorg.conf as the root user using the following command

# cp /root/xorg.conf.new /etc/X11/xorg.conf

Installing URW fonts

URW fonts can be installed by using the command

# pkg_add -r  urwfonts

Add the following line to the file /etc/X11/xorg.conf under ‘Section “Files”‘

FontPath "/usr/local/lib/X11/fonts/URW/"

Installing TTF fonts

TTF fonts can be installed by using the following command

# pkg_add -r ttmkfdir

Check whether the following line is present under ‘Section “Files”‘ in /etc/X11/xorg.conf

Add the following line to the ‘Section “Modules”‘

Load  "freetype"

Enter the following commands now

# cd /usr/local/lib/X11/fonts/TTF/
# ttmkfdir -o fonts.dir

Installing Xfce4

For installing Xfce4 run the following command as root

# pkg_add -r xfce4

The Xfce4 installation can be checked using the following command as an unprivileged user

 $ /usr/local/bin/startxfce4 

Install XDM using the following command

 # pkg_add -r xdm 

Run the following command as the unprivileged user to make xfce the default for the particular user

$ echo "/usr/local/bin/gnome-session" >> ~/.xsession
$ echo "/usr/local/bin/gnome-session" >> ~/.xinitrc

Add the following line to /etc/rc.conf

 xdm_enable="YES" 

Edit the file /etc/ttys and edit the line as follows

ttyv8   "/usr/local/bin/xdm -nodaemon"  xterm   on  secure

Now reboot the machine to boot into XDM and try logging in. It will login to Xfce.

Advertisements

2 thoughts on “Installing Xfce4 on FreeBSD 8.1

  1. Thank you for posting this in all it’s detail, helped me get xfce up a bit quicker (on 8.2). 🙂
    It might also be worth noting that some people are having difficulties logging in because .xinitrc is not executable. A quick “chmod u+x ~/.xinitrc” will fix that. (~/.xsession doesn’t seem to suffer from this because I heard it’s passed as an arg to /bin/sh when it’s -x)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s