Bug 223128 - Handbook 5.6. The X Display Manager: suggested additions
Summary: Handbook 5.6. The X Display Manager: suggested additions
Status: Closed Feedback Timeout
Alias: None
Product: Documentation
Classification: Unclassified
Component: Books & Articles (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-doc (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-20 13:27 UTC by sid
Modified: 2017-12-16 07:24 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description sid 2017-10-20 13:27:36 UTC
Here is what I suggest for Chapter 5.6 of the Handbook. It is not in a diff yet, and it lacks Docbook markup. I would like to send Chapter 5.7 "Desktop Environments" to its own article, and have the Handbook version of it simplified for conciseness. Suggestions for fixing configuration directories is also here.

-5.6. The X Display Manager
+5.6. Desktop Session Management

-Contributed by Seth Kingsley.
+Originally Contributed to by Seth Kingsley.

-Xorg provides an X Display Manager, XDM, which can be used for login session management.
+Xorg provides an X Display Manager, XDM, and Xinit which can be used for login session management.

-XDM provides a graphical interface for choosing which display server to connect to and for entering authorization information such as a login and password combination.
+XDM provides a graphical interface, and Xinit provides a console interface for choosing which display server to connect to and for entering authorization information such as a login and password combination.

-This section demonstrates how to configure the X Display Manager on FreeBSD.
+This section demonstrates how to configure login session management on FreeBSD.

-5.6.1. Configuring XDM
+5.6.1. Configuration Files

+5.6.1.1. XDM Configuration Files
-The XDM configuration directory is located in /usr/local/lib/X11/xdm.
+The XDM configuration directory is located in /usr/local/etc/X11/xdm.

-Default session script for logins which is run by XDM after a user has logged in. Normally each user will have a customized session script in ~/.xsession that overrides this script
+Default session script for logins which is run by XDM after a user has logged in. This file points to ~/.xsession and other home directory files for customized settings

+5.6.1.2. Xinit Configuration Files
x11/xinit is used to log into X from the console. Its script file is /usr/local/etc/X11/xinit, and this can be customized through the directory /usr/local/etc/x11/xinit.d/ or ~/.xinitrc.

5.6.2. Configuring Remote Access
-To configure XDM to listen for any remote connection, comment out the DisplayManager.requestPort line in /usr/local/lib/X11/xdm/xdm-config by putting a ! in front of it:
+To configure XDM to listen for any remote connection, comment out the DisplayManager.requestPort line in /usr/local/etc/X11/xdm/xdm-config by putting a ! in front of it:

-To restrict remote access, look at the example entries in /usr/local/lib/X11/xdm/Xaccess and refer to xdm(1) for further information.
+To restrict remote access, look at the example entries in /usr/local/etc/X11/xdm/Xaccess and refer to xdm(1) for further information.

+5.6.3. Xsession and Xinit
<para>In your home directory, similar files <filename>.xsession</filename>, or <filename>.xinitrc</filename> require a minimum of:</para>
<screen><userinput>#!/bin/sh</userinput><useriput>/usr/local/bin/[windowmanager]</userinput></screen>

<para><filename>.xinitrc</filename>'s permissions, at minimum, must be set to read, and <filename>.xsession</filename>'s permissions must be set to read and write.</para>
<screen><userinput>chmod ug+rx  ~/.xsession</userinput></screen>

<tip>If you choose to softlink <filename>.xinitrc</filename> to <filename>.xsession</filename>, then both files must be set to execute and read permissions.</tip>

<note>If your window manager of choice is capable of displaying custom wallpapers, and desktop programs, use it instead of Xsession or Xinit.</note>
Comment 1 sid 2017-10-24 20:10:35 UTC
Made improvements. Added rough draft of 5.7 Desktop Environments, and keep suggestion of moving existing version to its own article. Moved note about desktop programs and wallpapers to 5.7. I plan to finish 5.7 and write this in proper markup. If enough time passes, after posting that, I'll attempt to upload it.

-5.6. The X Display Manager
+5.6. Desktop Session Management

-Contributed by Seth Kingsley.
+Originally Contributed by Seth Kingsley.

-Xorg provides an X Display Manager, XDM, which can be used for login session management.
+Xorg provides an X Display Manager (XDM), and Xinit which can be used for login session management.

-XDM provides a graphical interface for choosing which display server to connect to and for entering authorization information such as a login and password combination.
+XDM provides a graphical interface, and Xinit provides a console interface for choosing which display server to connect to and for entering authorization information such as a login and password combination.

-This section demonstrates how to configure the X Display Manager on FreeBSD.
+This section demonstrates how to configure login session management on FreeBSD.

-Some desktop environments provide their own graphical login manager. Refer to Section 5.7.1, “GNOME” for instructions on how to configure the GNOME Display Manager and Section 5.7.2, “KDE” for instructions on how to configure the KDE Display Manager.
+Gnome and KDE provide their own graphical login manager.

-5.6.1. Configuring XDM
+5.6.1. Configuration Files

+5.6.1.1. XDM Configuration Files
-The XDM configuration directory is located in /usr/local/lib/X11/xdm.
+The XDM configuration directory is located in /usr/local/etc/X11/xdm.

-Default session script for logins which is run by XDM after a user has logged in. Normally each user will have a customized session script in ~/.xsession that overrides this script
+Default session script for logins, which is run by XDM after a user has logged in. This file points to ~/.xsession and other home directory files for customized settings

+5.6.1.2. Xinit Configuration Files
x11/xinit is used to log into X from the console. Its script file is /usr/local/etc/X11/xinit, and this can be customized through the directory /usr/local/etc/x11/xinit.d/ or ~/.xinitrc.

5.6.2. Configuring Remote Access
-To configure XDM to listen for any remote connection, comment out the DisplayManager.requestPort line in /usr/local/lib/X11/xdm/xdm-config by putting a ! in front of it:
+To configure XDM to listen for any remote connection, comment out the DisplayManager.requestPort line in /usr/local/etc/X11/xdm/xdm-config by putting a ! in front of it:

-To restrict remote access, look at the example entries in /usr/local/lib/X11/xdm/Xaccess and refer to xdm(1) for further information.
+To restrict remote access, look at the example entries in /usr/local/etc/X11/xdm/Xaccess and refer to xdm(1) for further information.

+5.6.3. Xsession and Xinit
<para>In your home directory, similar files <filename>.xsession</filename>, or <filename>~/.xinitrc</filename> require:</para>
<screen><userinput>#!/bin/sh</userinput><useriput>exec /usr/local/bin/[windowmanager]</userinput></screen>

<para><filename>~/.xinitrc</filename>'s permissions, at minimum, must be set to read, and <filename>~/.xsession</filename>'s permissions must be set to read and write.</para>
<screen><userinput>chmod ug+rx  ~/.xsession</userinput></screen>

<note>Filenames of windowmanagers can be found in <filename>/usr/local/bin/</filename>.</note>
<example>exec /usr/local/bin/jwm</example>

<tip>If you choose to softlink <filename>.xinitrc</filename> to <filename>.xsession</filename>, then both files must be set to execute and read permissions.</tip>



5.7. Desktop Environments
This section describes how to configure desktop environments on a FreeBSD system. A desktop environment can range from a simple window manager to a complete suite of desktop applications. Over a hundred desktop environments are available in the x11-wm category of the Ports Collection.


5.7.1 Services
Though <filename>/etc/rc.conf</filename> D-Bus must be enabled with:
dbus_enable="YES"

A few window managers require proc and hal to be enabled:
<filename>/etc/rc.conf</filename>
<screen>hald_enable="YES"<screen>

<filename>/etc/fstab</filename>
<screen>proc           /proc       procfs  rw  0   0<screen>

5.7.2 Desktop programs
This section is about starting desktop programs from a window manager or desktop.

If your window manager of choice is capable of displaying custom wallpapers, and starting desktop programs, use it for this purpose, instead of Xsession or Xinit.

To use <filename>~/.xsession</filename> or <filename>~/.xinit</filename>, list the commands with "exec [command] &" before the line that starts the window manager.

<example><userinput>#!/bin/sh</userinput><useriput>exec /usr/local/bin/xclock &</userinput><useriput>exec /usr/local/bin/xcalc &</userinput><useriput>exec /usr/local/bin/twm</userinput></example>

<note>All exec commands end in an ampersand, except the last line which starts the windowmanager.</note>