# Newb - install Xfce



## Paolo_R (Apr 7, 2010)

I am new to FreeBSD (8.0) and I would like to install Xfce.

I realise that I can issue the following: `pkg_add -r xfce4` to install from compiled sources.

What I'm not sure of is whether I have to do anything to install/activate X. Is X already installed with FreeBSD or does it have to be installed before Xfce?

Thanks for any guidance.


----------



## sixtydoses (Apr 7, 2010)

Yes, you have to install X.


```
pkg_add -r xorg
```

http://www.freebsd.org/doc/handbook/x-install.html


----------



## bsdmonk (Apr 7, 2010)

Paolo_R said:
			
		

> Is X already installed with FreeBSD



Yes, if it was selected in the "Select Distributions Menu".
http://www.freebsd.org/doc/handbook/install-choosing.html

You can check it with

```
$ pkg_info | grep xorg
```


----------



## sixtydoses (Apr 7, 2010)

Haven't used `# sysinstall` for couple of years, the menu does look a bit different today.


```
<<< X Exit            Exit this menu (returning to previous)
          All                   All system sources and binaries
          Reset                 Reset selected distribution list to nothing
          [ ] 4 Developer       Full sources, binaries and doc but no games
          [ ] 5 Kern-Developer  Full binaries and doc, kernel sources only
          [ ] 6 User            Average user - binaries and doc only
          [ ] A Minimal         The smallest configuration possible 
          > > B Custom          Specify your own distribution set
```


----------



## Paolo_R (Apr 7, 2010)

I have been reading the manual whilst awaiting a reply to my post.

sixtydoses: I have done the pkg_add -r xorg

bsdmonk: typing `pkg_info | grep xorg` returns


```
xorg-apps-7.4_1
xorg-docs-1.4,1
xorg-fonts-100dpi-7.4
xorg-fonts-7.4
xorg-fonts-75dpi-7.4
xorg-fonts-cyrillic-7.4
xorg-fonts-miscbitmaps-7.4
xorg-fonts-truetype-7.4
xorg-fonts-type1-7.4
xorg-libraries-7.4
xorg-server-1.6.1,1
```

I have modified /etc/rc.conf to enable hald and dbus.

`x -configure xorg.conf.new -retro` gives the black and grey grid and an X mouse cursor so, presumably, the configuration was successful, although my mouse doesn't appear to work.

I should probably add that I'm running FreeBSD in Virtual Box. xorg.conf.new has the following relevant sections:


```
Section "InputDevice"
  Identifier  "Mouse0"
  Driver      "mouse"
  Option      "Protocol" "auto"
  Option      "Device" "/dev/sysmouse"
  Option      "ZAxismapping" "4 5 6 7"
EndSection
```
In Section "Device", it's identified the BoardName as "VirtualBox Graphics Adapter" with a driver of "vesa".

So with the exception of the mouse operation, at this stage I presume it's OK to `pkg_add -r xcfe4`?


----------



## Paolo_R (Apr 7, 2010)

Actually the mouse is working!

Follow on questions - do I need to install XDM?

The manual states - after installing Xfce - "Now, tell the X server to launch Xfce the next time X is started. Simply type this:

`% echo "/usr/local/bin/startxfce4" > ~/.xinitrc`

The next time X is started, Xfce will be the desktop."

So how do I ensure X is started when I log in to FreeBSD and thus launch the Xfce desktop?


----------



## sixtydoses (Apr 7, 2010)

It's not necessary for you to configure XDM. It's just a display manager and I myself don't use it.

Without XDM, you'll get to a black screen after booting up FreeBSD. Key in your username and password, and run `startxfce4`. That'll bring you to xfce.


----------



## Paolo_R (Apr 7, 2010)

Thanks - xcfe4 is working fine.


----------

