Desktop, light setup
After installing the base system, here are instructions on how to get a desktop up and running quickly. The example provided shows how to get xdm, slim or wdm login managers with JWM. This example should provide insight on how to install other window managers.
Contents |
Install
The following input is sufficient to install the programs for a running Desktop system:
# pkg install xdm jwm xorg
Alternatively, ports may be installed. slim and wdm are other options instead of xdm.
Login manager set up
Basic session managers are XDM, WDM, and slim. After the login manager is configured, the Desktop must be set up, or the screen will go into a loop, back to the login manager after logging in.
XDM
To configure xdm to start up on boot, edit /etc/ttys and change the option on line ttyv8 from off to on:
ttyv8 "/usr/local/bin/xdm -nodaemon" xterm on secure
The secure setting is also of interest here.
Slim
To enable slim, add to /etc/rc.conf:
slim_enable="YES"
Slim requires a *.desktop file in a directory that is specified by /usr/local/etc/slim.conf next to the sessiondir option; typically this would be /usr/local/share/xsessions. Older versions of slim could have their window manager configured in the file slim.conf by the sessions option.
The usr/local/share/xsessions/*.desktop file commands must be in xdg-style, shown here http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-1.0.html#basic-format.
First create the desktop directory, if it doesn't exist, by typing:
# mkdir -p /usr/local/share/xsessions/
Example of /usr/local/share/xsessions/jwm.desktop file:
Name=JWM Exec=jwm
For details of slim configuration, type either:
# man slim # less /usr/local/etc/slim.conf.sample
WDM
Here is how to set up Wings Display Manager's (WDM).
To enable WDM, edit line ttyv8 in file /etc/ttys to:
ttyv8 "/usr/local/bin/wdm -nodaemon" xterm on secure
It's configuration files are at /usr/local/lib/X11/xdm/.
Make sure the file /usr/local/lib/X11/wdm/wdm-config lists your window manager on the line DisplayManager*wdmWm:. After rebooting, click the option on WDM's login screen, before logging in.
Command line
First, set up an .xinitrc file and enable the keyboard and mouse as described below. Then type:
# startx
Desktop set up
For session managers, be sure to create the files .xinitrc and .xsession in the home and or /usr/local/etc folders. The files in the home folder override the files in /usr/local/etc. .xinitrc is needed to start a window manager from startx, and .xsession is needed to start a window manager from a session manager, otherwise the window manager will fail to load. .xinitrc and .xsession files are identical, except .xsession needs to be executable. A symbolic link can optionally be created between the two files.
Be sure to add exec [window manager]. Do not add an & after this, only add a space and ampersand after programs that are meant to run and detach. Example of both .xinitrc and .xsession files:
exec jwm
To enable the mouse and keyboard add the following to /etc/rc.conf:
hald_enable="YES" dbus_enable="YES"
Enabling these options sooner may make it harder to fix problems.
Older versions of FreeBSD required the line in the Xorg configuration file to be manually set to:
Option "AllowEmptyInput" "False"
References
- FreeBSD 6 Unleashed (2006)
- Various FreeBSD and other forums