pavement

Desktop, light setup

From FreeBSDwiki
(Difference between revisions)
Jump to: navigation, search
(Xorg: xorg.conf.d/)
(Desktop login)
Line 9: Line 9:
 
Basic session managers are XDM, WDM, and slim. [[KDM]] and [[GDM]] login manager installations are not covered here, because they are part of base windowmanagers with heavy dependencies.
 
Basic session managers are XDM, WDM, and slim. [[KDM]] and [[GDM]] login manager installations are not covered here, because they are part of base windowmanagers with heavy dependencies.
  
Without {{file|[[.xinitrc]]}} in each home folder, the window manager will fail to load from the console and from the login manager.
+
To proceed with your choice of desktop login...
  
The {{file|.xinitrc}} file in the home folder requires a minimum of the following to start from a login manager:
+
===XDM===
 +
To configure xdm to start up on boot, edit {{file|/etc/ttys}} and change the option on line ttyv8 from {{code|off}} to {{code|on}}:
 +
ttyv8  "/usr/local/bin/xdm -nodaemon"  xterm  '''on''' secure
 +
The {{code|secure}} option allows logging in to the root console without a password from single user mode.
 +
 
 +
Then set up {{file|.xsession}} in each home folder, with owner permissions to read and execute, {{code|chmod 400 .xsession}
 +
 
 +
{{file|.xsession}} requires the minimum of:
 
  #!/bin/sh
 
  #!/bin/sh
 +
exec ''/usr/local/bin/<windowmanager>''
 
  exec $1
 
  exec $1
  
It appears that {{file|/usr/local/share/xsessions/''*''.desktop}} replaces the home folder file {{file|.xsession}}. If using {{file|.xsession}}, it uses the same syntax as {{file|.xinitrc}}, plus it must be made executable.
+
Customization files for XDM are located at {{file|/usr/local/lib/X11/xdm}}. See [http://www.tldp.org/HOWTO/XFree-Local-multi-user-HOWTO/automation_login_screen.html XFree Local Multi-User HOWTO: Using xdm] and [https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/x-xdm.html FreeBSD Handbook: XDM Configuration Files].<!-- ====Customization==== -->
  
{{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]. Example of a minimal {{file|/usr/local/share/xsessions/fluxbox.desktop}} file:
+
If problems occur, check the file ''/var/log/xdm.log''
[Desktop Entry]
+
% less /var/log/xdm.log
Name=FLUXBOX
+
Exec=fluxbox
+
  
If the directory doesn't exist, create it by typing:
+
===Console===
  % mkdir -p /usr/local/share/xsessions/
+
Without a properly set {{file|[[.xinitrc]]}} in each home folder, the window manager will fail to load from that console. Add {{code|exec <window manager>]}} to the {{file|.xinitrc}} file, without an {{code|&}}. Here is an example of the minimum needed {{file|.xinitrc}}:
 +
#!/bin/sh
 +
exec ''/usr/local/bin/fluxbox''
 +
exec $1
 +
 
 +
Make sure the owner file permissions of {{file|[[.xinitrc]]}} are set to read.
 +
  % chmod 400 .xinitrc
 +
 
 +
Finally, type {{cmd|startx}}.
 +
 
 +
===WDM===
 +
Here is how to set up Wings Display Manager's (WDM).
 +
 
 +
To enable WDM, edit line {{code|ttyv8}} in file {{file|/etc/ttys}} to:
 +
ttyv8  "/usr/local/bin/'''wdm''' -nodaemon"  xterm  '''on''' secure
 +
 
 +
It's configuration files are at {{file|/usr/local/lib/X11/wdm/}}.
 +
 
 +
Make sure the file {{file|/usr/local/lib/X11/wdm/wdm-config}} lists your window manager on the line {{code|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.<!-- ====Customization==== -->
  
To proceed with your choice of login manager...
 
  
 
===Slim===
 
===Slim===
Line 31: Line 57:
 
  ttyv8  "/usr/local/bin/'''slim''' -nodaemon"          xterm  '''on''' secure
 
  ttyv8  "/usr/local/bin/'''slim''' -nodaemon"          xterm  '''on''' secure
  
Slim requires a {{file|*.desktop}} file in a directory that is specified by {{file|/usr/local/etc/slim.conf}} next to the {{code|sessiondir}} option; typically this would be {{file|/usr/local/share/xsessions}}; this is explained in the previous section. Older versions of slim had their window manager configured in the file {{file|slim.conf}} by the {{code|sessions}} option.  
+
Slim requires a {{file|*.desktop}} file in a directory that is specified by {{file|/usr/local/etc/slim.conf}} next to the {{code|sessiondir}} option; typically this would be {{file|/usr/local/share/xsessions}}; this is explained in the previous section. Older versions of slim had their window manager configured in the file {{file|slim.conf}} by the {{code|sessions}} option.
 +
 
 +
{{file|/usr/local/share/xsessions/''*''.desktop}}. If using {{file|.xsession}}, it uses the same syntax as {{file|.xinitrc}}, plus it must be made executable.
 +
 
 +
{{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]. Example of a minimal {{file|/usr/local/share/xsessions/fluxbox.desktop}} file:
 +
[Desktop Entry]
 +
Name=FLUXBOX
 +
Exec=fluxbox
 +
 
 +
If the directory doesn't exist, create it by typing:
 +
% mkdir -p /usr/local/share/xsessions/
  
 
====Customization====
 
====Customization====
Line 54: Line 90:
  
 
  % less /usr/local/etc/slim.conf.sample
 
  % less /usr/local/etc/slim.conf.sample
 
===XDM===
 
To configure xdm to start up on boot, edit {{file|/etc/ttys}} and change the option on line ttyv8 from {{code|off}} to {{code|on}}:
 
ttyv8  "/usr/local/bin/xdm -nodaemon"  xterm  '''on''' secure
 
Read about the '''secure''' setting in this file.
 
 
Then set up identical {{file|.xsession}} and {{file|.xinitrc}} files in each home folder, with the contents and permissions as shown in the above section.
 
 
If problems occur, check the file ''/var/log/xdm.log''
 
% less /var/log/xdm.log
 
 
Customization files for XDM are located at {{file|/usr/local/lib/X11/xdm}}. See [http://www.tldp.org/HOWTO/XFree-Local-multi-user-HOWTO/automation_login_screen.html XFree Local Multi-User HOWTO: Using xdm] and [https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/x-xdm.html FreeBSD Handbook: XDM Configuration Files].<!-- ====Customization==== -->
 
 
===WDM===
 
Here is how to set up Wings Display Manager's (WDM).
 
 
To enable WDM, edit line {{code|ttyv8}} in file {{file|/etc/ttys}} to:
 
ttyv8  "/usr/local/bin/'''wdm''' -nodaemon"  xterm  '''on''' secure
 
 
It's configuration files are at {{file|/usr/local/lib/X11/wdm/}}.
 
 
Make sure the file {{file|/usr/local/lib/X11/wdm/wdm-config}} lists your window manager on the line {{code|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.<!-- ====Customization==== -->
 
 
===Console===
 
To start from the console, be sure to add {{code|exec [window manager]}} to the {{file|.xinitrc}} file, without an {{code|&}}. Here is an example of the minimum needed {{file|.xinitrc}}:
 
#!/bin/sh
 
exec /usr/local/bin/fluxbox
 
exec $1
 
 
Once it is set up, type {{cmd|startx}}.
 
  
 
==Desktop programs==
 
==Desktop programs==

Revision as of 23:30, 30 October 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 x11/xdm , x11/slim or x11/wdm login managers working. This example on the window manager fluxbox provides 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 fluxbox slim

Alternatively, ports may be installed. xdm and wdm login managers are other options.

Desktop login

Basic session managers are XDM, WDM, and slim. KDM and GDM login manager installations are not covered here, because they are part of base windowmanagers with heavy dependencies.

To proceed with your choice of desktop login...

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 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, {{code|chmod 400 .xsession}

.xsession requires the minimum of:

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

Customization files for XDM are located at /usr/local/lib/X11/xdm. See XFree Local Multi-User HOWTO: Using xdm and FreeBSD Handbook: XDM Configuration Files.

If problems occur, check the file /var/log/xdm.log

% less /var/log/xdm.log

Console

Without a properly set .xinitrc in each home folder, the window manager will fail to load from that console. 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 set to read.

% chmod 400 .xinitrc

Finally, type startx.

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.


Slim

Slim is a practical choice for a login manager, unless remote login access is needed. To enable slim, edit the line in /etc/ttys to :

ttyv8   "/usr/local/bin/slim -nodaemon"           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; this is explained in the previous section. Older versions of slim had their window manager configured in the file slim.conf by the sessions option.

/usr/local/share/xsessions/*.desktop. If using .xsession, it uses the same syntax as .xinitrc, plus it must be made executable.

.desktop files are in xdg-style, demonstrated at Desktop Entry Specification. Example of a minimal /usr/local/share/xsessions/fluxbox.desktop file:

[Desktop Entry]
Name=FLUXBOX
Exec=fluxbox

If the directory doesn't exist, create it by typing:

% mkdir -p /usr/local/share/xsessions/

Customization

To change the background, look into /usr/local/share/slim/themes/default/ [optionally 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
% cp [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

Desktop programs

Use the window manager's configuration files or .xinitrc to start up desktop programs.

Xorg

Xorg configuration 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 # May not be necessary, since devfs automatically uses /dev
fdescfs    /dev/fd    fdescfs   rw    0   0 # May not be necessary, since devfs automatically loads it

Programs may have to be built without the hal option. See the manpages: devd(), devfs(), devfs.conf(), devfs.rules(), and fdescfs().

For more advanced topics on hardware configuration, see Hardware Configuration, Audio/Video.

Obsolete configuration reference

This is for those who are familiar with older versions of FreeBSD.

Manually setting the option in xorg.conf to the next line enabled the mouse and keyboard:

Option "AllowEmptyInput" "False"

/etc/rc.conf:

hald_enable="YES" #this option can be replaced with FreeBSD's native program devd, if set in xorg-server.

For 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

Rescue configuration

If an error is made, there are convenient options to fix the problem from the console, without requiring the install disc.

Reboot into single user mode, then remount the drive using mount -u /. Other partitions required for start-up may have to manually be mounted.

Some window managers will let you log in to the console line, by using "console", depending on it's configuration file, as the login user name and the root password.

References

Personal tools