[comp.sys.next] Hostname in Login Window

js3b+@andrew.cmu.edu (James Vincent Schultz) (04/23/91)

Has anyone (under 2.0) got the login window to display the hostname of
the machine?

I know this could be done under 1.0, but what about 2.0?
Or at least, how is it done under 1.0, if it doesn't work for 2.0.

Thanks,

James
js3b+@andrew.cmu.edu

nates@sporobolus.NREL.ColoState.EDU (Nate Sammons) (04/24/91)

hey,
 
        Just try:
 
        go to (cd)  /usr/lib/NextStep
 
        Here there is a TIFF file called nextlogin.tiff
 
        Then use icon to edit it by typing %> open nextlogin.tiff
 
        The fields for the user name and the password HAVE TO BE IN THE SAME
                PLACE!!  but other than that, You can do anything...
 
        You might be able to edit it in such a way that it goes and finds the ho
st name, then puts it somewhere, but don't ask me...
 
                                -Nate


+======================================================================+
|  Nate Sammons               (303) 482-6812    (303) 493-4325         |
|      <nates@Sporobolus.NREL.ColoState.Edu>                           |
|      <nsammons@Lobo.RMHS.Colorado.Edu>                               |
|  "Deus Ex Machina"                                                   |
|  "I don't Want to be Immortal Through My Work, I want to be          |
|      Immortal Through Not Dying."                                    |
+======================================================================+

rling@june.cs.washington.edu (Robert Ling) (04/24/91)

You can have the login window display the hostname by editing the file
/etc/ttys.  Change the line:

    console /usr/lib/NextStep/loginwindow   NeXT .....
to
    console "/usr/lib/NextStep/loginwindow -HostName localhost"     NeXT ....

(the double quotes are significant) the name 'localhost' will be replaced
by whatever your hostname is defined as when loginwindow runs.

- Robert Ling  <rling@cs.washington.edu>

tagreen@lothario.ucs.indiana.edu (Todd Green) (04/24/91)

In article <1991Apr23.233011.9283@beaver.cs.washington.edu> rling@june.cs.washington.edu (Robert Ling) writes:
>
>You can have the login window display the hostname by editing the file
>/etc/ttys.  Change the line:
>
>    console /usr/lib/NextStep/loginwindow   NeXT .....
>to
>    console "/usr/lib/NextStep/loginwindow -HostName localhost"     NeXT ....

Or you can simply type:

dwrite loginwindow HostName localhost

Todd
P.S. though unrelated to this post, thanks to all of you who responded
to my novice programming questions!  The program/learning is coming
along rather well.
-- 
Internet: tagreen@bronze.ucs.indiana.edu
NeXTMail: tagreen@lothario.ucs.indiana.edu
BitNet:	  tagreen@iubacs.bitnet

grd@cmn9.Stanford.EDU (glen diener) (04/24/91)

I think the "easiest" way to put the hostname in the login window is
to su to root, then enter

dwrite loginwindow HostName localhost

Of course, if you prefer, you could enter

dwrite loginwindow HostName YourNameHere

You'll have to "restart" the window server to see the change...either
reboot, or log in as "console" (no password), then immediately
log out.

-glen
grd@ccrma.stanford.edu

declan@romulus.rutgers.edu (Declan McCullagh/LZ) (04/24/91)

In article <1991Apr24.011128.1992@neon.Stanford.EDU>, grd@cmn9.Stanford.EDU (glen diener) writes:
> 
> You'll have to "restart" the window server to see the change...either
> reboot, or log in as "console" (no password), then immediately
> log out.

Or type "exit" from the loginwindow.

-Declan

js3b+@andrew.cmu.edu (James Vincent Schultz) (04/24/91)

Thanks for the replies!

there are three ways to get the login window to display the machines
hostname

1) use (as root):

	dwrite loginwindow HostName localhost

localhost will become the hostname. then at the login window login as
user "exit" (no password) to reset

2) edit the tiff:

>>From: nates@sporobolus.NREL.ColoState.EDU (Nate Sammons)
 
>>go to (cd)  /usr/lib/NextStep
 
>>Here there is a TIFF file called nextlogin.tiff
 
>>Then use icon to edit it by typing %> open nextlogin.tiff
 
>>The fields for the user name and the password HAVE TO BE IN THE SAME
>>               >>PLACE!!  but other than that, You can do anything...

3) edit /etc/ttys:

	Haven't got the reply for how to do this yet (but its on its way --
thanks!).



James
js3b+@andrew.cmu.edu

aozer@next.com (Ali Ozer) (04/25/91)

In article <14453@ccncsu.ColoState.EDU> nates@sporobolus.UUCP (Nate Sammons) writes:
>        go to (cd)  /usr/lib/NextStep
>        Here there is a TIFF file called nextlogin.tiff
>        Then use icon to edit it by typing %> open nextlogin.tiff
>        The fields for the user name and the password HAVE TO BE IN THE SAME PLACE!!
>        You might be able to edit it in such a way that it goes and finds the ho
>st name, then puts it somewhere, but don't ask me...

Actually, if all you wish to do is get the hostname in there, editing
the file won't do it (and ways to get the hostname to display have already been
posted).

However, if you do wish to change your login window image, instead of
editing this file in place, copy it elsewhere and use the following
dwrite to get loginwindow to search for your image.  This dwrite needs
to be done as root:

	dwrite loginwindow ImageFile /LocalLibrary/Images/SampleImage.eps

for instance... Another important point (or more a piece of trivia) is
that the nextlogin.tiff file actually contains two images, one color and 
the other black and white. (This allows the NeXT logo to be filled with white
letters instead of dithered color ones on the black and white
machine.) If you wish to create a login banner for both color & b&w
machines, you might want to pay attention to both of these images.
(Use "tiffutil" to extract the individual images and edit them
separately...) Or else you can just have one if it looks fine in both
worlds.

Ali, Ali_Ozer@NeXT.com

scott@erick.gac.edu (Scott Hess) (04/25/91)

In article <1991Apr24.011128.1992@neon.Stanford.EDU> grd@cmn9.Stanford.EDU (glen diener) writes:
   You'll have to "restart" the window server to see the change...either
   reboot, or log in as "console" (no password), then immediately
   log out.

Logging in as 'exit' with no password will also restart the
windowserver.  I also use that almost anytime the Workspace
dies for no apparent reason (though that's not happened to _me_
since upgrading to 2.0).

Later,
--
scott hess                      scott@gac.edu
Independent NeXT Developer	GAC Undergrad
<I still speak for nobody>
"Simply press Control-right-Shift while click-dragging the mouse . . ."
"I smoke the nose Lucifer . . . Banana, banana."