Frequently Asked Questions about Ce/ceterm

  1. How do I display all the colors and fonts on my system, so I can see what combinations I like?
     
  2. In .Xdefaults files I see a few instances using Ce*font instead of ce.font. What's the difference?
     
  3. My 2.3.1 manual for Ce explains that Ce.font covers both ce and cv while ceterm.font covers only ceterms. I assume that this didn't change at 2.4
     
  4. I find the following other ceterm window specifiers in .Xdefaults files. What do they all mean?
    Ceterm.fontlist
    ceterm.font
    Cv.font <-- CV window
     
  5. If you have different fonts for CV and CE windows will it change dynamically if you switch a CV window to a CE window?
     
  6. I use the tcsh shell. When I bring up a ceterm, everything I type in the Unix window appears as dots. How can I stop this behavior?
     
  7. I use the ksh shell. When I bring up a ceterm, everything I type in the Unix window appears as dots. How can I stop this behavior?
     
  8. My node has entered a state where all my ce and ceterm's stop responding to keyboard and mouse click input. What happened?
     
  9. I am using an HP workstation and want to create key definitions to be used when the alt key is held down. Why does this not work as expected?
     
  10. What are the recommended settings in .Xdefaults when using HP/VUE?
     
  11. I tried using the wdc commands, why are all my windows the same color?
     
  12. I have just installed Ce and get the message "Can't unlock pty /dev/ptym/ptyxx (Not owner)" when I try to start ceterm. What needs to be done to fix this?
     
  13. I get the message "afs: byte-range lock/unlock ignored; make sure no one else is running this program." when I start ce. What does this mean?
     
  14. Is there a way to attach a spelling checker to Ce?
     
  15. I am trying to debug a key definition I wrote, is there any help available?

  16. The Ce scroll bars can be slid behind the bottom or right arrows. Why?
     
  17. Is there any way to get to the HTML documentation from the ce help pulldown?
     
  18. I was using Ce from home via a PPP connection and the connection dropped. I looked for a .CRA (crash) file and found none. What to I do?
     
  19. The system administrator moved Ce to another location and now my .kshrc file does not get run when I bring up a Ceterm. What is wrong?
     
  20. When I log out and log back into into a Linux system using Gnome, all the ce and ceterm windows do not restart. What is wrong?
     

1. How do I display all the colors and fonts on my system, so I can see what combinations I like?

/usr/openwin/bin/xview/xlsfonts | ce   # Will show you the list of system 
cat /usr/openwin/lib/rgb.txt    | ce   # fonts and colors

The following key definitions can be used to click on font names and colors and see them
kd ^F1 tl;dr;tr;xc  -l font;tdm;tl;xd  -l junk;es 'fl ';xp  font;tr;en ke 
kd ^F2 [,14]dr;tr;xc  -l color;tdm;tl;xd  -l junk;es 'fgc ';xp  color;tr;en ke 
kd ^F3 [,14]dr;tr;xc  -l color;tdm;tl;xd  -l junk;es 'bgc ';xp  color;tr;en ke 

2. In .Xdefaults files I see a few instances using Ce*font instead of ce.font. What's the difference?

For Ce there is no difference. For Motif applications which use widgets, resource names can be complex. For example: abc.outerwidget.inner_widget.font: 6x13 The star is a wild card. If you wanted to change all the fonts in all the widgets used by abc, you could specify abc*font. Note that * has a lower precedence than . and thus a name with dots will override a name with stars. Ce only has one level of resource specification, so dot and star are equivalent. If both are specified, the dot will be used.

3. My 2.3.1 manual for CE Term explains that Ce.font covers both ce and cv while ce.font covers only ce terms. I assume that this didn't change at 2.4

This did not change. Note that Ce.font covers ce, cv, and ceterm. X resources are looked up with a pair of names as the first qualifier in the resource name. These are the program name and the class name. By convention, the class name is the program name with the first character capitalized. Program name resources take precedence over class name resources. For Ce, we chose to always use the class name of Ce regardless of whether ce, cv, or ceterm was being called. Thus you could code:

Ce.font : 8x15
ce.font : 6x13

For ceterm and cv, the 8x15 font would be picked up. For ce, the program name would take precedence so the 6x13 font would be used. If you aliased ce to some other name such as pogo with a soft link, you could code pogo.font : 10x20 and when you ran the pogo command, you would run ce and use the 10x20 font. You could also get to the pogo resource by specifying -name pogo as an argument to ce.

4. I find the following other ceterm window specifiers in .Xdefaults files. What do they all mean?
Ceterm.fontlist
ceterm.font
Cv.font <-- CV window

All the above syntaxes would be loaded into the resource database. Ceterm and Cv are not used as class names by Ce. Ce does not have a fontlist resource so the first line is wrong twice. The ceterm.font resource will affect ceterms. Basically all the above lines are loaded into the resource database, but the Ceterm and Cv keys are never queried and thus have no effect.

5. If you have different fonts for CV and CE windows will it change dynamically if you switch a CV window to a CE window?

No. The font resource is read in when the program is started. You can change it on the fly with the fl (font load) command, but toggling read-write/read-only mode will not affect the font.

6. I use the tcsh shell. When I bring up a ceterm, everything I type in the Unix window appears as dots. How can I stop this behavior?

In your .tcshrc file, include the commands:

unset edit
stty nl

Sometimes, stty nl will mess up the processing of password prompts in ftp and telent. If you encounter this situation, you may want to use the xresource dotmode to adjust how ceterm decides it is processing a password.

7. I use the ksh shell. When I bring up a ceterm, everything I type in the Unix window appears as dots. How can I stop this behavior?

In your .kshrc file, include the commands:

set +o vi
set +o viraw
set +o emacs

Note that only some versions of ksh recognize the emacs keyword.

8. My node has entered a state where all my ce and ceterm's stop responding to keyboard and mouse click input. What happened?

Check the portion of your keyboard by the numeric pad. See if the green light is on on the NumLock key. If so press the key to turn the light off. On the default Sun keyboard, the NumLock key turns on X modfier bit "mod3" and leaves it on. In Ce keydef notation this is the '=' prefix. As in "kd =F2 pb ke". As you do not have any keys defined with the = prefix, the keys all do nothing. You could define a complete set of keys definitions with the '=' prefix and thus be able to shift your whole keyboard. You an also use the xmodmap command to disable the NumLock key. Put the line:

xmodmap -e "remove mod3 = Num_Lock" 2>/dev/console

in your ~/.dtprofile (Sun CDE), ~/.openwin-init (Sun Openwindows), ~/.vueprofile (HP/UX), or .xinitrc (Other X environments). This disables NumLock as a modifier key. It also frees it up as an additional key which you could put key definitions under.

9. I am using an HP workstation and want to create key definitions to be used when the alt key is held down. Why does this not work as expected?

There are many different keyboards and even within a keyboard, the keys can be mapped differently. The keymaps for Europe are really different than the keymaps for the U.S.A. HP is currently shipping two main keyboards. One is the older style which has the line delete key in it. The default .Cekeys shipped for HP's use this keyboard. The other keyboard looks like a PC keyboard. On both keyboards, the keymap usually has special keysyms mapped to the Alt modification of the key press. For example, the Alt-h key usually maps to the Japanese Yen symbol. Thus while on an IBM RS6000, you would use *h to define 'h' with the Alt key pressed down, on an HP you would use *yen.

To investigate keyboards, we provide a command called kk. When kk is executed, the next keystroke is not interpreted. Instead the key name of the key is displayed. If you stack two of them as in kk;kk, the next two keys will be displayed. This is useful for looking at the alt(meta) versions of keys. You execute the double kk (can be put under a key) and then press Alt-h. As the alt key is pressed you will see Meta-l or some such appear in the window. While still holding the alt key down you press the h key and you will see that the keysym is '*yen'. The star is for the alt. 10.

What are the recommended settings in .Xdefaults when using HP/VUE?

Recommended tailoring for HP/VUE is as follows:

Ce.findbrdr: 2
Ce.dfltPasteBuf: PRIMARY
Ce.scroll : no

Setting the findbrdr resource sets the find border. Thus if you do a find, Ce will position the window so that two lines are shown above the line found. Thus you get to see the line in context.

Setting the dfltPasteBuf sets the name of the default (unnamed) paste buffer. HP/VUE applications tend to use primary as the main paste buffer. Using the above setting makes cutting and pasting between Ce and other X applications easier.

The scroll resource determines how ceterm scrolls lines on the screen. In scroll on mode, ceterm emulates the Apollo's and redraws the screen as each line appears. In scroll off mode, if a bunch of lines arrive from the shell together, ceterm displays them all at once.

If you want to scroll through colors set up with the ce 'wdc' command in your .Cekeys file, use X defaults:

11. I tried using the wdc commands, why are all my windows the same color?

Many times *.foreground and *.background are set in the X environment. Ce will pick these resources up and use them if they are available. This overrides the colors listed in the wdc commands. To avoid this, put the following in your .Xdefaults file:

Ce.foreground :
Ce.background :

#sample wdf and wdc commands from the .Cekeys file:

wdc 1 cornsilk3 navy
wdc 2 lightblue black
wdc 3 white black
wdc 4 brown wheat
wdc 5 midnightblue wheat
wdc 6 '#6F4EB7' white
wdc 7 '#4B006000E200' white

12. I have just installed Ce and get the message "Can't unlock pty /dev/ptym/ptyxx (Not owner)" when I try to start ceterm. What needs to be done to fix this?

The highest probability is that Ce on the HP does not have the setuid bit set to root:

As root:
chown root ce
chmod 4755 ce

Machines other than SunOS and Apollo have to be setuid'ed to root (as does xterm) because you have to be root to open a pseudo terminal. Pseudo terminals (also called line disciplines) are the piece of the system which sits between a shell and the program or piece of hardware which displays the output from the shell and turns things like ^c into an interrupt.

When Ce starts, it checks to see if it is a ceterm. If not, it drops the setuid immediately. If it is ceterm, it drops the setuid as soon as the pseudo terminal is opened.

If ceterm is being accessed across an NFS mount point, the mount must be checked to make sure that setuid programs operate across the mount point. This is an NFS option.

13. I get the message "afs: byte-range lock/unlock ignored; make sure no one else is running this program." when I start ce. What does this mean?

Unlike local files and most versions of NFS, AFS (Andrew File System from Transarc) does not support file locking via the UNIX System 5 lockf call. When a program issues the call, the AFS software writes the above message to the console log.

File locking can be disabled from the command line with the -lockf option. More commonly it would be disabled through the X resource:
Ce.lockf : N
At some sites, the application defaults for Ce are set to disable file locking. If the application defaults for Ce are accessed across the network and a network partition occurs, you may get this message. You can use this resource in your .Xdefaults file to locally control file locking. Note that AGCS application defaults for Ce have file locking turned off.

14. Is there a way to attach a spelling checker to Ce?

The ispell program has been successfully integrated with Ce. As of this writing (4/4/97) you can find ispell at UCLA ispell. You can also try anonymous ftp from ftp.cs.ucla.edu (131.179.240.10) or ftp.math.orst.edu (128.193.80.161), in the pub directory. Look for names starting with ispell to find the current version. Install ispell.

There are two ways to add the interactive spell checker to the ce editor.

There are two types of Regular Expressions used with Ce. One is Aegis Regular Expressions and the other is Standard Unix Regular Expressions. To determine which one you use for your ce environment issue the 're' command in the ce 'Command:' input area. Then copy the appropriate definitions to your .Cekeys file and run ce -reload. Depending upon where you put ispell, you may have to adjust the path name to ispell.

#
#  This key definition works for both Aegis and Unix Regular Expressions
#  Make <Control>-s invoke the ispell program
kd ^s  pw;pn;tdmo;tl;dr;tr;xc -l file;tdm;tl;xd -l junk;icon -i;es'cpo -w "xterm -e /usr/local/bin/ispell ';xp file;tr;es'"';en;tmw;1,$xd -l junk;xd -l junk;tdm;es'xp -f ';xp file;tr;en;cpo "xdmc icon"  ke
#
# This defines an alias first and then the key definition
# This method allows the user the option of executing the command
# from the command line and using a key definition
#
#  Make <Control>-s invoke the ispell program
alias ispellx  ro -off;pw;pn;tdmo;tl;dr;tr;xc -l file;tdm;tl;xd -l junk;icon -i;es'cpo -w "xterm -e /usr/local/bin/ispell ';xp file;tr;es'"';en;tmw;1,$xd -l junk;xd -l junk;tdm;es'xp -f ';xp file;tr;en;cpo "xdmc icon"  ke
kd ^s  ispellx  ke
#
# This option uses a ceterm window rather than an xterm window
# Once again we define an alias first then use the alias as part of the key definition
# For Unix Regular expression parsers
alias ispell  ro -off;pw;pn;tdmo;tl;dr;tr;xc -l file;tdm;tl;xd -l junk;icon -i;es'cpo -w "ceterm -geo c80x24 -autoclose y -vt on -w  \\\'/usr/local/bin/ispell ';xp file;tr;es'\\\'"';en;tmw;1,$xd -l junk;xd -l junk;tdm;es'xp -f ';xp file;tr;en;cpo "xdmc icon" ke
# Make <diamond key>-s run the ispell alias on the ce file you are editing.
# Use either 
kd `s  ispell ke
#
# For Aegis Regular expression parsers
alias ispell  ro -off;pw;pn;tdmo;tl;dr;tr;xc -l file;tdm;tl;xd -l junk;icon -i;es'cpo -w "ceterm -geo c80x24 -autoclose y -vt on -w  @@'/usr/local/bin/ispell ';xp file;tr;es'@@'"';en;tmw;1,$xd -l junk;xd -l junk;tdm;es'xp -f ';xp file;tr;en;cpo "xdmc icon" ke
# Make <diamond key>-s run the ispell alias on the ce file you are editing.
# Use either 
kd `s  ispell ke
#
#
# These definition are for use with the release 2.5 of Ce and beyond.
#
# Make <Control key>-s invoke the ispell program on the ce file you are editing.
kd ^s  pw;pn;tdmo;tl;dr;tr;xc -l file;tdm;tl;xd -l junk;icon -i;(1050,550);es'cpo -w "xterm -e /usr/local/bin/ispell ';xp file;tr;es'"';tr;en;tmw;1,$xd -l junk;xd -l junk;tdm;es'xp -f ';tr;xp file;tr;en;icon -w ke
#
# OR you can
#
# create an alias first 
alias ispellx  ro -off;pw;pn;tdmo;tl;dr;tr;xc -l file;tdm;tl;xd -l junk;icon -i;es'cpo -w "xterm -e /usr/local/bin/ispell ';xp file;tr;es'"';en;tmw;1,$xd -l junk;xd -l junk;tdm;es'xp -f ';xp file;tr;en;icon -w ke
# Make <diamond key>-s run the ispell alias on the ce file you are editing.
kd `s  ispellx ke

15. I am trying to debug a key definition I wrote, is there any help available?

Since release 2.4.2, Ce has been shipped (except on the Apollo platform) with the undocumented debug command enabled. The command is undocumented because it generates internal messages, most of which are only useful to the authors of Ce. Thus it is not possible to document the command. There is one option under debug which is of general use. This is the option which traces command parsing and execution. Tracing information is written to file stderr in the ce process. Thus to see the output, you must start ce from a ceterm so that stderr will appear in the ceterm window.

To activate command tracing in an existing window, execute the following command at the 'Command:' prompt:
debug @4

To deactivate command tracing, execute
debug 0

To trace the loading of your .Cekeys file, execute the following at the UNIX command prompt:
CEDEBUG=@4 ce -reload

Note that on an HP/UX box, @ is often the kill to end of line character. You may have to escape the @ or change your tty settings.

Note that the contents of the debugging messages may change from release to release. You can send command tracing to a file with debug @4>/tmp/file. The @4 represents a bit in the debugging mask. Turning on other bits may produce voluminous output or change the way Ce behaves. If you turn them on ... You get what you get.

16. The Ce scroll bars can be slid behind the bottom or right arrows. Why?

The behavior you see is intentional. In Ce, as opposed to other editors, you can scroll vertically past the point where the last line on the screen is the last line. You can scroll up till the last line in the file is the first line on the screen. To represent this required that we extend the normal behavior of the scroll bar. Since the slider represents the viewable portion of the file and the gutter represents the file, the viewable portion of the file can extend past the bottom of the file.

The horizontal scroll bar follows the same logic but is slightly more complicated. Ce supports scrolling sideways past the right side of the longest line. Again this requires an extension of scroll bar behavior. To get reasonable horizontal scroll bar behavior, the slider is drawn as if the the longest line in the window is the length of longest line or the value from an arbitrary X resource (default 256 chars) called Ce.scrollBarWidth. See the help on X resource for more information.

17. Is there any way to get to the HTML documentation from the ce help pulldown?

Yes. This is not supplied as a default pulldown because the name and location and options to web browse varies greatly. The authors site uses a wrapper around Netscape which allows a URL as a positional argument. Thus the ce menu item command becomes:

mi Help/6 "HTML doc"cps netscape http://hydrogen:8080/projects/ce/html/ ke

The base Netscape product also has command line options which allow specification of a starting page.

18. I was using Ce from home via a PPP connection and the connection dropped. I looked for a .CRA (crash) file and found none. What to I do?

It has been observed that when a PPP connection is dropped, many PPP servers do not break off TCP/IP connections. This includes the connection to the X display on the machine at home. From Ce's point of view, it is sitting waiting for the next keystroke. To save your data: telnet to the server you were logged onto from home and run 'ps -ef | grep <your_user_id>'. This will find any processes you have running on that server (use 'ps -aux' on BSD machines). You should see the ce process which is editing your file. Execute a normal kill 'kill <pid>', where <pid> is replaced by the process id of the ce edit session taken from the process table line. Ce will create a crash file according to the rules in the backup concepts help. If the Ce process is not there and you are looking at the correct server, check your home directory, /usr/tmp/Ce_CRASH, and /tmp/Ce_CRASH for the crash file as outlined in the backup concepts help.

19. The system administrator moved Ce to another location and now my .kshrc file does not get run when I bring up a Ceterm. What is wrong?

The running of a .kshrc file from the Korn Shell (ksh) requires that the environment variable ENV be set and exported and have as its value the full path to the .kshrc file (/home/auser/.kshrc). It is also required that the real and effective userid's and group id's for the program be the same. On most platforms, ceterm must be setuid'ed to root in order to open a pseudo-terminal and communicate with the shell. After opening the pseudo-terminal, ceterm drops the setuid. If the system administrator set the group id bit (chmod 6755 ce) instead of just the user id bit (chmod 4755 ce), the .kshrc file will not be run.
 

20. When I log out and log back into into a Linux system using Gnome, all the ce and ceterm windows do not restart. What is wrong?

Gnome bug 341286 describes this problem as a bug in newer releases of gnome. Hopefully this will go away on it's own. KDE and other window managers do not suffer from this problem.
 
One somewhat cumbersome workaround is to create extra directories for ceterm copies. For example:
mkdir /usr/local/bin/ceterm1
mkdir /usr/local/bin/ceterm2
mkdir /usr/local/bin/ceterm3
mkdir /usr/local/bin/ceterm4
Then, assuming ce is in /usr/bin:
ln -s /usr/bin/ce /usr/local/bin/ceterm1/ceterm
ln -s /usr/bin/ce /usr/local/bin/ceterm2/ceterm
ln -s /usr/bin/ce /usr/local/bin/ceterm3/ceterm
ln -s /usr/bin/ce /usr/local/bin/ceterm4/ceterm
ln -s /usr/bin/ce /usr/local/bin/ceterm1/ce
ln -s /usr/bin/ce /usr/local/bin/ceterm2/ce
ln -s /usr/bin/ce /usr/local/bin/ceterm3/ce
ln -s /usr/bin/ce /usr/local/bin/ceterm4/ce
ln -s /usr/bin/ce /usr/local/bin/ceterm1/cv
ln -s /usr/bin/ce /usr/local/bin/ceterm2/cv
ln -s /usr/bin/ce /usr/local/bin/ceterm3/cv
ln -s /usr/bin/ce /usr/local/bin/ceterm4/cv
When setting up the session you want to save, use the other ceterms. Gnome will then start each one. You need to set up the ce and cv links or using the help key will hang.
 


Support/Technical/Howto questions? Send E-Mail to stymarAtcoxDotnet (At and Dot spelled out to reduce spam) or call 623-582-7323
Page last updated, 03/19/2007