MFCF/CSCF FAQ: Customization of your environment (UNIX and X)

[Main index] [Index by keyword] [New and updated items]


If you find out-dated, inaccurate or confusing items or you think that something should be added in this file, please send e-mail to consultant@math.uwaterloo.ca.

  1. Setting Up Finger Information
  2. Changing Default Unix Shell
  3. Shell Can't Find Command
  4. Customizing "twm" window manager
  5. Command History (UNIX)
  6. Wrecked .login and .cshrc Files
  7. X-Session and Window Managers
  8. Wrecked .xsession File
  9. CDE (Common Desktop Environment)
  10. X-Windows Tutorial
  11. Setting the display
  12. Adding New Fonts on X-Terminal
  13. Cannot Open Display - Not Authorized to Connect to Server


1. Setting Up Finger Information

How do I set up my account so that "finger myuserid" shows my current finger information i.e. my name, home address and phone number, etc.?

Use the command chfn at the prompt. It will start an interactive session and will ask you to enter the relevant information.

Appears in other topics:

[^] Back to top

Last updated 1998-07-13 by kdaudjee
accounts/finger.faq


2. Changing Default Unix Shell

I would like to be able to change my default login shell

To change your default shell execute the following:

chsh
You will be prompted to enter a new shell. At the prompt, enter the following:
/xhbin/tcsh

OR

/xhbin/bash

For the changes to take effect, you will need to logout and login again.

Appears in other topics:

[^] Back to top

Last updated 2005-09-26 by rmblanco
shells/shell_change_default.faq


3. Shell Can't Find Command

Help! When I log in to my unix account, I can't run (submit, or some other command)!

If your unix account responds with ___:command not found when you ask it to run something you are sure it should be able to find, you may have a problem with your .cshrc file (this holds some of the initial settings for your account). You can reset it to the default, but you will have to recreate any changes you have made to it. See the question below for more details.

See also:

Appears in other topics:

[^] Back to top

Last updated 2000-02-18 by AF
shells/shell_cnf.faq


4. Customizing "twm" window manager

The FAQ for Unix Computer environment mentions that .xsession file can be changed to run different window managers. I'm interested in running a window manager like twm that supports colors in it. Any suggestions how I can do this on the undergrad computing environment ?

TWM is the window manager you get by default. If you are not already getting twm, it could be that you have the start-up file (.rc file) for some other window manager such as mwm or awm. Move that file (.mwmrc, .awmrc or whatever) aside and the system will start twm for you when it sees that you have no other window manager's start-up file present.

Then to get colour, you need to make a personal copy of the standard .twmrc file. To find out where to get this standard twmrc file, look in your .xsession file. If it's the standard one, it refers to a global xsession file. Look in there and you'll find the path of the standard twmrc file. Note, however, that this path only works on X11 console servers (also called front-end machines), and not on CPU servers. Copy that to your personal .twmrc. E.g.

    cp /software/x11-mfcfenv/config/twmrc ~/.twmrc

Now add a section near the top of it to set your colour definitions. You'll see the place where the monochrome definitions are currently set. See "man twm" for details about the syntax of this file and the colour definitions.

Appears in other topics:

[^] Back to top

Created by KKB
Last updated 2004-11-24 by am2stewa
shells/shell_custom.faq


5. Command History (UNIX)

I would like to be able to see previously executed commands by pressing the up-arrow key, and to complete commands with a tab key.

You need to change your default shell as specified in Changing Default Unix Shell ; For the changes to take effect, you will need to logout and login again.

But my up arrow still doesn't work!

or, alternatively, up arrow works but cursor keys don't work as expected. Or, perhaps, command history seems to work but commands don't come out as expected.

bindkey could be set incorrectly. Look in your .cshrc file, and change any calls to "bindkey -e" to "bindkey -v" (or vice versa).

See also:

Appears in other topics:

[^] Back to top

Last updated 2004-07-20 by mpatters
shells/shell_history.faq


6. Wrecked .login and .cshrc Files

I modified my .cshrc and .login files and now my shell is behaving strangely! Help!

You need to restore a working version of these files, which can be accomplished in two ways:

If your PATH environment variable is still set properly (your shell can still find commands), you can perform an init_home command which backups your current .cshrc, .login and .logout files and copies the system defaults of these files into your account. You can then update these to your current settings with any errors hopefully fixed.

If your PATH is currently messed up, then you'll have to type the full pathname of the command. That can be found by /bin/showpath f=init_home standard

See also:

Appears in other topics:

[^] Back to top

Last updated 1999-02-21 by CBF
shells/shell_wrecked.faq


7. X-Session and Window Managers

What window manager am I running? My friend is using the ?? window manager, I want to use it as well.

The default window manager for the math student UNIX environment is twm (Tab Window Manager).

Some other window manages are:

To specify which window manager to run, you will need to modify your $HOME/.xsession file [Warning: Errors in your $HOME/.xsession file can prevent you from starting an X-session. Know what you are doing.]

Appears in other topics:

[^] Back to top

Last updated 1998-10-14 by JT
shells/wm_choose.faq


8. Wrecked .xsession File

I modified my .xsession file and wrecked it! Help!

Simply remove or rename the existing .xsession, log out, log back in. A new default one will be created automatically.

Appears in other topics:

[^] Back to top

Last updated 1997-05-09 by IB
shells/xsession_wrecked.faq


9. CDE (Common Desktop Environment)

What's this CDE thing and how do I use it?

CDE, the Common Desktop Environment, is yet another windowing environment. It is offered in the Math Research collection of machines starting in March, 2001. The OpenWindows environment becomes available at the same time. Here are some tips about using CDE, and explanations for common problems.

  1. Do I have to use CDE? Or OpenWindows?
  2. What machines offer CDE?
  3. How do I switch to CDE, or switch back?
  4. What do I do about font problems?
  5. How do I make dtmail send mail?

  1. Do I have to use CDE? Or OpenWindows?
  2. No. They are options you may choose. You can continue to use the older simpler environment that MFCF has been providing all along. The advantage to the MFCF environment is that it is simpler, and is supported here. But it is not very flashy. The advantage to OpenWindows is that if you are accustomed to older Sun machines, OpenWindows will be more familiar to you. The disadvantages to OpenWindows are that it works best with a Sun-style keyboard (which is available for NCD X terminals), and that MFCF doesn't provide much consultation about how it works. The advantage to CDE is that it is becoming popular and offers a more modern, flashy, graphical look. The disadvantage is that MFCF doesn't (yet) provide much consultation about how it works. It also seems to put more of a load on the host computers.

  3. What machines offer CDE?
  4. CDE comes with recent versions of Solaris. In the Math region of machines, the login hosts that run Solaris are hopper.math, fe101.math, and fe02.math, and those three hosts now offer CDE. (Machines belonging to various research groups as well as some personal workstations also run recent versions of Solaris and may be set up to offer CDE.)

  5. How do I switch to CDE, or switch back?
  6. Starting at the login screen, i.e. the one that says "Welcome to remote host hostname" with a Sun Microsystems logo, all over a black background, do the following before giving your userid and password:

    1. Click and hold on the Options menu button,
    2. slide down to open the Session menu,
    3. then slide across to choose CDE, OpenWindows, or the basic MFCF environment that you have been using all along. The logo changes accordingly.

    Now log in as usual.

  7. What do I do about font problems?
  8. You may find that when you start a dtterm window (dtterm is CDE's equivalent of xterm), the fonts are all stretched out with wide spacing in between. CDE expects a set of its own special fonts to be available, but your X terminal doesn't know about them. We have tried to make all the X terminals know about them automatically but we may have missed some. Run the command "xwantfonts cde/F3bitmaps" and try it again. Notify ncd-maintainer@math that your terminal is missing these fonts so we can fix it.

    If you still have this dtterm font problem or some other strange font problem with applications that cannot be displayed properly, send mail to ncd-maintainer@math to report it. Your X terminal probably needs to be reconfigured to run a newer version of its software that understands the font format (namely PCF) of CDE's special fonts. This may require adding more memory to your X terminal.

  9. How do I make dtmail send mail?
  10. If you use dtmail, you'll discover that it does not send your message when you click on the Send button. (We encourage the use of more generic mail tools such as mail, pine, elm, but if you really want to use CDE's dtmail, you can.) Dtmail needs special configuration in order to be able to send mail. That's because it tries to use a special protocol to talk to the sendmail service, but we don't run Sun's customized sendmail service, we run a more secure Waterloo-customized sendmail service. So, to make dtmail stop trying to talk to sendmail in that specialized way, put the following line in your .mailrc file in your home directory:

    set smtpmailserver='mail.math.uwaterloo.ca'

    (Note that this specifies the location of the Math mail service, not a mail address for users. In other words, don't start addressing email to userid@mail.math. Continue to use an address like userid@math.)

Appears in other topics:

[^] Back to top

Last updated 2001-03-12 by rblanders
xwin/cde.faq


10. X-Windows Tutorial

Need some basic information on X-Windows? Interested in reading some introductory material on X-Windows?

The online INTRODUCTION TO X AND UNIX TUTORIAL is a good starting point for obtaining such information.

Appears in other topics:

[^] Back to top

Last updated 2006-03-15 by d3wilkin
xwin/tutorial.faq


11. Setting the display

I keep getting the error:
	Error: Can't Open display
    

This error often happens because the X-terminal window in which you are executing the failing command does not have the DISPLAY environment set.

Most MFCF machines run locally-modified software which ensures that the DISPLAY environment is exported between machines properly when one uses rlogin to start a remote session. This doesn't always work, however.

Sometimes you will get a hint that this has failed as the machine login session in question gives diagnostics like the following:

           esize: unknown character, exiting.
           `/.software/local/.admin/bins/bin/xdisplay -D`: No match
    
following the usual "message-of-the-day".

It is an easy problem to remedy. Go to one of the other shells which works (i.e. where you can run X applications no problem). Usually the "console" login window (usually in the bottom left corner) is guaranteed to be set up properly.

In that window, type

            echo $DISPLAY
    
and the response will be the name of the display, which is the name of the X terminal with a suffix, usually ":0".

In the window with the remote session running in it (i.e. the one that doesn't run X applications correctly) type

            setenv DISPLAY xxx
    
where xxx is the name of the display, as revealed above.

For example,

            setenv DISPLAY landen120.math.uwaterloo.ca:0
    

If you try to run an X application now and you get a permission problem, check the following section entitled Cannot Open Display - Not Authorized to Connect to Server .

See also:

Appears in other topics:

[^] Back to top

Last updated 2002-10-08 by arpepper
xwin/xterm_display.faq


12. Adding New Fonts on X-Terminal

I got some special fonts, and made a fonts.dir file using mkfontdir, and added the directory to my font path using xset, but my terminal still can't use the fonts. Why?

X-terminals load fonts using tftp. For security reasons, we restrict the set of places that tftp is able to access. Users' home directories are not accessible by tftp. Until there is a way to allow more localized control over font availability, you must request that we add your fonts to the central collection. One way to do this is to submit a work request providing the name of needed fonts, and where they can be obtained.

Appears in other topics:

[^] Back to top

Last updated 1999-07-08 by cmroth
xwin/xterm_fonts.faq


13. Cannot Open Display - Not Authorized to Connect to Server

I keep getting the error:
      Xlib:  connection to "glenlivet.mfcf.uwaterloo.ca:0.0" refused by server
      Xlib:  Client is not authorized to connect to Server
      X11 Toolkit Error : Can't open display: glenlivet.mfcf.uwaterloo.ca:0.0
      Bailing out!
    

Okay, there are two answers to this. The recommended way is to use the Xauthority mechanism. This requires that you have Xauthority available on both ends of the system (this is true for all MFCF machines). Let us assume that you are trying to run a program on bacon.math, but you logged onto beta.math.

To see if you have Xauthority, try running the command:

      xauth nextract - $DISPLAY
    
which should print something that looks like:
      0000 0004 8161d81d 0001 30 0012 4d49542d4d414749432d434f4f4b49452d31
      0010 39325a 797659693251354d4b57567045
    

This is what is known as a "cookie". Any program that wants access to your Xterminal must have this "cookie". To get it over to the other "remote" machine (in this case bacon.math), you run the following on the "local" machine (in this case beta.math):

      xauthdist bacon.math
    
or if your userid on the remote machine is different:
      xauthdist -l myotheruserid bacon.math
    

The xauthdist command is a convenient wrapper for the following which you can use if xauthdist is not available:

      xauth extract - $DISPLAY | rsh bacon.math xauth merge -

                                     ^---- or whatever machine
    
or
      xauth extract - $DISPLAY | rsh math -l eadengle xauth merge -

                                             ^----- for when your account
                                                    name is different
    

In order for this to work, you must have remote privileges to your bacon.math account from beta.math. So, on bacon.math, if you have the file ~/.rhosts, make sure it has the line

      beta.math.uwaterloo.ca eadengle
    
This also means that you will not have to retype your password when you do an rlogin. (Substitute your own userid instead of the example "eadengle".)

This will "extract" the cookie from your beta.math account, and "merge" it with the other cookies you have over on bacon.math. Now, any program that you run on bacon.math in your account will have access to your display, and nobody else will.

If you Xauthority is not enabled on your system, then there is an older method, but it is not secure. On the local machine beta.math, you use the command xhost:

      xhost +bacon.math
    
This will allow X programs running on bacon.math to open displays on beta.math. However, this allows _anybody_ on bacon.math to do this, not just you! For example, this means that somebody could open an X program to watch for you typing passwords on your keyboard. Do not use this unless you have no other option! If Xauthority is not enabled, complain to your system administrator to have it enabled.

Sometime things go wrong with this procedure. If you think you are already doing everything correctly, perhaps see the other hints in the related section. ( Setting the display )

See also:

Appears in other topics:

[^] Back to top

Created by rblander
Last updated 2006-03-15 by d3wilkin
xwin/xterm_xauth.faq


consultant@math.uwaterloo.ca