A Linux User Reference

Search tips
  • search ignores words that are less than 4 characters in length
  • searches are case insensitve
  • if a search does not return anything try it in Boolean mode then Query expansion mode by checking the appropriate radio button e.g. searching for 'cron' in just the Administration category returns nothing - presumably because the 50% threshold is reached. Boolean mode ignores this threshold so a search for 'cron' returns several hits
  • in Boolean mode preceding a word with a '+' means the result must include that word, a '-' means it must not
  • in Boolean mode '+crontab -anacron' means match articles about crontab that DO NOT mention anacron
  • to match a phrase e.g. 'manage system' check the Boolean mode radio button and enclose the phrase in quotes "some phrase ..."
  • in Query expansion mode the search context is expanded beyond the keywords you entered - relevancy of hits may well be degraded


X Window Display Manager

  • X Display Manager (XDM)

    It typically runs on an application server allowing users to logon and run applications from that server

    There are two main ways in which XDM can interact with an X Server (using xdmcp):

    • accept queries from X server
    • manage the X server

    Several configuration files - /etc/X11/xdm or /usr/lib/X11/xdm

    File name Description
    /etc/X11/xdm/Xaccess Controls inbound requests from remote hosts - who can/cannot access
    /etc/X11/xdm/Xresources Global version of .Xresources. Can be used to modify login screen. Uses a '!' and not a '#' for comment lines. Controls behaviour of 'xlogin' widget, used by 'xdm'
    /etc/X11/xdm/Xservers Associates display names(:0, :1 ...) with the local server or with foreign displays such as an X Terminal.
    /etc/X11/xdm/Xsession Contains default startup script which is run by the Display Manager (xdm, gdm) after a successful login. Looks for .xsession in a user's home directory. Controls things like which window manager to use and applications to start.
    /etc/X11/xdm/Xsetup_0 or Xsetup Run before gui login screen, makes changes to the login screen. Often used to set colours, display graphics, run other programmes. Runs as root. Make sure any script either exits or runs in background else login screen may not appear.
    /etc/X11/xdm/xdm-config Associates xdm configuration resources with other files i.e. above mentioned.
  • XDM managed X servers

    The /etc/X11/xdm/Xservers file contains a list of machines that 'xdm' will connect to automatically. The machines listed already have an X server running but want 'xdm'(on a different host) to provide the login prompt.

    When running as a stand-alone X Workstation, there is usually a single entry in Xservers listing just the localhost.

    Locally managed xdm X server - Xservers

    # local host entry first
    :0 local /usr/bin/X11/X 

    Add remote xdm managed X servers - Xservers

    # local host entry first
    :0 local /usr/bin/X11/X
    # Remote hosts
    hostname1:0 foreign                # Provide login prompt for these 
    hostname2:0 foreign

    'xdm' will run on the local machine providing a login prompt as well as providing a login prompt on the remote X-stations display.

    This is only required for 'xdm managed X Servers', above entries are NOT needed if the remote X servers query XDM.

  • Configure XDM to receive xdmcp queries
    • Some distributions may, by default, prevent 'xdm' from listening to queries.
    • 'xdm listens on port 177 for XDMCP requests responding with the login screen.
    • Access is controlled via /etc/X11/xdm/Xaccess file. Lines starting with '!' deny access.

    Allow XDMCP queries (if disabled) - xdm-config

    DisplayManager.requestPort: 0                          # this is disabled
    !DisplayManager.requestPort: 0                         # this is enabled

    Only use one of the above lines in the file either enabled or disabled not both.

    Sample access controls - /etc/X11/xdm/Xaccess

    # Direct queries 
    *                           # Any host may request a login prompt 
                                # via XDM using a direct query           
    # Indirect queries
    * CHOOSER BROADCAST         # Any host may query this machine for a list
                                # of hosts to connect to.  BROADCAST means the
                                # chooser program can use broadcasts to get a  
                                # list of available servers from remote systems
                                # running XDM
    # A specific host        # Allow all hosts from this domain - would not
                                # need if first line is '*' (as in this example)
    # Block/deny
    !           # Deny this specific host
  • XDM chooser application

    When XDM receives an indirect query it can provide the user with a list of other XDM managed servers that it knows about. A chooser application will provide the user a list of detected hosts on the network that are currently accepting XDM connections.

    The chooser will obtain its lists of hosts by one of two methods:

    • Broadcast Query. A list of available servers is built up from replies to the broadcasts.
    • Explicit Listing. A static list of hosts provided in the Xaccess file.

    Example of explicit host listing - /etc/X11/xdm/Xaccess

    %hostlist host1 host2 host3
    * CHOOSER %hostlist

    With explicit listing a host is listed even if it is not up. The localhost can also be included in the list.

    XDM should be configured to NOT startup on the local console display and login should always be performed via an indirect query to the local chooser application.

  • Configure X-terms background and foreground
    # Many x-applications can be customised via a users ~/.Xresources file.
    # A resource is a configurable setting permitted by the application.
    # Format: 
    # <application>*<resource>: <value>
    Xterm*background: Blue
    Xterm*foreground: Yellow
  • XDM login parameters

    Make some changes to the xdm login prompt

    xlogin*foreground:  black
    xlogin*background:  steelblue
    xlogin*greetColor:  white
    xlogin*promptColor: grey
    xlogin*failColor:   red
    xlogin*greeting: "Welcome to ...."
  • Change window background

    Or /usr/X11R6/bin/xsetroot.

    Allows a user to tailor the appearance of the background ("root") window on a workstation display running X.

    Normally, experiment with 'xsetroot' until satisfied then put the 'xsetroot' command that produces the desired display into your X startup file.

    Running the command with no options or '-def' the window is reset to its default state. Color names like steelblue are defined in the /usr/lib/X11/rgb.txt file.

    Experiment until happy with the colour

    # xsetroot -solid "navy blue"
    # xsetroot -mod 2 8 -bg blue

    Make changes 'permanent' - Xsetup (Xsetup_0)

    /usr/bin/xsetroot -solid blue
    /usr/bin/xsetroot -bitmap /usr/include/X11/bitmaps/xsnow
    /usr/bin/xsetroot -bitmap /usr/include/X11/bitmaps/xsnow -fg blue -bg yellow

    If Xsetup[_display] file does not exist you can put the commands in '$(HOME)/.xintrc' which you probably should since it is 'per user' configuration. Normally you would include just one of the above three command examples.

    Only one of the background color/tiling changing options (-solid, -gray, -grey, -bitmap, and -mod) may be specified at a time.

    Restart the X server - 'ctr-alt-backspace'

  • Remote terminal resources

    Applicable to both x-stations and x-terminals. Basically, via xdm-config, you tell XDM which resource file to use for each remote terminal.

    In xdm-config file '_n' is the XDM way of saying ':n' so display ':0' is represented in this file as '_0'.

    Sample xdm-config entries - /etc/X11/xdm/xdm-config

    # Use resources file Xres_0 for localhost:0.
    DisplayManager._0.resources            /etc/X11/xdm/Xres_0
    # Use resources file Xres_<hostname>_0 for hostname:0.
    DisplayManager.<hostname>_0.resources  /etc/X11/xdm/Xres_<hostname>_0
    # Use Xresources file Xres_0 for everybody else's main display.
    DisplayManager*resources               /etc/X11/xdm/Xresources
  • Change colour depth via /etc/X11/xorg.conf
    Section "Screen"
        Identifier     "Default Screen"
        Device         "Configured Video Device"
        Monitor        "Configured Monitor"
        DefaultDepth    24
    Section "Screen"
        Identifier     "Default Screen"
        Device         "Configured Video Device"
        Monitor        "Configured Monitor"
        DefaultDepth    16

    Provide an extra 'screen' section for each additional colour depth.

    Tell X server to use a color depth - /etc/X11/xdm/Xservers

    :0 local /usr/X11R6/bin/X -bpp 16

    '-bpp' option sets the default colour depth. The setting value needs to be within a 'screen' section in 'xorg.conf'.

  • XDM start up

    This is dependent on use. The runlevel for X varies on distributions e.g. Ubuntu is 2.

    X Workstation - XDM and X server both local

    Normally XDM will be configured to start on boot (depending on the run level) and will start X automatically.

    The Xservers file would only need a single entry for localhost and the Xaccess file would similarly have an entry to grant access to localhost.

    X Terminal - Remote XDM

    Start X with no clients, with access permissions such that the remote XDM is able to connect when it starts up.

     # /usr/X11R6/bin/X -ac

    Can configure to run on boot using one of the following to start X and use xdmcp

     /usr/X11R6/bin/X -query           (Send query to a specific host)
     /usr/X11R6/bin/X -indirect        (Get a list form a specific host)
     /usr/X11R6/bin/X -broadcast                       (First host to reply)

    Any of the X Terminal X commands could be placed in their /etc/inittab to automatically run their Xservers on boot and send a query to a remote XDM.

    id:5:initdefault:                                  # Default run level
    x:5:respawn:/usr/X11R6/bin/X -broadcast            # Can replace -broadcast with any
                                                       # valid option

    Start, Stop xdm from comand line

    # xdm                                             (Start)
    # kill <pid of xdm>                               (Stop)

    Usually automated at startup/shutdown.

    Automate on startup - /etc/inittab

    X:5:respawn:/usr/X11R6/bin/xdm -nodaemon          # Comment out to disable automatic startup

    May also have an init script linked to an 'rcN.d/' in which case.

    sudo /etc/init.d/xdm [start | stop | ...]

    Prevent automatic startup of X by xdm - /etc/X11/xdm/Xservers

    #:0 local /usr/X11R6/bin/X                        # Commented out to disable