" /> Status for Andrew DeFaria: July 2007 Archives

« June 2007 | Main | August 2007 »

July 31, 2007

CC/CQ on Linux

  • Fixed problem with cleartrig for the Linux clients
  • Investigated and found a work around to font problems between Linux and Sun
  • Met with development/test teams regarding documentation visibility. Also worked out the differences in the documents between builds 1, 2 and 3

    Cleartrig and font problems on Linux clients

    I hit a few problems when attempting to verify proper execution of Clearcase/Clearquest and our WOR integration on Linux machines.

    Cleartrig problems

    The first problem was that the Linux installation of Cleartrig (remotely accessible through /cleartrib/bin) was missing execute permissions for group and other. The solution to this was to add execute permissions.

    Font Problems

    his is running under the assumption that:

    1. The user is on a Solaris box and running CDE and
    2. The user is remotely logged into a Linux box (currently only ranlin02 and ranlin03) and displaying back to his/her Solaris machine

    The user may see dialog boxes with no text or other errors relating to fonts. Since most engineers use Solaris and CDE many X Font Resources are set to fonts only available on CDE supported systems1. For example, executing xrdb -q | grep -i font may result in the following:

    *Font:             -dt-interface user-medium-r-normal-s*-*-*-*-*-*-*-*-*
    *FontList:         -dt-interface user-medium-r-normal-s*-*-*-*-*-*-*-*-*
    *labelFontList:    -dt-interface user-medium-r-normal-s*-*-*-*-*-*-*-*-*
    ...
    

    Needless to say these "dt" fonts are not known in the Linux world and this causes Clearcase/Clearquest some problems when running remotely displayed to an X server using such font. The solution is to use more universally acceptable fonts such as fixed. The following set of X Font Resources seems to work:

    *Font:                  fixed
    *FontList:              fixed
    *labelFontList:         fixed
    *buttonFontList:        fixed
    *textFontList:          fixed
    *DtEditor*textFontList: fixed
    *systemFont:            fixed
    *XmText*FontList:       fixed
    *FontSet:               fixed
    *XmTextField*FontList:  fixed
    *fontGroup:             Courier
    

    If you are experiencing problems with X Fonts when running from a Linux machine add the above lines to a file, say ~/.fonts then do

    $ xrdb -m ~/.fonts
    

    Notes:

    1. These "dt" fonts are often set into CDE's environment when say using the Style Manager to change your font settings.

July 27, 2007

Clearquest on Linux

  • Worked with Kirk on getting Clearquest working on ranlin02/03

July 25, 2007

PHP Web/Clearquest install/cq_setup.csh

  • Finished recoding RAN web using PHP, better HTML coding and CSS
  • Documented new PHP Web
  • Copied large CC & CQ install image over to RAN. Tried running Clearquest. Was receiving error
  • Learned that we have a copy of cq_setup.csh that is sourced by the csh startup scripts. But it uses a Sun version. This obviously causes problems for Linux machines

I downloaded the Rational 2003.06.00 release tarball that Carlos provided me and installed it on ranlin02. I have the following problem when trying to run Clearquest I get the following error:

Ranlin02:/opt/rational/clearquest/bin/clearquest
/opt/rational/clearquest/rhat_x86/bin/clearquest_main: error while loading shared libraries: libXmu.so: cannot open shared object file: No such file or directory

Looking at the ClearQuest and Clearquest MultiSite Release Notes I find:

Linux symbolic links to Motif libraries

ClearQuest uses the Motif libraries native to the machine, and these libraries need to include the proper symbolic links. If the symbolic links are not established, the following error occurs when invoking

ClearQuest:/opt/rational/clearquest/rhat_x86/bin/clearquest_main: error while loading shared libraries: libXmu.so: cannot open shared object file: No such file or directory

The error complains about the first of several libraries it cannot find. To insure that the symlinks are created, it is necessary that the

XFree86-devel-*

package be installed when installing the OS.

And, of course:

Ranlin02:rpm -qa | grep XFree86-devel
Ranlin02:

So can we get XFree86-devel-* installed?

On a different but related note, we generally support only Sun and only csh (and it's derivatives - tcsh). We have a serious of csh style start up scripts (which I've largely replicated/converted for bash...) one of which sources /prj/muosran/config/cq_setup.csh. That is merely a copy of a /opt/rational/clearquest/bin/cq_setup.csh. Contained therein is a reference to sun5 which is bad because this source of /prj/muosran/config/cq_setup.csh is global and thus sourced by users of Linux machines. Naturally Linux user will not be finding any sun5 executables nor executing them.

I've made a modification to /proj/muosran/config/cq_setup.csh as such:

#!/bin/csh -f

# Andrew@DeFaria.com 07-25-2007: By specifying sun5 we tie # ourselves to an architecture. There is no need to do this. # Call the clearquest in /opt/rational/clearquest/bin and let # it figure out our architecture. #eval `/opt/rational/clearquest/sun5/bin/clearquest -dumpcsh`
eval `/opt/rational/clearquest/bin/clearquest -dumpcsh` set var = $status if ($var != 0) then unset var exit(2) endif unset var #echo "You can now run 'clearquest' to start Rational ClearQuest."

Still all of this seem pretty arbitrary. What is the above script doing but checking that clearquest can simply be run? Why set an environment variable (var) only to test it and then ultimately unset it?!? Seems like really odd and unnecessary code from IBM/Rational.

July 19, 2007

Automating Clearcase Installs

  • Created auto install script for Linux

Automating Clearcase Installs

Often you want to easily and quickly be able to install Clearcase on systems. Of course, there are lots of considerations, hence lots of parameters to consider. IBM/Rational's solution to this is install_release which is really just a script that calls inst_rls, yet another Perl script, to do the installation. As it does it prompts for parameters and performs the install. But it would be nice to be able to run through the prompts once, answering all the questions for a batch of similarly configured machines, then run that install on those machines.

Now IBM/Rational even thought of this and install_release has a facility to perform multiple installs remotely to a bunch of machines. But you may not have all of those machines up and running nor identified.

Or you may wish to automate the process yourself, scripting a solution that queries other things to determine exactly which type of install to do.

Running install_release with -echo_cmd_only

While no longer documented, running install_release with the parameter -echo_cmd_only causes install_release to run through all of the prompts and then it just spits out the full command line that will perform the install as specified. This command line can then be used as the basis for your own automation.

The following is a quick script to install Clearcase 6.x on Redhat systems:

#!/bin/bash
#
# Quick script to install Clearcase 6.x on Redhat x86 64 bit
#
# Andrew@DeFaria.com

if [ $(id -u) != 0 ]; then
  echo "ERROR: You must be root to install Clearcase"
  exit 1
fi

# Define some parameters that might be changing
registry_region=cclinux
registry_host=cclinux
license_host=cclic
release_path=/net/cclinux/opt/clearcase/ccrel6.0_pXX_rhat/2003.06.00/rhat_x86
release_area=$release_path/clearcase/install
logfile=/tmp/Rational_install.$(date +%y%m%d.%M.%S)

cd $release_area

# Now install
./install_release      \
  -nlog                \
  -rbh Unknown         \
  -comp
ratl_perl,atria_perl,atria_install,atria_basement,atria_cplus_shlib,
atria_base,CC_base,atria_X11_base,CC_client,atria_server,
atria_cplus_base,atria_gui,CC_doc,CC_bld_client,CC_vob_svr,
CC_view_svr,CC_int_client,CC_gui_client,CC_cnv_client,CC_MIN_STD,
CC_ONLY_SERVER,MS_shipping_server,CC_FULL,MS_all,MS_FULL   \
  -rr $registry_region \
  -to /opt/rational    \
  -rebuild_vnode 0     \
  -log $logfile        \
  -level 5             \
  -from $release_path  \
  -patch_kernel 0      \
  -rh $registry_host   \
  -local               \
  -model full          \
  -lh $license_host    \
  -no_query

Notes:

  1. I inserted a little check at the top to make sure you're root when you run this script. You need to be root to install Clearcase
  2. I've defined a few variables that might change like the release area, registry host, registry region, etc.
  3. Needed to add -no_query to get this install script to not stop querying for further options. This has been observed on Linux only.
  4. All -comp components need to specified on one line, separated by comma with no spaces. It has been broken up above for readability purposes only.

Deliver build changes

  • Delivered changed to build (removing checking out of Clearcase elements during build)
  • Investigated how ranweb is set up and documented differences in the menus
  • Wrote RAN.php which could be used to do the menus in a a consistent form

July 18, 2007

Help Desk Cleanup

  • Cleaned up and closed several help desk tickets
  • Delivered and closed RAX_LMC WOR
  • Worked with Kirk on installing Clearcase on Linux servers.

July 11, 2007

View space/Locked stream

  • Resolved a ticket where the user was unable to deliver due to lock on activity - which is really a lock on the stream
  • Did an analysis of view disk space usage
  • Assisted Kirk and Tom with Clearcase 7.0.1.0 installation on Linux
  • Fixed problem with ssh public key authentication

View space

I looked into the disk space usage on the view2 server (partitions view2a, view2b and view2c0 and find the following:







View Policy and view_db.crs_file size

When you use use dynamic view and clearmake(1) to utilize build avoidance by winking in derived objects, Clearcase stores configuration records in the view's storage directory (.s):

CONFIGURATION RECORDS. The file view_db.crs_file in the .s subdirectory is actually part of the view's database, as described inthe following section. It is the part that stores the configuration records of derived objects built in the view.

...

view_db.crs_file

Stores the configuration records of nonshareable and unshared derived objects. This file resides in subdirectory .s of the view storage directory, allowing it to be remote.

Compressed copies of the configuration records are cached in a view-private file, .cmake.state, located in the directory that was current when the build started. This speeds up configuration lookup during subsequent builds in the view.

The view_db.crs_file can get fairly large over time. This is another reason why Rational says that "views should be used like Kleenex".

Recovering View Space

According to Eric J. Ostrander's ClearCase / ClearQuest pages:

Release view database disk space back to the system.

As data is collected in a view, the view's database increases in size. Commands such as view_scrubber that remove DOs from a view merely release logical space inside the view's database. That is, the disk space taken by the database does not shrink. This is true for the view-storage/db/* files and the view-storage/.s/view_db.crs_file file (which contains the derived object configuration records). To actually release that space back to the system, one needs to run recoverview twice on that view. Normally recoverview is only needed when a VOB is no longer available and the view's view-private files that once belonged to the VOB are now stranded. However, it has the added benefit that it calls reformatview, which in turn cleans up the database.

The recoverview must be run twice. The first pass releases any unused space in the database back to the system and cleans up CRs no longer attached to a DO. The second pass releases the now newly unused space (freed up in the first pass) back to the system. A third run has no affect.

An attempt to run reformatview by itself (which is actually the only part that is really needed) will result in the message "reformat not needed for view". Unfortunately, reformatview does not have a -force option, but recoverview does.

# ct recoverview -force -tag view-tag
# ct recoverview -force -tag view-tag

NOTE: Running recoverview does not affect view-private files.

WARNING! Rational recommends not being anywhere in the view-storagearea during the recoverview/reformatview (reason unknown).

Clearcase 7.0.1.0 Installation on Linux

In installing Clearcase 7.0.1.0 on Linux, Kirk and Tom were having problems getting it set up as a registry server. One problem was that they incorrectly named the config file rgy_srv.conf instead of rgy_svr.conf (I always get those wrong myself). There also seems to be an issue where there are two directories, both under /var/adm/rational/clearcase, one named rgy (where the registry is stored) and one named config (where other config files are stored). And there are additional config files related to the registry, rgy_hosts.conf and rgy_region.conf. As it seems to turn out those three files (rgy_svr.conf, rgy_hosts.conf and rgy_region.conf) need to be in both the rgy and config directories under /var/adm/rational/clearcase. Is this new for 7.0.1.0?

Turns out I was mistaken. While I was working on this so was Kirk. So our actions overlapped and effected each other. The real thing is that these rgy_*.conf files rightfully moved from the rgy directory to the conf directory for 7.0.

July 10, 2007

Removed views/documented customizing Unix environments

  • Worked with Tom and Bryce to remove views from p57707
  • Wrote a document describing how to customize your Unix CDE environment

Removing views with pending deliveries

Had an issue where a user (p57707) had left the company but still had UCM related views. In attempting to remove those views to free up space I was told that there was a delivery in progress. Yet if I set to that view and did ct deliver -cancel it would say that there was no delivery in progress. The best thing to do here is to do a ct lsact -cact which should be the deliver activity. Then find which view these was delivered from. IOW this view was the destination view for the delivery and we needed to find where the delivery was initiated from. Then ct deliver -cancel|-resume from that stream/view.

Tips on Personalizing your Unix/CDE environment

Way back in the day I used to alpha test HP's VUE which latter became the basis for CDE. Oh yes it's brought back memories for sure, and a couple of head scratches as I strive to remember how to configure, customize and personalize things. Perhaps you too have wished to make the environment a little better. Well here's some tips...

Get control of your X Resources

A lot of CDE and X can be controlled via X Resources. But how do you manage your X resources in a CDE environment? In general, xrdb(1) is your friend. CDE saves your "session" using X resource files that are loaded via xrdb(1) at session start up. Additionally (I believe) that X loads any and all resources in ~/.Xresources at start. So the trick is to get all your X resources into ~/.Xresources and to start actively managing them. You can do this as follows:

$ xrdb -q > ~/.Xresources

Now you can add and/or adjust resources in to your liking then do xrdb -l ~/.Xresources. Remember, xrdb -l ~/.Xresources will always get you back to your known set of X Resources.

To find if a resource is set

You can see if a resource is set by using the following:

$ xrdb -q | grep -i <resource string>

I've attached my ~/.Xresources. Let me bring a few to your attention. Note that resources that start with "*" are global in nature. Thus "*background: <color>" will serve as the background for any X application that doesn't explicitly set a background color. "*"'s between resource names are more general than "."'s. Just think "*" expands to anything where "." expands to one character.

The "Dtwm*0*backdrop*image: NoBackdrop" says not to set a CDE "Backdrop" on any of the workspaces. Instead I use xv to randomly change my backdrops from jpg images. More on that later...

Using Xresource Classes

Rather than start Xterms (or dtterms) with:

$ xterm -fg white -bg black -sl 5000 -cr green \
> -sb -e rsh <other machine>
$ xterm -fg yellow -bg blue -sl 5000 -sb -e rsh <other machine>

thus having long lists of options, classify your resources such as:

XServer*background:    Black
XServer*foreground:    Green
XServer*colorBD:       Yellow
XServer*colorUL:       Red
XServer*cursorColor:   Yellow

Then use xterm -name XServer and all of those X Resources that start with, in this case, XServer will be used. You can set generic or global resources such as;

XTerm*saveLines:      5000
XTerm*scrollbar:      True

Setting Meta (or the Diamond key) to be Emacs mode Meta key

Did you know that (even in tcsh) generally Emacs key bindings are in effect at the command line. This while arrow up gets you the previous command in the command history stack so does Cntl-P also go to the previous command. Other Emacs bindings that work:

  • C-p: Previous command in history stack
  • C-n: Next command in history stack
  • C-a: Go to beginning of line
  • C-e: Go to end of line
  • C-f: Go forward one character
  • M-f: Go forward one word
  • C-b: Go backward one character
  • M-b: Go backward one word
  • C-d: Delete one character
  • M-d: Delete one word
  • C-t: Transpose two characters

Additionally, in bash, C-r stands for search backward in the history stack. tcsh does not support this. Using such keybindings keeps your hands on the keyboard and improves your productivity.

M-f listed above means "hold the meta key down and type f". The meta key is defined as Escape, which, unfortunately will repeat if held down. Most people map this to the "Alt" key. The Sun keyboard has both an Alt key and two "Diamond" keys that are normally labeled Alt on PC keyboards. Therefore it's good to configure your terminal emulator to use this Diamond/Alt key as Emacs' Meta key. To do this for Xterm use the following X resource (best put into your ~/.Xresouces):

Xterm*eightBitInput: True

and Dtterm:

Dtterm*kshMode: True

Side note about "kshMode". This is a misnomer really. True, ksh does support Emacs style keybindings (set -o emacs or set -o vi for you vi guys) and it is useful to have Alt => Meta. However ksh is not the only shell that this is useful for. It is also useful for tcsh and bash, for example.

Taking Control of your Buttons and Keybindings

The following:

Dtwm*keyBindings:    MyKeys
Dtwm*buttonBindings: MyButtons

Tell the window manager (Dtwm) not to use the default keyBindings and buttonBindings but instead to use MyKeys and MyButtons instead. These are defined in your dtwmrc, which is under ~/.dt/en_US.ISO8859-1/dtwmrc (which I've also attached). I started by copying the system dtwmrc (cp /usr/dt/config/C/sys.dtwmrc ~/.dt/en_US.ISO8859-1) and then modified it.

You're dtwmrc can be very complicated. See dtwmrc(1) for more info. Here are MyButtons:

Buttons MyButtons
{
  <Btn1Down>        root              f.menu Terminals
  <Btn1Down>        window|frame|icon f.raise
  <Btn2Click>       root              f.toggle_frontpanel
  <Btn3Down>        root              f.menu  DtRootMenu
  <Btn3Down>        icon              f.post_wmenu
  Shift<Btn1Click>  frame|icon        f.lower
  <Btn1Click>       frame|icon|window f.raise
  <Btn1Click2>      frame             f.maximize
  <Btn1Click2>      icon              f.restore
  <Btn2Click>       frame|icon        f.raise_lower
  <Btn3Down>        frame|icon        f.post_wmenu
  Alt<Btn1Click>    frame|icon|window f.raise
  Alt<Btn1Click2>   frame|window      f.minimize
  Alt<Btn1Click2>   icon              f.restore
  Alt<Btn2Click>    frame|icon        f.raise_lower
  Alt<Btn1Down>     frame|icon|window f.move
  Alt<Btn3Down>     window            f.minimize
}

Many of these are taking from the defaults. Here are some of the changes I made:

  • Changed Btn1Down to bring up the "Terminals" menu
  • Added "window" to the places where a Btn1Down would do a raise. This allows me to click on the window itself to raise it instead of having to find the window border.

Changing your desktop background

I have a series of images that I like to constantly refresh on my background. I put them in ~/Images. CDE has terrible desktop background support (like circa 1990) and only supports xpm (which is a horrible image file format!). xv is an image viewer than handles more modern image file formats such as .gif, .jpg, and .png. It also has options for setting the backdrop (provided CDE is not putting up a .xpm backdrop image, hence the "Dtwm*0*backdrop*image: NoBackdrop" setting). Now how do we get this to do this periodically?

The answer? Perl. I've attached a Perl script that sets your backdrop by choosing a random image from all of those under ~/Images every hour or whenever it receives a SIGUSR2.

Oh and if you wish feel free to:

$ mkdir ~/Images
$ cp ~p6238c/Images ~/Images

Or

$ ln -s ~p6258c/Images ~/Images
*0*ColorPalette:	SoftBlue.dp
*0*ColorUse:	HIGH_COLOR
*DtEditor*textFontList:	-dt-interface user-medium-r-normal-s*-*-*-*-*-*-*-*-*:
*DtTerm*shadowThickness:	1
*Font:	-dt-interface user-medium-r-normal-s*-*-*-*-*-*-*-*-*
*FontList:	-dt-interface system-medium-r-normal-s*-*-*-*-*-*-*-*-*:
*FontSet:	-dt-interface user-medium-r-normal-s*-*-*-*-*-*-*-*-*
*HelpColorUse:	1
*XmText*FontList:	-dt-interface user-medium-r-normal-s*-*-*-*-*-*-*-*-*:
*XmText*Translations:	#override\n\
        Ctrlu:delete-to-start-of-line()\n\
        Ctrlk:delete-to-end-of-line()\n\
        Ctrla:beginning-of-line()\n\
        Ctrle:end-of-line()\n\
        Ctrlp:process-up()\n\
        Ctrlb:backward-character()\n\
        Ctrln:process-down()\n\
        Ctrlf:forward-character()
*XmTextField*FontList:	-dt-interface user-medium-r-normal-s*-*-*-*-*-*-*-*-*:
*XmTextField*Translations:	#override\n\
        Ctrlu:delete-to-start-of-line()\n\
        Ctrlk:delete-to-end-of-line()\n\
        Ctrla:beginning-of-line()\n\
        Ctrle:end-of-line()\n\
        Ctrlb:backward-character()\n\
        Ctrlf:forward-character()
*background:	#9494D5D5DFDF
*buttonFontList:	-dt-interface system-medium-r-normal-s*-*-*-*-*-*-*-*-*:
*dtEnvMapForRemote:	DTAPPSEARCHPATH:DTHELPSEARCHPATH:DTDATABASESEARCHPATH:XMICONSEARCHPATH:XMICONBMSEARCHPATH
*enableBtn1Transfer:	button2_transfer
*enableButtonTab:	True
*enableCDEColorFactors:	True
*enableDefaultButton:	True
*enableDragIcon:	True
*enableEtchedInMenu:	True
*enableMenuInCascade:	True
*enableMultiKeyBindings:	True
*enableThinThickness:	True
*enableToggleColor:	True
*enableToggleVisual:	True
*enableUrlAwareness:	True
*fontGroup:	Courier
*foreground:	#000000000000
*labelFontList:	-dt-interface system-medium-r-normal-s*-*-*-*-*-*-*-*-*:
*loginShell:	True
*multiClickTime:	500
*promptDialog.bboard.frame.form.text.columns:	45
*saveLines:	500
*scrollBar_right:	True
*sessionVersion:	3.0
*systemFont:	-dt-interface system-medium-r-normal-s*-*-*-*-*-*-*-*-*:
*textFontList:	-dt-interface user-medium-r-normal-s*-*-*-*-*-*-*-*-*:
*ttyModes:	intr ^c quit ^\\ erase ^h kill ^u eof ^d start ^q stop ^s susp ^z dsusp ^y rprnt ^r flush ^o weras ^w lnext ^v
*userFont:	-dt-interface user-medium-r-normal-s*-*-*-*-*-*-*-*-*:
*xineramaDefaultFramebuffer:	0
Dtstyle*timeoutScale:	5
Dtwm*0*FrontPanel*geometry:	+67-4
Dtwm*0*helpResources:	\n  
Dtwm*0*initialWorkspace:	ws0
Dtwm*0*workspaceCount:	4
Dtwm*0*workspaceList:	"ws0" "ws1" "ws2" "ws3"
Dtwm*0*backdrop*image:	NoBackdrop
Dtwm*0*ws3*title:	Four
Dtwm*0*ws4*title:	New
Dtwm*0*ws5*title:	New_1
Dtwm*0*ws6*title:	New_2
Dtwm*focusAutoRaise:	False
Dtwm*gwmOnFrontPanel:	False
twm*moveOpaque:	True
Dtwm*showSwitchArea:	True
Dtwm*syncDesktopSwitch:	False
Dtwm*useSameBackdrop:	True
Dtwm.keyboardFocusPolicy:	pointer

! Dtwm
Dtwm*keyBindings:	MyKeys
Dtwm*buttonBindings:	MyButtons

! Rxvt
Rxvt*font:		"Lucida Console-*-16"
Rxvt*font1:		"Lucida Console-*-18"
Rxvt*font2:		"Lucida Console-*-20"
Rxvt*saveLines:		5000
Rxvt*scrollBar_right:	True
Rxvt*geometry:		80x24
Rxvt*loginShell:	True
Rxvt*background:	SteelBlue
Rxvt*foreground:	White
 Rxvt*colorBD:		Red
Rxvt*colorUL:		Red
Rxvt*cursorColor:	Red

! New server
Jupiter*background:	MidNightBlue
Jupiter*foreground:	White
Jupiter*colorBD:	Red
Jupiter*colorUL:	Red
Jupiter*cursorColor:	Yellow

! Danni's desktop
Starbase*background:	MediumVioletRed
Starbase*foreground:	White
Starbase*colorBD:	Yellow
Starbase*colorUL:	Red
Starbase*cursorColor:	Yellow

! Hewlett Packard
Tiburon*background:	Black
Tiburon*foreground:	Magenta
Tiburon*colorBD:	Yellow
Tiburon*colorUL:	Red
Tiburon*cursorColor:	Green

Pacifica*background:	ForestGreen
Pacifica*foreground:	White
Pacifica*colorBD:	Red
Pacifica*colorUL:	Red
Pacifica*cursorColor:	Red

plebld01*background:	Black
plebld01*foreground:	Yellow
plebld01*colorBD:	Yellow
plebld01*colorUL:	Red
plebld01*cursorColor:	Yellow

ccase-sj1-4*background:	Black
ccase-sj1-4*foreground:	Green
ccase-sj1-4*colorBD:	Green
ccase-sj1-4*colorUL:	Red
ccase-sj1-4*cursorColor:Yellow

XServer*background:	Black
XServer*foreground:	Green
XServer*colorBD:	Yellow
XServer*colorUL:	Red
XServer*cursorColor:	Yellow

! XTerm
XTerm*Font:		-*-Lucida Sans Typewriter-medium-r-*-*-*-*-*-*-*-*-*
XTerm*saveLines:	5000
XTerm*scrollBar_right:	True
XTerm*scrollBar:	True
XTerm*geometry:		80x24
XTerm*loginShell:	True
XTerm*background:	SteelBlue
XTerm*foreground:	White
XTerm*colorBD:		Blue
XTerm*colorUL:		Red
XTerm*cursorColor:	Yellow
XTerm*eightBitInput:	False

! XEmacs
Emacs*Background:	Gray
Emacs*Font:		-*-Lucida Sans Typewriter-medium-r-*-*-*-*-*-*-*-*-*

! Dtterm
Dtterm*kshMode: 	True
Menu DtRootMenu 
{
  "Menu"		f.title
  "Applications"	f.menu ApplicationsMenu
  "Terminals"		f.menu Terminals
  "Files"		f.menu FilesMenu
  "Folders"		f.menu FoldersMenu
  "Hosts"		f.menu HostsMenu
  "Tools"		f.menu ToolsMenu
  "Windows"		f.menu WindowsMenu
  "Lock"		f.action LockDisplay
  "Suspend"		f.action SDTsuspend
}

Menu Terminals
{
  "Terminals"		f.title
  sep			f.separator
  "Local X Term"	f.action Xterm
  "Remote X Term"	f.action XtermRlogin
  sep			f.separator
  "Local DT Term"	f.action Dtterm
  "Remote DT Term"		f.action DttermRlogin
}

Menu WindowsMenu
{
    "Windows"		f.title
    "Refresh"		f.refresh
    "Arrange Icons"	f.pack_icons
    "Restart"		f.restart
    "Update"		f.action UpdateWorkspaceMenu
    "Kill"		f.exec /usr/openwin/bin/xkill
}

Menu ApplicationsMenu
{
  "Applications"	f.title
  "Application Manager"	f.action Dtappmgr
  "Audio Control"	f.action SDtAudioControl
  "Audio and Video"	f.action SDTjmplay
  "Calculator"		f.action Dtcalc
  "Calendar"		f.action Dtcm
  "Icon Editor"		f.action Dticon
  "Image Viewer"	f.action SDTimage
  "Snapshot"		f.action SDTsnapshot
  "Text Editor"		f.action TextEditor
  "Text Note"		f.action Note
  "Voice Note"		f.action Record
}

Menu FilesMenu
{
  "Files"		f.title
  "File Manager"	f.action Dtfile
  "Find File"		f.action SDtFind
  "Properties..."	f.action FileProperties
}

Menu FoldersMenu
{
  "Folders"		f.title
  "Empty Trash Can"	f.action DtEmptyTrash
  "File Manager - Home"	f.action DtfileHome
  "Open Floppy"		f.action OpenFloppy
  "Removable Media"	f.action Dtmediamgr
  "Trash Can"		f.action Dttrash
}

Menu HostsMenu
{
  "Hosts"		f.title
  "Find Host..."	f.action HOST_Find
  "Performance Meter"	f.action SDtPerfmeter
  "Terminal Console"	f.action DttermConsole
  "This Host"		f.action Terminal "/usr/dt/config/C/wsmenu/Hosts/This_Host"
  "Workstation Info"	f.action SDtWsinfo
}

Menu ToolsMenu
{
  "Tools"			f.title
  "Create Action"		f.action Dtcreate
  "Desktop Controls"		f.action DtControls
  "Hotkey Editor"		f.action SDtHotkey
  "Power Manager"		f.action SDTpowermgr
  "Print Manager"		f.action DtPrintManager
  "Printer Administrator"	f.action PrinterAdministratorDtspcd
  "Process Manager"		f.action SDtProcess
  "Solaris Management Console"	f.action smc
  "Terminal"			f.action Terminal
  "Watch Errors"		f.action DttermErrorlog
}

Menu DtPanelMenu
{
  "Windows"				f.title
  "Shuffle Up"				f.circle_up
  "Shuffle Down"			f.circle_down
  "Refresh"				f.refresh
  "Clean Up Icons"			f.pack_icons
  "Minimize/Restore Front Panel"	f.toggle_frontpanel
  "Restart Workspace Manager..."	f.restart
  "Update Workspace Menu"		f.action UpdateWorkspaceMenu
  "Disable Access Control"		f.action Xhost+
  "Enable Access Control"		f.action Xhost-
  "Kill Window..."			f.exec /usr/openwin/bin/xkill
}

Menu WindowMenu
{
  "Restore"		_R			f.normalize
  "Move"		_M			f.move
  "Size"		_S			f.resize
  "Minimize"		_n			f.minimize
  "Maximize"		_x			f.maximize
  "Lower"		_L			f.lower
  "Workspace..."	_W			f.workspace_presence
  "All Workspaces"	_A			f.occupy_all
  "Remove Workspace"	_e			f.remove
  "Close"		_C	AltF4	f.kill
}

Keys MyKeys
{
  # Global
  #AltMenu			root|icon|window	f.toggle_frontpanel 
  AltTab			root|icon|window	f.next_key
  Alt ShiftTab		root|icon|window	f.prev_key
  AltEscape		root|icon|window	f.next_key
  Alt ShiftEscape		root|icon|window	f.prev_key
  AltDown			root|icon|window	f.circle_down
  AltUp			root|icon|window	f.circle_up
  AltLeft			root|icon|window	f.prev_workspace
  AltRight			root|icon|window	f.next_workspace
  Alt Ctrl Shiftexclam	root|icon|window	f.set_behavior

  # Root
  SunAgain			root|ifkey		f.pack_icons
  SunProps			root|ifkey		f.version
  SunUndo			root|ifkey		f.refresh
  SunFront			root|ifkey		f.circle_up
  ShiftSunFront		root|ifkey		f.circle_down
  Down			root			f.circle_down
  Up			root			f.circle_up
  Right			root			f.next_workspace
  Left			root			f.prev_workspace
  #
  SunAudioMute        	root|icon|window|ifkey  f.exec /usr/dt/appconfig/sdtvolctl/muteVolume
  SunAudioRaiseVolume	root|icon|window|ifkey  f.exec /usr/dt/appconfig/sdtvolctl/volumeUp
  SunAudioLowerVolume	root|icon|window|ifkey  f.exec /usr/dt/appconfig/sdtvolctl/volumeDown
  # Window/Icon
  SunFront			window|icon|ifkey       f.raise_lower
  SunOpen			window|ifkey            f.minimize
  ShiftEscape		window|icon		f.post_wmenu
  Altspace			window|icon		f.post_wmenu
  AltF6  			window			f.next_key transient
  Alt ShiftF6		window			f.prev_key transient
  AltF4			window|icon|ifkey	f.kill
  AltSunProps		window|icon|ifkey	f.workspace_presence
  AltSunPaste		window|icon|ifkey	f.occupy_all
  AltSunCut		window|icon|ifkey	f.remove
  AltKP_Insert		window|icon		f.occupy_all
  AltDelete		window|icon		f.remove
  CtrlL2			window|ifkey		f.next_cmap
  CtrlL4			window|ifkey		f.prev_cmap
  # Icon
  SunOpen			icon|ifkey              f.restore
  AltF4			icon|ifkey		f.kill
  SunProps			icon|ifkey		f.workspace_presence
  SunPaste			icon|ifkey		f.occupy_all
  SunCut			icon|ifkey		f.remove
  KP_Insert		icon|ifkey		f.occupy_all
  Delete			icon|ifkey		f.remove
}

Buttons MyButtons
{
  		root			f.menu Terminals
  		window|frame|icon	f.raise
  		root			f.toggle_frontpanel
  		root			f.menu  DtRootMenu
  		icon		f.post_wmenu
  Shift	frame|icon		f.lower
  		frame|icon|window	f.raise
  		frame			f.maximize
  		icon			f.restore
  		frame|icon		f.raise_lower
  		frame|icon		f.post_wmenu
  Alt	frame|icon|window	f.raise
  Alt	frame|window		f.minimize
  Alt	icon			f.restore
  Alt	frame|icon		f.raise_lower
  Alt		frame|icon|window	f.move
  Alt		window			f.minimize
}

Menu DefaultWindowMenu
{
  "Restore"	_R	AltF5	f.normalize
  "Move"	_M	AltF7	f.move
  "Size"	_S	AltF8	f.resize
  "Minimize"	_n	AltF9	f.minimize
  "Maximize"	_x	AltF10	f.maximize
  "Lower"	_L	AltF3	f.lower
  "Close"	_C	AltF4	f.kill
}
#!/bin/perl
use strict;
use warnings;
use POSIX qw (setsid);

use FindBin;

my $sleep = 60 * 60;
my $home = $ENV{HOME};
my $xv = "/prj/Synopsis/gccsparcOS5/ccss/utils/xv/xv";

my @images = `ls $home/Images`;
chomp @images;

my $arch             = $^O =~ /MSWin/  ? "windows"   :
                       $^O =~ /cygwin/ ? "cygwin"    : $^O;
my $null             = $^O =~ /MSWin/  ? "NUL"       : "/dev/null";

sub display_err ($;$$) {
  my ($msg, $handle, $nolinefeed) = @_;

  $handle = *STDERR if !defined $handle;

  print $handle $msg;
  print $handle "\n" if !defined $nolinefeed;
} # display_err

sub error ($;$$$) {
  my ($msg, $errno, $handle, $nolinefeed) = @_;

  if (!$errno) {
    $msg = "$FindBin::Script ERROR: $msg";
  } else {
    $msg = "$FindBin::Script ERROR #$errno: $msg";
  } # if

  display_err $msg, $handle, $nolinefeed;

  exit $errno if $errno;
} # error

sub EnterDaemonMode (;$$) {
  my ($logfile, $errorlog) = @_;

  if (!defined $logfile or $logfile eq '') {
    $logfile = $null;
  } # if

  if (!defined $errorlog or $errorlog eq '') {
    $errorlog = $null;
  } # if

  # Change the current directory to /
  my $root = $arch eq "windows" ? "C:\\" : "/";
  chdir $root
    or error "Can't chdir to $root ($!), 1";

  # Turn off umask
  umask 0;

  # Redirect STDIN to $null
  open STDIN, $null
    or error "Can't read $null ($!)", 1;

  # Redirect STDOUT to logfile
  open STDOUT, ">>$logfile"
    or error "Can't write to $logfile ($!), 1";

  # Redirect STDERR to errorlog
  open STDERR, ">>$errorlog"
    or error "Can't write to $errorlog ($!)", 1;

  # Now fork the daemon
  defined (my $pid = fork)
    or error "Can't create daemon ($!)", 1;

  # Now the parent exits
  exit if $pid;

  # Set process to be session leader
  setsid ()
    or error "Can't start a new session ($!)", 1;
} # EnterDaemonMode

sub SwitchWallPaper {
  # We don't need to do anything here, just handle the interrupt and
  # let the while loop continue.
} # SwitchWallPaper

$SIG{USR2} = \&SwitchWallPaper;
 
EnterDaemonMode;

while () {
  my $cmd = "$xv -root -maxpect -quit $home/Images/" . $images [int (rand $#images)];

  `$cmd`;

  sleep $sleep;
} # while

July 5, 2007

Fun with IT in GD

OK so today I get an obvious phishing attempt email at GD:

andrew.defaria:
Maybe some mistake in your medcare form(attachment), please check it.
Before your open it,rename medicare.vvv to medicare.mdb
if you find some problem in you medcare ,please reply to me
Tel:(877) 449-07010

along with an attachment of medicare.vvv. So, being a good, conscientious citizen I figured I'd report the incident in order to help others down the road. I asked around and was told that I need submit a help desk ticket and that I need to first contact the help desk to do so. Funny, I'd thought this would just be a "forward the email to <x>" and I'd be done with it. So I'm directed to a web page which has the number for the help desk. I call that number (it's 9:40 Am mind you) and I get voice mail saying "I'm sorry but nobody's here to take your call" and to leave a message. So, wanting to dispose of this issue rather than have it remain, I decided to go back to the web site and see if there was an answer to the question. I searched for "report phishing attempts" and "report spam" and there was nothing found! Oh well I tried but does this frustrate anybody else as much as it does me?

Oh and if click on the Contact Us link you'll start and email that will be returned to you undeliverable!