gfr@cobra.mitre.org (Glenn Roberts) (02/11/89)
> I often rlogin to other machines in cmdtool windows, then keep the > windows closed until I need to work on a remote machine. Can anyone > tell me how to label the cmdtool icon with the remote host name? I have lines like the following in my .rootmenu file: "Remote Logins " MENU "Byson" shelltool -Wl Byson -WL Byson rlogin byson "Frogg" shelltool -Wl Frogg -WL Frogg rlogin frogg "Pecok" shelltool -Wl Pecok -WL Pecok rlogin pecok "Swann" shelltool -Wl Swann -WL Swann rlogin swann "Remote Logins " END This allows me to pop up a shelltool and log in to various remote systems via the SunView pop-up menu. The window will be labeled in both the open and iconic forms. - Glenn Roberts, The MITRE Corp., McLean VA gfr@cobra.mitre.org
phil@Rice.edu (William LeFebvre) (02/11/89)
Before I added a submenu for rlogins (like Glenn Roberts does), I used this simple shell script: #!/bin/csh -f set name = $0 set h = $name:t exec shelltool -Wl " rlogin $h" -WL "$h" rlogin $h $* -8 & In a bin directory, simply make as many links as you need to this file, each link being the name of a host you connect to frequently. Then typing that name will start up a shell (or cmd) tool with the appropriate labelling. William LeFebvre
pvo1478@oce.orst.edu (Paul V. O'Neill) (02/11/89)
This works as part of your .cshrc. Every remost host that has this in your .cshrc on that host will label it's icon on your local host's sunview. Edit with a textedit tool--other editors will change the "escape" (^[) to 2 characters (^ and [). (Maybe the mail will change these escapes to ^ and [, I don't know, they left here as escapes.) ###### stripe stuff 26 dec 88 pvo # from the 386i's default .cshrc # 14 jan 89 # stripe only, no cd for rsh, etc. if ( $?TERM == 0 ) exit if ( ( `tty` != /dev/console && $term == sun ) || $term == sun-cmd ) then set tty="`tty`" echo "]L`hostname`\" #####label the icon#### # ^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^ if ( ! $status ) then if ( $tty != /dev/console && $?prompt ) then set host=`hostname` user=`whoami` if ( $?ISCONSOLE) then alias stripe label 'System Messages for workstation ""$host""' unsetenv ISCONSOLE else if ( -e /usr/bin/stripe) then alias stripe /usr/bin/stripe else alias stripe label 'Commands: $user @ $host - $cwd' endif alias label 'echo -n "]l\!*\"' alias cd 'chdir \!*; stripe; echo $cwd' alias pushd 'pushd \!*; stripe' alias popd 'popd \!*; stripe;echo $cwd' alias pwd 'echo $cwd; stripe' alias suspend 'suspend; stripe' alias su 'setenv IN_SU "$cwd"; /bin/su \!*; stripe; unsetenv IN_SU' alias telnet 'telnet \!*; stripe; echo "]L`hostname`\"' alias rlogin 'rlogin \!*; stripe; echo "]L`hostname`\"' alias rsh 'rsh \!*; stripe; echo "]L`hostname`\"' alias on 'on \!*; stripe; echo "]L`hostname`\"' alias which 'setenv NO_STRIPE 1; /usr/ucb/which \!*; unsetenv NO_STRIPE' if (! $?NO_STRIPE) then if ($?IN_SU) then chdir "$IN_SU"; stripe else # bad for escapes from rn, less, fpt cd stripe endif endif endif endif unset tty endif Paul O'Neill pvo@oce.orst.edu Coastal Imaging Lab OSU--Oceanography Corvallis, OR 97331 503-754-3251
bickel@nprdc.navy.mil (Steven Bickel) (02/15/89)
karl@spruce.gsfc.nasa.gov (karl on spruce) writes: >I often rlogin to other machines in cmdtool windows, then keep the windows >closed until I need to work on a remote machine. Can anyone tell me how >to label the cmdtool icon with the remote host name?... > [[ This is all supposed to be one line: --wnl ]] cmdtool -Wp 150 150 -Wf 100 1 1 -Wb 205 255 225 -Wg \ -font /usr/lib/fonts/fixedwidthfonts/cour.b.16 -Wg -label PACIFIC rlogin pacific This line works fine. Note the -label option along with the font, size, location, color (color machine: -Wf = forground rgb -Wb = background rgb) as well as the rlogin are all in my .suntools file. Steve Bickel Steve Bickel bickel@nprdc.arpa Systems Engineering Assoc. (619) 553-9306 Naval Personel R & D Center.