Version: 1.8
last modified date: 09/11/97 
Maintained-by: Aditya Talwar (cosc4hf@menudo.uh.edu)

Objective: This FAQ will attempt to provide answers to overcome day-to-day 
snafus encountered while using CDE desktop.

The following is a list of questions that are frequently asked about
CDE (Common Desktop Environment) in the comp.unix.cde newsgroup. 
You can help make it even better-quality FAQ by writing a succinct 
contribution or update it by sending a _email_ to me.

My Employer/account is _not_ responsible for the contents of this FAQ. 
Since, CDE is joint venture between several UNIX
vendors, this document may not contain the latest or most accurate
information on all platforms & versions at all times. Whenever time permits
I'll try my level best to keep the information in this document updated.

To get the initial structure of the CDE FAQ going, I have added some
questions, please send me what you think should be useful over here.
I'll try my best to keep this FAQ updated and post it on a weekly
schedule initially, and then lengthen the interval later. Thanks for
your help in Advance! (please bear in mind this is still in primitive form).

+The first indexed, HTML, WWW version of this FAQ is available at 
+http://www.pobox.com/~burnett/cde/index.html

+ added questions?
* updated answers? 
1. General
   1.1) What is CDE? Why Should I use CDE?
  +1.2) What are the current platforms & versions of CDE?

2. More Info
  *2.1) What WWW/FTP sites contain CDE information?
  *2.2) What books should I read for CDE ?
   2.3) Where can I look for more information for setting up my desktop?

3. Desktop Setup
   3.1) How can I change my default window manager in CDE?
   3.2) How can I change my keyboard settings in CDE?	
   3.3) Is there a .mailcap/.mime types file for dtmail? where can i 
        find it? 
   3.4) What if I have login problems? How to see the errors?
   3.5) Why can't some applications like Netscape, etc startup in
        workspaces other than my login workspace?
   3.6) Would someone please tell me how to access a floppy while in 
         CDE 1.0.2
   3.7) One question I see a lot is "how to deal with multiple heads"? 
   3.8) How do I change keyboard repeat rate?
   3.9) I'm new to CDE. I'm running it on a Sun which Solaris 2.5.
         The lock icon on the control panel doesn't work.?
   3.10) How do I use arrow keys to switch between workspaces?
   3.11) How to use xv under CDE to create smaller icons?
   3.12) I have recently installed CDE on my Solaris 2.5.1 server. I would like
         to have CDE throw up the login screen at boot time on my console, but
         miss the console messages that are normally displayed there?
   3.13) Does anyone know how to switch between desktops without having to 
         use the tab key?
   3.14) When I log on to CDE in HP-UX, I want certain applications 
         automatically started, like a dtterm running a certain script etc.
         How can this be done ?
   3.15) Why does xsetroot not work?
   3.16) How do I disable 'Open Terminal' on the File Manager?
   3.17) How do I replace the clock on the front panel with a digital clock?
   3.18)  Where are all of the f. in dtwm documented?  If you say the
    dtwm man page,  I will ask you find f.goto_workspace, f.next_workspace, etc.
    I can't find any reference to them in the dtwm man pages?
   3.19) How do I get an application to display in a particular workspace?
         For example:  xterm -xrm "???"  What goes inside the quotes?
   3.20) Is there an equivalent .xinitrc file in CDE which can be edited so
         apps get launched on startup?
   3.21) Maybe we're backward or something, but our Sun w/s are not 
         configured to give users access to /usr.  All docs talk about
         copying some file from /etc/dt to /usr/dt and modifying it which
         doesn't work in our environment.
   3.22) What are the advantages of dtterm over xterm?  The only one I can think
		 of is that it is already installed as the default.  Apart from that,
         cut-and-paste requires more effort than with xterm, and it is not
         identified as VT100 compatible when logging-in to remote systems (I'm
         getting tired of typing 'export TERM=vt100' and 'SET/TERM=vt100'). 
         Before I give up on it, are there some features I'm overlooking?
  *3.23) How to setup a replacment "switch" for
         the front panel as well as the possibilty of working around the
         "only 1 front panel" problem on multi-screen servers??

4. Application Development
   4.1) What are actions and datatypes in CDE?
   4.2) How can I reload new actions and datatypes in CDE?

5. Trouble Shooting
   5.1) What directories/files can i look at to check for errors?
   5.2) The lock button doesn't work, and .dt/errorlog shows
        "dtsession: Unable to lock display due to security restrictions."
  *5.3) We are trying to get some older DEC Xterminals to start up IP X sessions
        through Dtlogin.  I think I have the configuration right, but very 
        little happens, and the Dtlogin freezes up.
        The xterminal sends its request, and I get the CDE hourglass on the
        display, then *POOF* nothing on the xterm, and a dead Dtlogin.
        I'm using CDE 1.0.1 on an Ultra-1 with Solaris 2.5.

6. Acknowledgements
------------------------------------------------------------------------

1.General

*1.1) What is CDE? Why Should I use CDE?

The Common Desktop Environment is a standard desktop for UNIX, providing
services to end-users, systems administrators, and application developers
consistently across many platforms.
 
CDE was originally developed under the COSE (Common Open Software Environment)
initiative by Hewlett-Packard, IBM, Novell and SunSoft.  Those companies
were joined by Digital, Fujitsu, and Hitachi as sponsors of the CDE-Motif
PST under the auspices of the Open Software Foundation (OSF).  That project
is developing the successors to CDE 1.0 and Motif 2.0, along with enhancements
to X11R6 that will be included in the Broadway Release.  The X Consortium
is the Prime Contractor for the PST.

*1.2) What are the current platforms & versions of CDE? 

All of the companies in 1.1 offer CDE in some form.  In addition, TriTeal
offers the Triteal Enhanced Desktop (TED), their CDE implementation, on
several other platforms.

X Inside have just recently released a port of CDE for Linux and FreeBSD.  
WGS (Work Group Solutions) are selling it bundled with X Insides Accelerated
X server (which is needed for their CDE kit)

Each company productizes CDE in its own way, including defect repairs,
platform-specific hardware/software support and value-added features onto
the common software base that is available to sponsors of the technology
and licensees. This is similar to what has happened in the past with Motif
and X11.
 
OSF licenses the common source base without modifications.  The original
COSE source was version 1.0.0; the CDE Maintenance Release was 1.0.10 (to
avoid conflicts with sponsor-specific version numbers, e.g., 1.0.2 from
Sun that comes with Solaris 2.5.1; the source base produced by the CDE-Motif
CST will be version 2.1.0 and will include Motif 2.1.0 (so that the
numbering schemes for CDE and Motif can be unified).
 
Therefore, it is very important for people to provide not only the version
number but also the vendor when identifying the version of CDE that they
are using.

For Sun Gurus: With the release of Solaris 2.6 and new version of CDE on
Sun, if anyone has come across any findings which could be included in
the FAQ please email them to me.

2. More Info

+2.1) What WWW/FTP sites contain CDE information?

Action-definitions and the icons can be found at:

http://www.tm.bi.ruhr-uni-bochum.de/dt/
ftp://ftp.tm.bi.ruhr-uni-bochum.de/pub/dt
These directories are mirrors of our /etc/dt/appconfig.
Does anybody know another resource of this kind on the web or
did anybody the same work as we did?

*ftp://ftp.frontec.se/pub/cde is great site for actions, icons 
which can be placed in /etc/dt

Any mail or upload in ftp://ftp.tm.bi.ruhr-uni-bochum.de/incoming/dt
would be greatly appreciated.

http://www.austin.ibm.com/cgi-bin/CDE/faqtop - AIX flavored FAQ

http://www.hp.com/wsg/ssa/cde.html
http://www.hp.com/xwindow/windowmgrs/cde.html
is the main descriptive page about HP-CDE.  Use the site-specific search
engine to look for "CDE."  My last search turned up 154 documents that
reference it on the HP Web site.

*http://www.partner.digital.com/www-swdev/pages/Home/TECH/CDE/cdedocs.html
*Above seems to have a complete list of manuals for various CDE tasks as 
*system administration, programming, etc. in HTML format.
 
http://www.iac.net/~hollende/manual/hd_cde.html
 
is the top of an elaborate description of how Hale & Dorr, a prestigious
Boston law firm, has adapted CDE for use in their environment.
 
http://www.triteal.com/cde.html
 
has the information about TED.
 
http://www.sun.com/cde/index.html
 
has the description of the current CDE offering for Solaris from Sun.
The complete SOlaris documentation, including CDE manuals,  can be found
at http://docs.sun.com

http://www.osf.org/motif/CDE/cde.html
 
contains information about licensing from OSF the CDE Maintenance Release that
was produced by the CDE-Motif PST.
 
http://www.lib.ox.ac.uk/internet/news/faq/archive/cde-cose-faq.html
 
is on old FAQ about CDE from the COSE days.

http://www.xinside.com/

is X Inside, Inc. Web site - we also have some screen shots up of CDE as well.

other versions floating around? Please let me know.

+2.2) What books should I read for CDE?

A series of official documentation is available from Addison Wesley:
http://www.aw.com/devpress/series/cde.html

I found the Advanced Users and System Adminstrators guide most useful to
get jump-started.

: Can you recommend any books/web sites where I can get some good info on
: personalizing CDE?  Basic configuration?
 
See: http://www.opengroup.org/public/pubs/catalog/mo.htm
 
I have another book about CDE, not listed in the FAQs:
(It is in german, so only for few people of interesst, but ... ;)
 
Hanser Verlag:
Eickemeyer / Koslowski
 Der UNIX=AE Common Desktop
 205 Seiten, 102 Bilder. 1996. Kartoniert.
 ISBN 3-446-18342-6
see: =
 
http://www.hanser.de/computer/buecher/ei18342.htm
or
http://www.hanser.de/computer/index.htm
 

2.3) Where can I look for more information for seting up my desktop?

make sure you /usr/dt/man is added to your $MANPATH
section 4 of /usr/dt/man contains useful setup information,
e.g.,  -- dtfpfile, dtactionfile, dtdtfile, etc.

3. Desktop Setup

3.1) How can I change my default window manager in CDE?

I asked if it were possible to add other window managers such
as twm or fvwm to the CDE login.  I did get a few responses saying that it
could be done, but unfortunately no one knew how.  Anyway, a search through
Web Crawler revealed the following document:
http://www.chem.duke.edu/~watkins/altdesk.html
	
i'm running fvwm right now.  All i had to do was put:
Dtsession*wmStartupCommand:   /home/orb/bin/sunos5/fvwm
in my .Xdefaults file,just change the path to wherever you put fvwm
	
3.2) How can I change my keyboard settings in CDE?

Try putting something like this in your .dt/dtwmrc:

Keys DtKeyBindings
{

    Metaspace              icon|window             f.post_wmenu
    MetaTab                root|icon|window        f.next_key
    Meta ShiftTab          root|icon|window        f.prev_key
    MetaPrior              root|icon|window        f.next_key
    MetaNext               root|icon|window        f.prev_key
    MetaDown               root|icon|window        f.circle_down
    MetaUp                 root|icon|window        f.circle_up
    Meta Ctrl Shiftexclam  root|icon|window        f.set_behavior
    MetaF6                 window                  f.next_key transient
    F11                    root|icon|window        f.next_workspace
    ShiftF11               root|icon|window        f.prev_workspace

}
 
You might need to change the key names - this is based on a 
HP keyboard.  Under the above config, F11 will switch workspaces,
and Shift F11 will switch backwards...	

3.3) Is there a .mailcap/.mime typoes file for dtmail? where can i find it?
DtMail, like most other CDE applications uses the CDE database to figure
out the MIME types. Look at the _Advanced User's and System
Administrator's Guide_ book that comes with CDE in the sections on
Actions and DataTypes. 

These actions and DataTypes allow you to do a lot more than just a MIME
file and are not all that hard to work with. Just remember to reload the
actions and restart the applications you are testing with. 

3.4) What if I have login problems? How to see the errors?

If you cannot login, from the login session interface, choose options
menu,  then choose failsafe login selection. Then login. if there
is a error, you can logs in the following location and fix the problem.
$HOME/.dt/errorlog, $HOME/.dt/startlog, and /var/dt/Xerrors, etc

3.5) Why can't some applications like Netscape, etc startup in

workspaces other than my login workspace?
Some applications like Netscape are non-ICCCM complaint, i.e., they
don't write their command line to the WM_COMMAND property, this means they
don't follow the -xrm resource setting and can't open in the workspace you
want. I believe it will take some time for vendors to make their applications
ICCCM/CDE complaint.

3.6) Would someone please tell me how to access a floppy while in 
CDE 1.0.2?

You can still use /usr/openwin/bin/filemgr to manage floppies
and CD-ROMs.  Or you can use the volcheck(1) command and then
do
        dtaction Open /floppy/floppy0
 
Full support for removable media will be in CDE 1.1

3.7) One question I see a lot is "how to deal with multiple heads"? 

mrz@nimba.NSD.3Com.COM (matthew zeier) writes:
> I have CDE configured to use two screens.  The only problem is that I
> can not get CDE to display a second toolbar on my other screen.  Without
> that, I don't quite know how to easily switch workspaces nor do I know
> how to change backdrops.
>

Running a second toolbar would require having a second dtwm running;
I've never tried this, but I've talked to people who have.  Some
had problems, some seemed to work just fine.  I've never bothered
to try myself, since the following hacks are good enough for me.

1. Customize dtwm keystrokes to change workspaces.  In ~/.dt/dtwmrc
   I have key bindings including the following:

Keys DtKeyBindings
{
    MetaRight		root|icon|window	f.next_workspace
    MetaLeft		root|icon|window	f.prev_workspace
}

   I then use meta and the left/right arrows to bang around the workspaces.
   This works on both screens.

2. Put the programs I use most often on the second screen in the
   dtwm root menu:

Menu DtRootMenu
{
    "Workspace Menu"			f.title
    "Xemacs"		f.exec "xemacs"
    "Cmdtool"		f.exec "/usr/openwin/bin/cmdtool"
    "Dtterm"		f.exec "/usr/dt/bin/dtterm"
     no-label				f.separator
    "Refresh"				f.refresh
    "Minimize/Restore Front Panel"	f.toggle_frontpanel
    "Next workspace"			f.next_workspace
     no-label				f.separator
    "Restart Workspace Manager..."	f.restart
    "Log out..."			f.action ExitSession
}

This gives me a way to launch these apps on the second screen, since
dtwm sets DISPLAY according to which screen you're on when you pick
an app off the root menu.  (You'll note this includes a dtterm,
so I can always launch other applications via the shell.)

3. To set backdrops, just run dtstyle on the other screen, e.g.

$ dtstyle -display :0.1

This gets the style manager running on the other screen, you can
now set backdrops as normal.

For those who *really* want a GUI gadget for changing the workspaces,
check out the sample script in /usr/dt/examples/dtksh/DtWsTest1.
This is a dtksh script that uses the workspace management APIs
to change the workspaces when buttons are clicked.  It's just a
sample, and a little rough, but works.  (I'd love to see somebody
come up with a polished-up version of this.)   [Note the sample
scripts in /usr/dt/examples are only loaded if you installed
the "developer's" version of CDE on Solaris; I don't know
about the other platforms.

3.8) How do I change keyboard repeat rate?

To turn the autorepeat feature on or off open the workspace menu, 
bring up the style manager, click on the kbd icon and change the repeat rate.
You can also do this from within a dtterm window. Options=>Global Blinking
Cursor (Disabled | Enabled)
 
To change the keyboard repeat rate you need to pass some options to the 
Xserver (Xsun is the default for CDE). dtlogin will start the Xserver
by first looking at /etc/dt/config/Xservers. If it does not exist it will
use /usr/dt/config/Xservers. see dtlogin(1X) for more info.
 
copy /usr/dt/config/Xservers to /etc/dt/config/Xservers and add your 
preferences there. Then you must restart the Xserver for changes to take effect.
The line to start the server should like something like this:
   :0   Local local_uid@console root /usr/openwin/bin/Xsun :0 -nobanner -ar1 350
 -ar2 30
 
 # /etc/rc2.d/S99dtlogin stop
 
 # /etc/rc2.d/S99dtlogin start
   
 
from Xsun manpage......
 
  -ar1 milliseconds
          Specify amount of  time  in  milliseconds  before  a
          pressed key begins to autorepeating.  The default is
          500 milliseconds.
 
  -ar2 milliseconds
          specify  the  interval   in   milliseconds   between
          autorepeats of pressed keys.  The default is 50 mil-
          liseconds.

3.9) I'm new to CDE. I'm running it on a Sun which Solaris 2.5.
       The lock icon on the control panel doesn't work.?

This is a known problem with CDE and is being investigated. 
This is known to happen in a NIS+ environment.

3.10) How do I use arrow keys to switch between workspaces?

Take the following lines and add them to the 'Keys DtKeyBindings'
section of your $HOME/.dt/dtwmrc file....
F20                    root|window|icon        f.next_workspace
F19                    root|window|icon        f.prev_workspace
or something similar.

3.11) How to use xv under CDE to create smaller icons?

For the trivia file: problem is caused by xv refusing to force itself to be 
drawn smaller than the window manager reccommended minimum size.  To defeat 
that, add this to .Xdefaults:
 
Dtwm*xv*clientDecoration: none
 
This makes the main xv window borderless, but you can still move it in CDE's 
dtwm  (by default, anyway) with Alt+mouse1drag.

3.12) I have recently installed CDE on my Solaris 2.5.1 server. I would like
      to have CDE throw up the login screen at boot time on my console, but
      miss the console messages that are normally displayed there?

A) Add the following to /etc/dt/config/Xconfig:
        Dtlogin._0.setup:       Xsetup_0
        Dtlogin*grabServer:     False

B) Copy /usr/dt/config/Xsetup to /etc/dt/config/Xsetup_0 and add to
following line at the bottom:

( sleep 2; /usr/openwin/bin/xconsole -geometry 480x130-0-0 -daemon -notify
-verbose -fn fixed -exitOnFail )&
Then restart dtlogin.

+3.13) Does anyone know how to switch between desktops without having to 
       use the tab key?
The neat way to do this is to edit your $HOME/.dt/dtwmrc file and add
the following lines in the Keys DtKeyBindings section

F5      root|icon|window                 f.goto_workspace ws0
F6      root|icon|window                 f.goto_workspace ws1
F7      root|icon|window                 f.goto_workspace ws2
F8      root|icon|window                 f.goto_workspace ws3

If you dont have a dtwmrc file in the above directory then copy the
/usr/dt/config/C/sys.dtwmrc to $HOME/.dt/dtwmrc.

+3.14) When I log on to CDE in HP-UX, I want certain applications
         automatically started, like a dtterm running a certain script etc.
         How can this be done ?

You can create a script in ~/.dt/sessions called sessionetc

The script is executed at CDE startup, and in it, you can start up all those 
cde-unaware apps that cde can't start up itself.
If necessary, you can also use ~/.dt/sessions/sessionexit to execute commands at
CDE exit time.

+3.15) Why does xsetroot not work?
 
change backdrop to Transaparent.

+3.16) How do I disable 'Open Terminal' on the File Manager?

Create ACTION Terminal {EXEC_STRING dterror.ds "Unavailable"} etc.

+3.17) How do I replace the clock on the front panel with a digital clock?

anybody knows this... forward me the answer!

+3.18)  Where are all of the f. in dtwm documented?  If you say the
dtwm man page,  I will ask you find f.goto_workspace, f.next_workspace, etc.
I can't find any reference to them in the dtwm man pages?


The dtwmrc man page has all this information.

dtwmrc(4), to be precise.

>From the man page:

	f.goto_workspace workspace
                       This function causes the workspace manager
                       to   switch  to  the  workspace  named  by
                       workspace.  If no workspace exists by  the
                       specified  name,  then  no  action occurs.
                       Note that adding and  deleting  workspaces
                       dynamically and affect this function.

	f.next_workspace
                       This function causes the workspace manager
                       to  switch  to the next workspace.  If the
                       last workspace is currently  active,  then
                       this  function  will  switch  to the first
                       workspace.

Etc., etc., etc.

 +3.19) How do I get an application to display in a particular workspace?
        For example:  xterm -xrm "???"  What goes inside the quotes?

xterm -xrm "*workspaceList: ws0 ws1"

  The workspace names can be either ws0, ws1, etc, or the Names entered
in the labels on the front panel workspace switch.  The application must
copy the "-xrm" option to a WM_COMMAND property on the application's top
level window.  You can usually check whether an application does that by
running "xprop WM_COMMAND" and clicking on the application's window.
(The dtterm command is aware of workspaces will obey the resource but
does not have any WM_COMMAND property before the session manager asks it
to update one.)

|2.  What is dtsmcmd and where can I find documentation on it?  Is it an
|undocumented function of CDE?  A find was unable to find the binary, and
|a search through the man pages was fruitless as well.

  It is an undocumented internal mechanism of the session manager.

|3.  Where are all of the f. in dtwm documented?  If you say the 
|dtwm man page,  I will ask you find f.goto_workspace, f.next_workspace, etc.
|I can't find any reference to them in the dtwm man pages.  I checked the
|Sun, IBM, and TED versions and found no reference to them.  BTW, all the 
|above versions understand f.goto_workspace, et al. even if they're not
|documented.  (I found out about the functions from this newsgroup.)

  They are all documented in "man dtwmrc".

+3.20) Is there an equivalent .xinitrc file in CDE which can be edited so
         apps get launched on startup?

explore $HOME/.dt - you'll find a bunch of stuff in there.  But the
equivalent to .xinitrc for the _home_ session would be $HOME/.dt/sessions/home/
dt.session.  You can, however have more than one session, so you'll have
to edit each one separately.

 +3.21) Maybe we're backward or something, but our Sun w/s are not 
         configured to give users access to /usr.  All docs talk about
         copying some file from /etc/dt to /usr/dt and modifying it which
         doesn't work in our environment.?

This is for system-wide configuration only!  It affects _all_ CDE
users on that system.  And it's not from /etc/dt to /usr/dt, but
probably the other way around...original copies are stored in /usr/dt
but if you plan to modify them, copy them to /etc/dt, so that an
upgrade of CDE which would overwrite the files in /usr/dt would not
wipe out your customizations.

>For user customizations, I assume we can make these types of
>/usr/dt changes in $HOME/.dt.  ??

That's correct.  Individuals who want to modify the behaviour of CDE
for their use only, should do it in $HOME/.dt

   3.22) What are the advantages of dtterm over xterm?  The only one I can think
         of is that it is already installed as the default.  Apart from that,
         cut-and-paste requires more effort than with xterm, and it is not
         identified as VT100 compatible when logging-in to remote systems (I'm
         getting tired of typing 'export TERM=vt100' and 'SET/TERM=vt100'). 
         Before I give up on it, are there some features I'm overlooking?

You can use the middle mouse button (if you have one) for pasting a selection.

Putting the following line in ~/app-defaults/Dtterm causes dtterm to 
set the TERM environment variable to vt100.

Dtterm*termName: vt100

Other examples of resources that I find useful are:

Dtterm*kshMode: True
Dtterm*autoWrap: True
Dtterm*userFont: -*-lucida sans typewriter-medium-*-*-*-*-120-*
Dtterm*sunFunctionKeys: True       - if you are using a Sun machine
Dtterm*saveLines: 100s
Dtterm*loginShell: True

  *3.23) How to setup a replacment "switch" for
         the front panel as well as the possibilty of working around the
         "only 1 front panel" problem on multi-screen servers??
 
Chuck Campbell wrote:
> 
> Is it possible to have the workspaces buttons change both screens at once,
> or is it possible to have two front panels, one on each head, to achieve
> this?
 
Workspaces are managed on a per-screen basis.  The defaults are 4
workspaces for screen 0, and 1 for any others.  It is possible to have
several workspaces on other screens by modifying dtwm resources (see
/usr/dt/app-defaults/C/Dtwm).  The CDE front-panel is part of the window
manager and it is NOT possible to have 2 front-panels.  (It is possible
to run 2 copies of dtwm, 1 per display, but they won't behave as
expected.)
The next question then is "How do I switch workspaces on display 1
without a front panel?"  One option is to add "f.next_workspace and
f.prev_workspace" to your dtwmrc root menu windows.  Another option is
to write a stand-alone workspace switch client using the CDE API (see
attached example).
 
Content-Disposition: inline; filename="switch.c"
author: Chuck Slivkoff

#include 
#include 
#include #include Widget shell; static void SetWorkspaceCB(Widget w, XtPointer client_data, XtPointer call_data) { DtWsmSetCurrentWorkspace(shell,(Atom)client_data); return; } /* SetWorkspaceCB */ static void WsCB(Widget w,Atom aWorkspace,XtPointer client_data) { return; } int main ( int argc, char **argv ) { Display *dpy; Window root; Widget rc, pb; XtAppContext app; XmString xmstr; Atom *aWs; int wscount,i; DtWsmWorkspaceInfo *pWsInfo; String wsname; shell = XtAppInitialize ( &app, "Switch", NULL, 0, &argc, argv, NULL, NULL, 0 ); dpy = XtDisplay(shell); root = XDefaultRootWindow(dpy); rc = XtVaCreateManagedWidget("rc", xmRowColumnWidgetClass, shell, XmNorientation,XmHORIZONTAL, XmNnumColumns,2, XmNpacking,XmPACK_COLUMN, NULL); if (DtWsmGetWorkspaceList(dpy,root,&aWs,&wscount) == Success) { for (i=0;ipchTitle,XmFONTLIST_DEFAULT_TAG); pb=XtVaCreateManagedWidget(wsname, xmPushButtonWidgetClass, rc, XmNlabelString,xmstr, XmNshadowThickness,3, XmNbackground,pWsInfo->fg, NULL); XtAddCallback(pb,XmNactivateCallback,SetWorkspaceCB,(XtPointer)aWs[i]); DtWsmFreeWorkspaceInfo(pWsInfo); XtFree(wsname); XmStringFree(xmstr); } /* for */ } /* if */ else { printf("Error: can't get workspace info. Exiting\n"); exit(-1); } DtWsmAddCurrentWorkspaceCallback(shell,(DtWsmWsChangeProc)WsCB,NULL); XtRealizeWidget ( shell ); DtWsmOccupyAllWorkspaces(dpy,XtWindow(shell)); XtAppMainLoop ( app ); } -chuck Chuck Slivkoff --------------AAF27C978C6-- 4. Application Development 4.1) What are actions and datatypes in CDE? Actions are modular programming methods by which CDE can automate desktop task like running applications, or manipulating data files. You can create your own actions,data types, and icons for your local environment If you are new to CDE, the following link is a good site contains good examples which are installed in /etc/dt of your machine: The complete thing is now accessible as ftp://ftp.frontec.se/pub/cde, just point it out. And now, we want to see more! There just MUST be other guys sitting on resources like this! Maybe you should make a explicit request for such resources in comp.unix.cde? --michael datatype (can some give me a good definition?) 4.2) How can I reload new actions and datatypes in CDE? There are 2 ways: /usr/dt/bin/dtaction ReloadActions or click on the Reload_Actions icon under the Desktop_Tools folder. 5. Trouble Shooting 5.1) What directories/files can i look at to check for errors? $HOME/.dt/errorlog $HOME/.dt/startlog /var/dt/Xerrors +5.2) The lock button doesn't work, and .dt/errorlog shows "dtsession: Unable to lock display due to security restrictions." Kevin Davidson suggests creating XLock.dt in ~/.dt/types or /etc/dt/appconfig/types/C, containing ------------------------------8<--snip-snip--8<------------------------------ ## Replace broken LockDisplay action ## Built in one claims it cannot lock the screen... ACTION LockDisplay { LABEL LockDisplay TYPE COMMAND EXEC_STRING xlock -remote WINDOW_TYPE NO_STDIO DESCRIPTION The LockDisplay action locks the workstation. \ You must know the user's or root password to \ unlock the workstation. } *5.3) We are trying to get some older DEC Xterminals to start up IP X sessions through Dtlogin. I think I have the configuration right, but very little happens, and the Dtlogin freezes up. The xterminal sends its request, and I get the CDE hourglass on the display, then *POOF* nothing on the xterm, and a dead Dtlogin. I'm using CDE 1.0.1 on an Ultra-1 with Solaris 2.5. Your X-terminal probably doesn't know about the CDE font aliases. I've seen this problem several times when X-terminals or non-CDE aware machines try to start up a CDE session through XDMCP. How far you get into the session before it dies is platform specific. (You can get all the way in on AIX, but the fonts are wierd. You can't even get the dtlogin screen on HPUX. Sun dies when dthello(1) tries to run mid way through the login sequence.) CDE tries to fix the font path in /usr/dt/config/Xsetup, but the code won't work unless the X-terminal has NFS or tftp access to the font directories in /usr/dt/config/xfonts. You can typically make an X-terminal CDE aware by booting it from a CDE aware host. My favorite solution is to run a fontserver fs(1) or xfs(1) on the machine that accepts X-terminal logins. Then copy /usr/dt/config/Xsetup to /etc/dt/config/Xsetup and change the X-terminal case to install your font server in the font path. Before configuring a font server yourself, check your sysadmin tools. The turn-key font server on HPUX turned out to be exactly the one required, but I still had to fix Xsetup. ________ Roger Droz ------------------------------8<--snip-snip--8<------------------------------ 6. Acknowledgements This is a rudimentary set of initial questions I have come up with to help the new user or the Guru to look for common problems and answers. Your contributions to enhance this document will be much appreciated. I have written some material in this document and shamelessly copied some of your USENET postings from the CDE newsgroup. acknowledgements for contributions goto: Rich McAllister: rfm@eng.sun.com Claus Oberste-Brandenburg: cob@tm.bi.ruhr-uni-bochum.de Andrew Page: page@cv.hp.com Brian Holtz: holtz@netcord.Eng.Sun.COM Scott Raney: raney@metacard.com Rick Beldin: rbeldin@atl.hp.com Chris O'Regan: chris@ECE.Concordia.CA Steven F. Burnett: burnett@pobox.com Michael.Kolmodin: Michael.Kolmodin@lule.frontec.se Amit Paul: akpaul@leland.Stanford.EDU Ola Andersson: mailto:rand@ling.umu.se Himanshu Gohel: gohel@rad.usf.edu Mike Stroyan, mike_stroyan@fc.hp.com Andy Warburton: andyw@parallax.co.uk Roger.Droz@Seaslug.ORG and many more...