<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <HTML> <HEAD> <META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9"> <TITLE>PATH HOWTO: XFree86</TITLE> <LINK HREF="Path-10.html" REL=next> <LINK HREF="Path-8.html" REL=previous> <LINK HREF="Path.html#toc9" REL=contents> </HEAD> <BODY> <A HREF="Path-10.html">Next</A> <A HREF="Path-8.html">Previous</A> <A HREF="Path.html#toc9">Contents</A> <HR> <H2><A NAME="s9">9. XFree86</A></H2> <P> <P> <H2><A NAME="ss9.1">9.1 XDM</A> </H2> <P> <P>XDM is the most common way to log in to a graphical terminal. It a bit looks like login but it is internally totally different. <P>In directory /etc/X11/xdm there are configuration files that are executed on different login phases. Xstartup (and Xstartup_0 specially for screen 0) contains commands to be run after the user has logged in (commands are run as user root). <P>The path that is set for users is in /etc/X11/xdm/xdm-config. There are lines: <P> <BLOCKQUOTE><CODE> <PRE> DisplayManager*userPath: /usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games DisplayManager*systemPath: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11 </PRE> </CODE></BLOCKQUOTE> <P>That will be a default path for normal and root users respectively. It is very important that /usr/bin/X11 is available for X users. If X user logs in to another machine to start and X client application, he should get /usr/bin/X11 to his path even he don't seem to come directly from X terminal. <P>After running Xstartup the XDM runs /etc/X11/Xsession that is run as the final user. Local configuration is meant to be done in /etc/environment that is sourced (included) from Xsession if available (Xsession is run with /bin/sh and thus /etc/environment must be a sh file). This clashes with ssh that supposes that /etc/environment is a file that contains just lines of form VAR=VALUE. <P> <P> <H2><A NAME="ss9.2">9.2 xterm -ls</A> </H2> <P> <P>By default the path for all the commands invoked from X window manager menus is the path inherited from XDM. To use something different it must be set explicitly. To start a terminal emulator with a path that is "normal" some special option must be used. In xterm the option -ls (login shell) must be used to get a login shell with path specified in shell login initialization files. <P> <P> <H2><A NAME="ss9.3">9.3 Window manager menus and buttons</A> </H2> <P> <P>Window manager inherits environment of XDM. All the programs started by the window manager inherit the environment of the window manager. <P>User shell environment does not affect the programs that are started from window manager buttons and menus. For example, if program is started from 'xterm -ls', it has the default environment of login shell but if it is started from menu, it has just environment of the window manager. <P> <P> <HR> <A HREF="Path-10.html">Next</A> <A HREF="Path-8.html">Previous</A> <A HREF="Path.html#toc9">Contents</A> </BODY> </HTML>