0084-0086.html
来自「linux-unix130.linux.and.unix.ebooks130 l」· HTML 代码 · 共 352 行
HTML
352 行
<HTML>
<HEAD>
<TITLE>Developer.com - Online Reference Library - 0672311739:RED HAT LINUX 2ND EDITION:Common Desktop Environment</TITLE>
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
<SCRIPT>
<!--
function displayWindow(url, width, height) {
var Win = window.open(url,"displayWindow",'width=' + width +
',height=' + height + ',resizable=1,scrollbars=yes');
}
//-->
</SCRIPT>
</HEAD>
-->
<!-- ISBN=0672311739 //-->
<!-- TITLE=RED HAT LINUX 2ND EDITION //-->
<!-- AUTHOR=DAVID PITTS ET AL //-->
<!-- PUBLISHER=MACMILLAN //-->
<!-- IMPRINT=SAMS PUBLISHING //-->
<!-- PUBLICATION DATE=1998 //-->
<!-- CHAPTER=06 //-->
<!-- PAGES=0075-0096 //-->
<!-- UNASSIGNED1 //-->
<!-- UNASSIGNED2 //-->
<P><CENTER>
<a href="0081-0083.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="0087-0090.html">Next</A>
</CENTER></P>
<A NAME="PAGENUM-84"><P>Page 84</P></A>
<P>With the new Mail subpanel still extended, drag the
Information icon to the Install Icon control on the subpanel. The icon is added to the subpanel, and when it is clicked, the
Information view of the Application Manager appears on the desktop.
</P>
<P>To delete this new icon, click it and select Delete. To delete the new subpanel, click the
Mail icon and select Delete Subpanel.
</P>
<CENTER>
<TABLE BGCOLOR="#FFFF99">
<TR><TD><B>
TIP
</B></TD></TR>
<TR><TD>
<BLOCKQUOTE>
This is only the beginning of what is available via menus and the right mouse button.
Don't be afraid to explore the Front Panel by yourself. If you are worried about making
an irreversible change to the desktop, set up a home session (described in "The Style
Manager" section) before you experiment. If you make a change that is too much to
reverse, log out and log in again. When you have a configuration that you really like, save
your home session again.
</BLOCKQUOTE></TD></TR>
</TABLE></CENTER>
<H4>
Advanced Customizations
</H4>
<P>Beyond the simple menu selections and drag and drop, there are customizations that
require editing some configuration files and scripts.
</P>
<H5><A NAME="ch06_ 10">Shell and Login Setup
</A></H5>
<P>Experienced users might be confused the first time they use the shell after logging into the
CDE. Unless some adjustments have already been made, their
.profile or .login scripts are not read. When a user logs into the CDE, the file
.dtprofile is read instead.
</P>
<P>Rather than force users to modify their environments, the CDE designers added a
configuration parameter, DTSOURCEPROFILE, to the
.dtprofile. If this variable is set to true,
dtlogin will read the appropriate file, depending on the user's shell. The CDE is built upon
ksh, so dtlogin expects sh or ksh syntax in
.dtprofile. It will, however, accept csh syntax in
.login. The default .dtprofile contains notes on how users can set up their environments to work well
in and out of the desktop.
</P>
<P>Another important setting in .dtprofile is session logging. Output generated by
applicationsstarted within the desktop doesn't automatically go to the console as it does in most X
Window environments. It is normally discarded. If viewing this output is necessary, direct it to
a file (or the console) by setting the
dtstart_sessionlogfile variable to a valid filename
in .dtprofile. The default .dtprofile has comments explaining how to do this.
</P>
<P>Logically, because .dtprofile is read in at login, you can make other adjustments to it to
suit your needs, such as setting environment variables needed for applications and also
modifying the search path. Because some changes might be necessary only within X Window, this
provides a good mechanism for users who want to keep their non-GUI environment lean.
</P>
<A NAME="PAGENUM-85"><P>Page 85</P></A>
<P>If you have no .dtprofile in your home directory
($HOME), the system uses the default version stored in
$CDEROOT/config/sys.dtprofile ($CDEROOT is the base directory of the CDE
installation, usually /usr/dt) and copies it into the your directory for the next time.
</P>
<P>In the event that an administrator wants to make changes to the environment for an
entire workstation, regardless of user, the system files
listed can be copied into another directory,
/etc/dt/config, and modified.
</P>
<H5><A NAME="ch06_ 11">X Resources
</A></H5>
<P>Users who want to add personal X resources can simply create an
.Xdefaults file in their home directory. For system administrators who want to set resources for entire systems, there is
a shared file, sys.resources, you can modify and place in
/etc/dt/config/C/.
</P>
<H5><A NAME="ch06_ 12">Advanced Front Panel Customization
</A></H5>
<P>The Front Panel is controlled by a series of configuration files that are loaded dynamically
each time the desktop is started. This dynamic loading process enables users to change their
panel configuration without having root access to the system. Also, administrators can override
default behavior and tailor the desktop to their needs without changing the default
configuration files and without making things more difficult for advanced users.
</P>
<P>The format of the Front Panel configuration files is described in detail in the
dtfpfile manual page. (If this manual page is not available on your system, install the
TEDman package from the CDE media.) I will cover enough of this file format in order to make some basic changes.
</P>
<P>Configuration files are read from the action database search
path, which consists of these locations, in this order:
</P>
<UL>
<LI> $HOME/.dt/types/
<LI> /etc/dt/appconfig/types/C/
<LI> /usr/dt/appconfig/types/C/
</UL>
<P>In the last two locations, C is the language directory. Another industry standard is the notion
of locales. A locale is a set of display conventions and language files that make it possible to use
an application effectively in different parts of the world. For example, one locale might
display dates using the format MM/DD/YY, while another uses DD/MM/YY. Locales are part of
the ISO standards for computing. Set the locale for the CDE with the
LANG environment variable and by installing the proper locale support files. Support is included for Western Europe,
Japanese, traditional Chinese, simplified Chinese, and Korean.
</P>
<P>The generic C locale is the default and is generally the one used in the United States.
</P>
<P>The order of the search path is important because in the event that two files specify the
same name for two controls, the description that is read first is the one that is used. This enables
a system administrator to override the CDE's behavior by placing control descriptions in
the
</P>
<A NAME="PAGENUM-86"><P>Page 86</P></A>
<P>system location and enables users to override the administrator's control by placing their
own definitions in their home directory.
</P>
<CENTER>
<TABLE BGCOLOR="#FFFF99">
<TR><TD><B>
TIP
</B></TD></TR>
<TR><TD>
<BLOCKQUOTE>
All the changes you perform in this section will occur in the first location, the user's
home directory. Any or all of them can be performed in either of the other two locations and
will then affect all users on that system—this is how to integrate an application suite such
as Applix or the Cygnus development tools into a company or departmentwide
system. However, modifying the third directory,
/usr/dt, is generally discouraged: An upgrade to a new version of CDE would remove the changes because a newer version of the
configuration files would most likely be copied into the system!
<BR>For this reason, make any modifications to the default CDE configuration for an
entire workstation or organization in the /etc/dt directory tree.
</BLOCKQUOTE></TD></TR>
</TABLE></CENTER>
</P>
<P>The Front Panel is divided into five different component types—panel, box, control,
subpanel, and switch. The panel is the outermost container, the Front Panel itself. For this
component, you need to set behavior such as whether a single or double-click activates controls and
whether the Front Panel has a minimize button or default window menu.
</P>
<P>A panel contains one or more boxes. A box contains one or more controls. The default
configuration contains one box, which is adequate for most Front Panel setups.
</P>
<P>A third container type is the subpanel, with which you are already familiar. In a
configuration context, a subpanel contains controls, similar to a box.
</P>
<P>Another container type, the switch, is the middle panel in the Front Panel, and it contains
the virtual screen manager and the four small controls that immediately surround it.
</P>
<P>A control is an icon like the Mail and Calendar icons discussed earlier in the chapter in
the section "The Desktop Environment."
</P>
<P>Let's go through the steps of removing a control from the default configuration of the
Front Panel. Suppose you decide to delete the Mail control because you don't use the CDE mail reader.
</P>
<P>The Mail control is a built-in control, which means that it comes in the default
configuration and must be explicitly removed with a
DELETE directive rather than simply left out of the
configuration.
</P>
<P>The first step is to create a new .fp file in your Front Panel configuration directory, which
is $HOME/.dt/types. Almost all desktop modifications are made
from the types branch of the directory tree:
</P>
<!-- CODE SNIP //-->
<PRE>
cd $HOME/.dt/types
cp /usr/dt/appconfig/types/(LANGUAGE)/dtwm.fp ./mymail.fp
chmod +w mymail.fp
</PRE>
<!-- END CODE SNIP //-->
<P><CENTER>
<a href="0081-0083.html">Previous</A> | <a href="../ewtoc.html">Table of Contents</A> | <a href="0087-0090.html">Next</A>
</CENTER></P>
</td>
</tr>
</table>
<!-- begin footer information -->
</body></html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?