Desktop, light setup
(→Customization) |
(→Customization) |
||
Line 47: | Line 47: | ||
% mv [pathname/your file] background.jpg | % mv [pathname/your file] background.jpg | ||
− | To create multiple themes, you may create a new directory under ''themes/'' that is similar to the ''default/'' directory, then specify this themes subdirectory from ''/usr/local/etc/slim.conf''. If you do this, be sure | + | To create multiple themes, you may create a new directory under ''themes/'' that is similar to the ''default/'' directory, then specify this themes subdirectory from ''/usr/local/etc/slim.conf''. If you do this, be sure each used folder ends off with three files named: ''slim.theme'' , ''background.jpg'' and ''panel.png''. |
Add or edit your themes to ''slim.conf'' : | Add or edit your themes to ''slim.conf'' : |
Revision as of 20:17, 2 March 2015
After installing and configuring the base system, here are instructions on how to get a light desktop up and running quickly. The instructions provided show how to get xdm, slim or wdm login managers working. This example on the window manager JWM 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 xorg jwm slim
Alternatively, ports may be installed. xdm and wdm login managers are other options.
Login manager set up
Basic session managers are XDM, WDM, and slim. After the login manager is configured, the Desktop and a home file of .xinitrc must be set up, or the screen will go into a loop, back to the login manager after logging in. The .xinitrc file must also be set up to use the same window manager as configured in your login manager. KDM and GDM login manager installations are not covered here, because they are part of base windowmanagers with heavy dependencies.
Command-line and login manager preparation setup
First, set up an .xinitrc file in the home folder, which is simular to /usr/local/etc/X11/xinit/xinitrc.
Without .xinitrc in each home folder, the window manager will fail to load from startx. Both .xinitrc and .xsession are needed for your login manager. The contents of .xinitrc are exactly like the .xsession file, except .xsession has to be made executable.
Be sure to add exec [window manager] to the .xinitrc file, without an &. Here is an example of both .xsession and .xinitrc files:
#!/bin/sh exec /usr/local/bin/jwm
Optionally, a symbolic link can be created between these two files. To make .xsession executable type:
% chmod +x .xsession
Once it is set up, type:
% startx
or proceed with your choice of login manager.
Slim
Slim is a practical choice for a login manager, unless you need remote login access. To enable slim, edit /etc/ttys to :
ttyv8 "/usr/local/bin/slim" xterm on secure
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
Customization
To change the background, look into /usr/local/share/slim/themes/default/, create a backup file of background.jpg, then copy your choice background image to /usr/local/share/slim/themes/default/background.jpg
% cd /usr/local/share/slim/themes/default % mv background.jpg background.bk.jpg % mv [pathname/your file] background.jpg
To create multiple themes, you may create a new directory under themes/ that is similar to the default/ directory, then specify this themes subdirectory from /usr/local/etc/slim.conf. If you do this, be sure each used folder ends off with three files named: slim.theme , background.jpg and panel.png.
Add or edit your themes to slim.conf :
#current theme, use comma separated list to specify a set to randomly choose from current_theme default,mytheme
To create themes directories:
% cd /usr/local/share/slim/themes % cp -R default mytheme
Then edit the mytheme/ files to your liking. For more details of slim configuration, type either:
% man slim % less /usr/local/etc/slim.conf.sample
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
Read about the secure setting in this file.
Then set up an .xsession file in the home folder, with the contents "exec [window manager]". Without .xsession, the window manager will fail to load.
exec jwm
Be sure this file is made executable.
% chmod ug+x .xsession
.xsession is identical to the file .xinitrc so a symbolic link may optionally be created. If this is done, make sure that .xinitrc is also made executable. In the next example, .xsession is the link, and .xinitrc is the regular file:
% ln -s .xinitrc .xsession % chmod ug+x .xinitrc
If problems occur, check the file /var/log/xdm.log
% less /var/log/xdm.log
Customization
Customization files for XDM are located at /usr/local/lib/X11/xdm. See http://www.tldp.org/HOWTO/XFree-Local-multi-user-HOWTO/automation_login_screen.html for customizing the background image: note the base directories are different.
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/wdm/.
Make sure the file /usr/local/lib/X11/wdm/wdm-config lists your window manager on the line DisplayManager*wdmWm:. The default window manager for WDM is windowmaker:
DisplayManager*wdmWm: wmaker:afterstep:blackbox:ctwm:enlightenment:fvwm:fvwm2:fvwm95:olvwm:qvwm:tvtwm:jwm
After rebooting, click the option on WDM's login screen, before logging in.
Desktop programs
Some desktop programs should be started through the window manager's configuration files, and others can be started through .xinitrc or .xsession.
For .xinit and .xsession only add a space and ampersand & after programs that are meant to run and detach.
Xorg
To create a custom xorg configuration file:
% Xorg -configure
After testing this configuration, xorg.conf.new can be copied to /etc/X11/xorg.conf:
% cp /root/xorg.conf.new /etc/X11/xorg.conf
See Configuring X and the FreeBSD Handbook: Chapter 6. The X Window System for more information.
Enabling keyboard and mouse
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:
hald_enable="YES" dbus_enable="YES"
Enabling these options sooner may make it harder exit to the command prompt if an error is made. To overcome this, reboot into single user mode, then remount the drive using the command:
% mount -u /
After this is set, you may edit and save configuration files.
Older versions of FreeBSD and xorg required the line in the Xorg configuration file, to enable the mouse and keyboard, to be manually set to:
Option "AllowEmptyInput" "False"
In newer xorg versions, to remove autodetection, add this line to xorg.conf under the sections ServerLayout or ServerFlags:
Option "AutoAddDevices" "false"
References
- FreeBSD 6 Unleashed (2006)
- Various FreeBSD and other related forums
- FreeBSD and programs documentation