pavement

Desktop, light setup

From FreeBSDwiki
(Redirected from Desktop, BSD style)
Jump to: navigation, search

After installing and configuring the base system, here are instructions on how to get a light desktop up and running quickly. Xinit and XDM login managers are covered. Configuration of KDM, GDM, WDM and SLiM login managers is not described here, because they are part of windowmanagers that are not BSD style or are outdated.

Contents

Install

The following input is sufficient to install the programs for a running Desktop system:

% pkg install xorg jwm xdm

In this example, replace jwm with your chosen window manager. If you're not using a graphical desktop login manager, remove xdm from above.

Desktop login

Configuration files for XDM and Xinit are under the /usr/local/etc/X11/ and ~/ directories, respective to Xsession and Xinit. The minimal configuration for .xsession or .xinit in your home directory is:

#!/bin/sh
exec /usr/local/bin/<windowmanager>

Console

Set .xinitrc in each home folder, to load custom settings from that user's command line. The default /usr/local/etc/xinit/xinitrc points to several other files in your home directory.

Make sure the owner file permissions of .xinitrc are at minimum set to read.

% chmod 440 .xinitrc

Finally, type startx.

XDM

To configure x11/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 option allows logging in to the root console without a password from single user mode.

Set up .xsession with owner and group permissions to read and execute. If you soft link .xsession and .xinitrc together, both permissions must be 550.

ln -s .xsession .xinitrc
chmod 550 .xsession

Under normal circumstances, /usr/local/etc/X11/xdm/Xsession should be left alone, because this file by default points to ~/.xsession and ~/.xsession-errors.

Customization

Customization files for XDM are located in /usr/local/etc/X11/xdm/.

The background image or color can be changed with a command argument in Xsetup_0. xsetroot can set the background to a color or bitmap image. To choose a common image type, use a program such as x11/bgs or graphics/feh from within Xsetup_0.

Example of Xsetup_0:

#!/bin/sh
bgs /home/mydirectory/mypicture.png &
#xconsole & 

The xconsole line can optionally be commented out. x11/xconsole is useful for displaying terminal output.

It is important to add an & after adding new configuration commands, or the login screen will freeze up with certain commands.

To change the box logo, edit Xresources, comment out or reference another .xpm file in the lines xlogin*logoFileName.

Desktop programs

Read the documentation of your chosen window manager's configuration files to load programs, if it is available. If your window manager doesn't have the ability to load desktop programs, use .xsession or .xinitrc, to start them.

Example of .xsession or .xinitrc:

#!/bin/sh
xterm &
xclock &
exec jwm

Programs are loaded with &, and the window manager is loaded last with exec.

Xorg

Xorg is now mostly auto-configured. xorg.conf is no longer used, but it is replaced by the directory /usr/local/etc/X11/xorg.conf.d/ for specific configurations only. The syntax of a configuration filename in this directory is <customname>.conf, such as 10-nvidia.conf.

See Configuring X and the FreeBSD Handbook: The X Window System for more information.

Enabling hardware

To enable the mouse and keyboard, considering that recent versions of xorg are set to use autodetection by default.

Add the following to /etc/rc.conf:

dbus_enable="YES"

For using devfs, add to /etc/fstab:

devfs      /dev       devfs     rw   0 0 # not necessary unless custom configuration is needed
fdescfs    /dev/fd    fdescfs   rw   0 0

fdescfs(5) can alternatively be loaded through compiling in the kernel or through /boot/loader.conf. x11-servers/xorg-server has to be built without the hal option for this configuration.

See the manpages: devd(), devfs(), devfs.conf() and devfs.rules(). For advanced topics on hardware configuration, such as information about videocards, enabling HDMI audio out, and using multiple displays, see Hardware Configuration, Audio/Video.

See also

References

  • FreeBSD 6 Unleashed (2006)
  • FreeBSD related documentation and forums
Personal tools