pavement

Desktop, light setup

From FreeBSDwiki
(Difference between revisions)
Jump to: navigation, search
m (XDM: correct .xsession permission setting)
(updated; removed slim, updated config directory)
Line 7: Line 7:
  
 
==Desktop login==
 
==Desktop login==
The instructions provided show how to get {{yhl|XDM}} or {{yhl|SLiM}} login managers working. KDM, GDM, and WDM login manager installations are not covered here, because they are part of base windowmanagers that are not BSD style.
+
The instructions provided show how to get {{yhl|XDM}} login manager or {{ywl|Xinit}} working. KDM, GDM, WDM and SLiM login manager installations are not covered here, because they are part of base windowmanagers that are not BSD style or are outdated.
  
 
To proceed with your choice of desktop login...
 
To proceed with your choice of desktop login...
Line 24: Line 24:
  
 
====Customization====
 
====Customization====
Customization files for XDM are located in {{file|/usr/local/lib/X11/xdm/}}.
+
Customization files for XDM are located in {{file|/usr/local/etc/X11/xdm/}}.
  
 
The background image can be changed by using a background setting command in {{file|Xsetup_0}}. {{cmd|xsetroot}} can change the background color, but for images it is limited in the file types it can display. To overcome this, use a background setting console program in place of {{cmd|xsetroot}}.
 
The background image can be changed by using a background setting command in {{file|Xsetup_0}}. {{cmd|xsetroot}} can change the background color, but for images it is limited in the file types it can display. To overcome this, use a background setting console program in place of {{cmd|xsetroot}}.
Line 52: Line 52:
  
 
Finally, type {{cmd|startx}}.
 
Finally, type {{cmd|startx}}.
 
===Slim===
 
{{port|x11/slim}} is a practical choice for a login manager, unless remote login access is needed. To enable slim, edit the line in {{file|/etc/ttys}} to :
 
ttyv8  "/usr/local/bin/'''slim''' -nodaemon"          xterm  '''on''' secure
 
 
Slim requires a {{file|*.desktop}} file, typically in {{file|/usr/local/share/xsessions/}}. This directory is specified in {{file|/usr/local/etc/slim.conf}} next to the {{code|sessiondir}} option. If the directory doesn't exist, create it with the {{cmd|mkdir -p}} command.
 
 
Example of a minimal {{file|/usr/local/share/xsessions/fluxbox.desktop}} file:
 
[Desktop Entry]
 
Name=FLUXBOX
 
Exec=fluxbox
 
{{file|.desktop}} files are in xdg-style, demonstrated at [http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-1.0.html#basic-format Desktop Entry Specification].
 
 
====Customization====
 
To change the background, look into {{file|/usr/local/share/slim/themes/default/}} [optionally create a backup file of {{file|background.jpg}}] then copy your choice background image to {{file|/usr/local/share/slim/themes/default/background.jpg}}
 
 
% cd /usr/local/share/slim/themes/default
 
% mv background.jpg background.bk.jpg
 
% cp [pathname/your file] background.jpg
 
 
To create multiple themes, you may create a new directory under {{file|themes/}} that is similar to the {{file|default/}} directory, then specify this themes subdirectory from {{file|/usr/local/etc/slim.conf}}. If you do this, be sure each used folder ends off with three files named: {{file|slim.theme}}, {{file|background.jpg}} and {{file|panel.png}}.
 
 
Add or edit your themes to {{file|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 {{file|mytheme/}} files to your liking. For more details of slim configuration, type either:
 
% man slim
 
 
% less /usr/local/etc/slim.conf.sample
 
  
 
==Desktop programs==
 
==Desktop programs==

Revision as of 11:48, 9 February 2018

After installing and configuring the base system, here are instructions on how to get a light desktop up and running quickly.

Contents

Install

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

% pkg install xorg xdm fluxbox

This example on the window manager fluxbox provides insight on how to install other window managers.

Desktop login

The instructions provided show how to get XDM login manager or Template:Ywl working. KDM, GDM, WDM and SLiM login manager installations are not covered here, because they are part of base windowmanagers that are not BSD style or are outdated.

To proceed with your choice of desktop login...

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.

Then set up .xsession in each home folder, with owner permissions to read and execute, for example chmod 500 .xsession.

.xsession requires the minimum of:

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

Customization

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

The background image can be changed by using a background setting command in Xsetup_0. xsetroot can change the background color, but for images it is limited in the file types it can display. To overcome this, use a background setting console program in place of xsetroot.

Example of Xsetup_0:

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

The xconsole line can optionally be commented out or removed here, as it is not required for all purposes.

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.

The file Xsession is responsible for choosing the window manager, it points to .xsession in the home directory.

For more information, see XFree Local Multi-User HOWTO: Using xdm and FreeBSD Handbook: XDM Configuration Files.

Console

Without a properly set .xinitrc in each home folder, the window manager will fail to load from that user's command line. Add exec <window manager> to the .xinitrc file, without an &. Here is an example of the minimum needed .xinitrc:

#!/bin/sh
exec /usr/local/bin/fluxbox
exec $1

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

% chmod 400 .xinitrc

Finally, type startx.

Desktop programs

Use the window manager's configuration files, .xsession or .xinitrc, depending on which one is used, to start up desktop programs. The window manager's configuration files, and .xsession can be used in combination to start programs, but, for clarity, it is better to not redundantly start the window manager through both.

Example of .xsession or .xinitrc:

#!/bin/sh
xterm &
xclock &
exec fluxbox
exec $1

Programs are loaded with &, and the window manager is loaded last with exec. The first and last line ensure which shell to use and to exit the script cleanly. The user's permissions will have to be set to read and execute, for example chmod 500 .xinitrc .xsession. .xsession and .xinit can be soft-linked to each other, which will make their file permissions match.

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

Personal tools