Common Desktop Environment FAQ
Maintained-by: Aditya Talwar (cosc4hf@bayou.uh.edu) at http://www.laxmi.net/cde.htm
Last Update : 05 / 10 / 2000
Objective: This FAQ will attempt to provide answers to overcome day-to-day
snafus encountered while using CDE desktop in the UNIX environment.
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 cosc4hf@bayou.uh.edu
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 indexed, HTML, WWW version of this FAQ is available at
+http://www.laxmi.net/cde.htm
+ 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??
3.24) Is there a way to tell dtwm to DELAY the raising of windows that
acquire mouse focus?
3.25) I'm having a problem in which that /etc/profile doesn't seem to be
read when login in on the CDE environment. I put a few environment
stuff in there (path and others) but nothing seems to be set. I know
about $HOME/.dtprofile and DTSOURCEPROFILE=true but that doesn't help
for /etc/profile. Is there as /etc/profile.dt that should exist or a
similar file for CDE?
3.26) I am trying to find out if its possible to toggle between two different
actions in one space on the subpanel. For example if you had an option
on a subpanel that was titled "printer enable", as soon as you clicked
on that action the next time that subpanel is brought up it should read
"printer disable".
3.27) How do I disable the CDE front panel entirely.
3.28) I'm using Solaris 2.7 under CDE. When I tried to put the image on the
root by the command
xv -rmode 2 .Images/grass.gif&
a xv control window pops up. There is no picture appearing on the
background. But when I logout, I can see the picture for very short
time. This is not what I expect. It seems that the root hides behind
the background.
3.29) I'm looking for a way to configure my front panel (in particular, I
would like to remove the mail icon, or to replace its action by one
defined by me - what ever is easier to do ?
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. Bugs & Patches
6.1) Solaris(tm) versions: 2.6, 2.6_x86, 2.5.1, 2.5.1_x86, 2.5, 2.5_x86, 2.4
and 2.4_x86 running CDE if exploited, all these vulnerabilities could
lead to root access or allow arbitrary files to be overwritten.
*7. 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.
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.
Here is a short list of CDE versions with the various platforms :
Sun Solaris 2.6
CDE 1.2.1 + Motif 1.2.6 + X11R5
Sun Solaris 2.6 + Solaris Desktop Extensions (SDX):
CDE 1.2/1.3 + Motif 1.2.6 + X11R5
Sun Solaris 7 11/99:
CDE 1.3 + Motif 1.2.6 + Motif 2.1 + X11R6.4
Sun Solaris 8:
CDE 1.4 + Motif 1.2.6 + Motif 2.1 + X11R6.4
(All Sun versions of CDE are based on OSF/TOG CDE 1.0.10.)
HP-UX 10.20:
CDE 1.0 + Motif 1.2.6 + X11R5+ and X11R6+
HP-UX 11.00:
CDE 2.1 + Motif 2.1.0 + X11R6+
Gurus:
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.kfa-juelich.de/zam/docs/tki/tki_html/t0289/t0289cde.html
http://www.austin.ibm.com/cgi-bin/CDE/faqtop - AIX flavored FAQ
http://docs.hp.com
http://docs.hp.com/dynaweb/hpux11/dtdcen1a/
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.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://docs.sun.com/ab2/coll.8.40/@Ab2CollToc
http://docs.sun.com/ab2/coll.72.3/@Ab2CollToc
http://www.unix.digital.com
http://www.unix.digital.com/faqs/publications/pub_page/V40D_DOCS.HTM
http://www.openvms.digital.com/openvms/doc-sets/cde/index.html
have the necessary documentation for CDE under the HTLM and PDF format.
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.
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?
Note: this answer is for Sun Solaris only.
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.
A
+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... thanks
This works for me on Solaris and would probably look better with one of the
freeware X clocks:
An ugly, but readable digital clock can be displayed in the front panel via
this procedure:
1. Save the following text to a file called $(HOME)/types/clock.fp :
CONTROL Clock
{
TYPE client
CONTAINER_NAME Top
CONTAINER_TYPE BOX
CLIENT_NAME clock
CLIENT_GEOMETRY 132x60
LABEL Clock
}
2. Right-click on the background to bring up the Workspace menu. Choose
"Restart Workspace Manager" from the windows submenu.
3. From a terminal window run:
/usr/openwin/bin/clock -digital
(Make sure to choose "Save session" when logging out or you will have to
restart the clock on every login.)
end of 3.17 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
B
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
A
#include
#include
#include
#include
Widget shell;
static void SetWorkspaceCB(Widget w, XtPointer client_data, XtPointer call_data)
{
DtWsmSetCurrentWorkspace(shell,(Atom)client_data);
return;
} /* SetWorkspaceCB */
A
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
3.25) I'm having a problem in which that /etc/profile doesn't seem to be
read when login in on the CDE environment. I put a few environment
stuff in there (path and others) but nothing seems to be set. I know
about $HOME/.dtprofile and DTSOURCEPROFILE=true but that doesn't help
for /etc/profile. Is there as /etc/profile.dt that should exist or a
similar file for CDE?
Xsession can source a user's traditional HomeDir/.profile or .login script.
By default this capability is disabled. To tell the Xsession to source the
.profile or the .login script, we set the DTSOURCEPROFILE to true.
To change the DTSOURCEPROFILE for all users or other variables for all
users, create an /etc/dt/config/Xsession.d script that sets the new values.
For example create an executable ksh script, /etc/dt/config/Xsession.d/test
containing export MYVAR="value". This should work in place of
/etc/profile.
3.26) I am trying to find out if its possible to toggle between two different
actions in one space on the subpanel. For example if you had an option
on a subpanel that was titled "printer enable", as soon as you clicked
on that action the next time that subpanel is brought up it should read
"printer disable".
I know that by restarting the workspace manager the screen will get redrawn
but we can't use that. We need to have no interface with the user.
Here is the script. I have to admit its like I'm cheating but it works.
Basically you just have to find a unique difference in the window your
trying to capture then look for its id and take a capture on that id.
Here it is:
#! /bin/ksh
############################################################################
#
# This script will take a capture of the top most window on the desktop.
#
# The action will come from the users right click on the background of the
#
# common desktop environment (CDE).
############################################################################
set -x
touch /tmp/window.xwd
sleep 5
id=`/usr/openwin/bin/xlswins | grep : | /bin/tail -1 | /bin/awk '{print
$1}'`
xwd -id $id -out /tmp/window.xwd
sleep 3
xpr -output /tmp/window.gif /tmp/window.xwd
lp window.gif
rm /tmp/window.xwd
rm /tmp/window.gif
3.27) How do I disable the CDE front panel entirely.
for those who are feeling nostaligic for mwm or have no use for the cde front
panel, it's possible to disable the front panel entirely by setting :
Dtwm*useFrontPanel: false
in your .Xdefaults file.
3.28) I'm using Solaris 2.7 under CDE. When I tried to put the image on
the root by the command
xv -rmode 2 .Images/grass.gif&
a xv control window pops up. There is no picture appearing on the
background. But when I logout, I can see the picture for very short
time. This is not what I expect. It seems that the root hides behind
the background.
You need to set the backdrop to item NoBackdrop.
3.29) I'm looking for a way to configure my front panel (in particular, I
would like to remove the mail icon, or to replace its action by
one defined by me - what ever is easier to do ?
There is no direct way to delete a main control from the front panel. Simply
copying dtwm.fp to ~/.dt/types or ~/.dt/types/$LANG and modifying it there
does NOT work, at least not in 1.0. dtwm builds the front panel by reading
/usr/dt/appconfig/types/C/dtwm.fp and then applying incremental changes by
what it finds in ~/.dt/types.
To remove a control - say: Mail -, one has *create* an new file (in our
example: DelMail.fp) looking like this:
CONTROL Mail
{
CONTAINER_NAME Top
CONTAINER_TYPE BOX
DELETE True
}
To *replace* a control by an action that I created on my own, I used
the following method (I did not look for simpler ones, since this worked
fine):
(1) Using the right mouse button, create a subpanel.
(2) Put the action into the subpanel by dragging it from the file manager
to the open subpanel.
(3) Using the right mouse button on the open subpanel, select "copy to the main
panel".
Now we have the new action in the main control, the old one still in the
subpanel.
(4) Using the right mouse button on the old control in the open subpanel,
select "Delete".
Thank you to all who contributed with ideas!
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.
Ans: I received updated answer.
Answer A) : Always check (on a unix CDE host) /var/Xerrors for clues first.
Two possible reasons why CDE's dtlogin running on a non-DEC host
may cause DEC VXT 2000 series X stations to lock-up are:
1. Can't access needed fonts (unlikely to cause the grabbed
server to appear to lock-up).
2. Can't allocate colour map entries (can certainly cause the
grabbed server to appear to lock-up)
------------------------------------------------------------
The first section below discusses the DEC VXT 2000 X station.
The second section below discusses unix CDE host setup files
-------------------------------------------------------------
1a. dtlogin will request -dt-interface-* fonts. These aliases are
specific to CDE and may not be within the font sets currently
used by your DEC X stations. The -dt-interface-* aliases are
*not* among the font sets provided on the VXT 2000 InfoServer
(server-based) or host-based configurations.
On a CDE host, the simplest way to ensure any X terminal has
access to CDE-specific -dt-interface-* fonts is to serve these
aliased fonts-up to using the standard xfs font server daemon.
Users of X VXTs should then ensure they add the CDE host's
prior to starting a session (using XDMCP). To do this, use
the VXT Terminal Manager's pull-down: Customize->Font Path...
In the dialogue box under "Font Source" press the "Host"
radio button (TCP/IP will be selected automatically under
"Transport"). Enter the host ip or domain name. Note that
the VXT defaults to port 7000. Some xfs implementations
default to port 7100. Be sure to check and adjust the port
number appropriately in the dialoge box. "OK" and "Apply"
will save these settings.
Check that the VXT can access the CDE-specific font aliases
with the xlsfonts utility.
You can check correct operation of the host's font server
using the fslsfonts utility.
1b. The script files that run prior to the dtlogin widget on unix
CDE hosts is brain damaged. For example Solaris 2.7 contains
the following in its /usr/dt/config/Xsetup
# Since X server not local, we don't know if the desktop font
# directories exist on the X server machine, so we have to
# set them one at a time.
#
if [ -r $OPENWINHOME/lib/locale/$LANG/OWfontpath ]; then
ADDFONTPATH_REMOTE $OPENWINHOME/lib/locale/$LANG/OWfontpath
fi
$XDIR/xset fp+ /etc/dt/config/xfonts/C 1>/dev/null
$XDIR/xset fp+ /usr/dt/config/xfonts/C 1>/dev/null
The font path given in the 'xset fp' command is interpreted by
the X terminal. X terminals will likely not have an /usr/dt.
These commands (and the two following it in the script) are
brain damaged because the font paths are given as though the
X terminal is assumed to have access to the host's local file
paths.
You are advised to make a copy of the /usr/dt/config/Xsetup
file to /etc/dt/config, if you have not already done so, and
modify the /etc/dt/config/Xsetup to comment-out these brain-
damaged command attempts.
If you have a recent-ish CDE implementation, your Xsetup will
likely also end with the fragment:
#
# Append Font Server to tail of path.
# Will server any "-dt-" fonts not found on the remote machine.
#
if [ -x /usr/openwin/bin/fs ]; then
dom=`/usr/bin/domainname`
if [ ! -z "$dom" ]; then
dom=".`echo $dom | /usr/bin/cut -d. -f2-`"
fi
$XDIR/xset fp+ tcp/`/usr/bin/hostname`$dom:7100
fi
fi
This is supposed to work-out the fully qualified domain name
and tell the X terminal to point to an xfs font server running
on the CDE host.
The first caveat is that the NIS domain name may have little
or no relation to the internet domain name. Hence use of the
/usr/bin/domainname command will fail in many environments.
The second caveat is that the xfs font server port number is
hard-coded and must be validated against the configuration
file used by a running xfs on the host.
You are advised to copy the Xsetup file to /etc/dt/config,
comment-out the first four lines after the first 'if' statement
and change the line following that to read
$XDIR/xset fp+ tcp/this-host-fully-qualified-name:valid-xfs-port
There are further problems with the stock Xsetup file concerning
the manipulation of the X terminal's font path.
Firstly:
The Xsetup file blithely issues 'xset fp+' (or 'xset +fp')
commands without first checking the X terminal's current font
path. Prepending (+fp) and appending (fp+) font paths is
performed by the host getting the X terminal's existing and
then setting the font path with the new font path elements
pre- or ap-pended as appropriate. The manipulation of the
font path is performed by the host (the X client) and not the
X terminal (X server).
If the X terminal has no font path setup (and is relying on
built-in fonts alone), an attempt to 'xset +fp' or 'xset fp+'
will fail disastrously.
You simply cannot add the host's xfs font server reliably to
the X terminal's font path with the use of
'xset fp+ tcp/host:port'
Xsetup should never issue +fp or fp+ without first establishing
that at least one element exists in the X terminal's font
path. (Fixing Xsetup is beyond the scope of this FAQ).
Secondly:
The fragment which appears earlier in Xsetup :
#
# Reset Xserver font path to its default values
#
$XDIR/xset fp default
is extremely ill-advised. DEC VXT 2000 X stations in common
with other X terminals and PC X servers will EMPTY its font
path in response to 'xset fp default'.
If you are having trouble with DEC VXT or other X servers not
finding fonts which, prior to connecting, you believed that the
X server had access to, then this is the likely culprit.
The effect of 'xset fp default' is implementation dependent.
You are strongly advised to comment-out this command in your
/etc/dt/config (on unix hosts) copy of the Xsetup script.
2. CDE is rather greedy of colour map space. Once a session
starts, Dtsession*colorUse can tailor this on an individual
basis. However, because your dtlogin window may already
allocate many colour map entries, subsequent attempts to
limit the greediness of CDE on a per-user basis may be
ineffective.
In some cases, the X server -- particularly 8-bit colour
servers like the VXT 2000 -- will be unable to allocate
colour map entries. While this is reported to the X client
(and _may_ appear in (on unix CDE hosts) your /var/Xerrors
file) CDE's login procedure will still try and display
the dtlogin widget. As the server has already reported that
it cannot display dtlogin, the net result will be the CDE
hour glass, a blacken-ed background the non-appearance of
the dtlogin window accompanied by a locked-up server.
If you are able to, reduce the number of colours on the dtlogin
window. You can achieve this by not cautious use of any of
your vendor's or your own substituted logo graphics, and
secondly by limiting dtlogin's default insistence on setting
many colours. (The Dtlogin*background, Dtlogin*foreground
and corresponding Dtlogin*greeting and Dt*logo colour
specifications can be found in, for example (on unix)
/usr/dt/app-defaults/C/Dtlogin and /usr/dt/config/C/Xresources.
If you are unable to make these changes to the host, then
you can try to 'trick' your X server to pre-allocate
writeable colour map entries. Running another application
such as Adobe's pdf Acrobat reader 'acroread' (V 3.0 or
higher), may then allow you to start an XDMCP session with
a non-DEC CDE host. This has been tried and works successfully
with CDE on Suns running Solaris 2.7 from DEC VXT 2000 and DEC
VXT 2000+ running VXT 2.1K DECwindows software.
-----------------------------------------------------------------------
Answer B)
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. Bugs and Patches
6.1) Solaris(tm) versions: 2.6, 2.6_x86, 2.5.1, 2.5.1_x86, 2.5, 2.5_x86, 2.4
and 2.4_x86 running CDE if exploited, all these vulnerabilities could
lead to root access or allow arbitrary files to be overwritten.
Apply the following patches :
CDE Version Patch ID
___________ _________
1.3 107022-01
1.3_x86 107023-01
1.2 105566-06
1.2_x86 105567-07
1.0.2 103670-06
1.0.2_x86 103717-06
1.0.1 103671-06
1.0.1_x86 103718-06
7. 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
Steven Burnett: sburnett@webslingerz.com
and many more...
Aditya Talwar and Vivek Arora: cosc4hf@bayou.uh.edu
Common Desktop Environment FAQ
This is the WWW version of the Common Desktop Environment FAQ - the FAQ for
the newsgroups comp.unix.cde. All Comments, Updates to the FAQ or the hosting
site should be sent to Aditya Talwar and Vivek Arora.
The ASCII textfile of this FAQ may also be downloaded directly.
This FAQ's storage is hosted by pimpworks.org : webmaster@pimpworks.org