rexec and hostname in solaris 2.4?

rexec and hostname in solaris 2.4?

Post by Geoff LeBold » Fri, 09 Feb 1996 04:00:00



I'm having problems figuring out my login hostname under solaris 2.4.
My method works under sunos 4.1.x.

I'm have these general scripts that allow users to run the OpenLook
Window Manager on their PC X servers. Basically, I rexec into the
Sun and run the script. The script figures out my hostname using
the following...

set my_pc = `who am i |  sed -e 's/.*(//' -e 's/\.*).*/:0.0/'`

or

set my_pc = `who | grep $USER | awk -F\( '{print $2}' | awk -F\) '{print $1}'`

and then I setenv $DISPLAY ${my_pc} or ${my_pc}:0.0

and then run olwm & and whatever else. My X servers are set to single window
mode, etc. I'm using csh, but I doubt that's the problem. As I said, this
works well under sunos 4.1.x (2,3,4c).

The problem is that when you rexec in under solaris 2.4, 'who' doesn't show
your hostname like it does under sunos 4.1.x. I don't have a hostname to
parse, so I get a NULL $DISPLAY variable and then olwm fails.

'man who' doesn't seem to give the info that I want, or I'm reading it badly.
I might be able to get something from netstat, but I'd like to avoid that at
all costs. :)

Am I going about this the wrong way? Does someone have something that works?
Is this related to the general utmp problems associated with solaris?

Thanks, Geoff

---
Geoff LeBoldus  

 
 
 

rexec and hostname in solaris 2.4?

Post by Meister Mar » Sat, 10 Feb 1996 04:00:00



> The problem is that when you rexec in under solaris 2.4, 'who' doesn't show
> your hostname like it does under sunos 4.1.x. I don't have a hostname to
> parse, so I get a NULL $DISPLAY variable and then olwm fails.

To get the hosname:
uname -n

Greets
Musty
--


      Hohgantweg 6     |WWW   http://www.isbiel.ch/~meism/e.html
      CH-3661 Uetendorf|Forgot something? Add these: :-) ;-) >:-/ 8->
Voice Uetendorf: +41 (0)33 45 41 14; Biel: 032 42 58 21; Bern: 031 338
45 32

 
 
 

rexec and hostname in solaris 2.4?

Post by Geoff LeBold » Sat, 10 Feb 1996 04:00:00




>> The problem is that when you rexec in under solaris 2.4, 'who' doesn't
show
>> your hostname like it does under sunos 4.1.x. I don't have a hostname to
>> parse, so I get a NULL $DISPLAY variable and then olwm fails.

>To get the hosname:
>uname -n

Perhaps I didn't explain it well enough. The hostname of the Sun is
not what I'm looking for. I need the hostname of the PC that I'm
coming from.

When I telnet in to the solaris box I and do a who I get this...

leboldug   pts/5        Feb  9 12:00    (Leboldus.CCS.QueensU.CA)

If I rexec into the solaris box and do a who I get this...

leboldug   pts/5        Feb  9 12:00    

ie: I can't tell where I'm coming from...

Is there another way other than who?

--
Geoff LeBoldus  

 
 
 

rexec and hostname in solaris 2.4?

Post by Pete Houst » Tue, 13 Feb 1996 04:00:00




>Perhaps I didn't explain it well enough. The hostname of the Sun is
>not what I'm looking for. I need the hostname of the PC that I'm
>coming from.

Can't test this with rexec (coz ours is bust), but with telnet/rlogin
you can use netstat on Solaris to get the remote host info.

                        Pete
--

WWW: http://sable.ox.ac.uk/~phouston/ | Opinions are mine.
Phone: +44-1865-792542                | Facts are everyone's.
Fax:   +44-1865-58817                 |

 
 
 

1. solaris 2.4 sparc and hostname interfaces

I had someone tell me that it was possible to setup a hostname.le0
with more virtual interfaces, ie hostname.le0:1, which could be used
to setup virtual interfaces that could be used with httpd.
I read some info on it at Apaches home page, but couldn't figure out
how to ge these interfaces to work. I can manually setup a inteface,
but upon boot, it doesn't configure, and or give me an error msg.
I was wondering on where I might look on how to do this.

Thank


2. Finding PCI cards added after boot?

3. Hostname change on Solaris 2.4

4. Some kind of record...

5. Wu-ftpd 2.4 under Solaris 2.4

6. iexplorer & ssl : "error in secure channel support"

7. REXEC client in Java (please help if you're familiar with REXEC programming)

8. Ports for "public NFS"...

9. Matrox Mystique ands X.

10. PPP on Solaris 2.4 for Sparc, Matrox PCI Millenium Card under Solaris 2.5 x86

11. Solaris 2.4 vs. Solaris 2.3

12. Jumpstart Question: Solaris 2.6 vs Solaris 2.4

13. Solaris 2.4 x86: How to sync Solaris and CMOS time?