looi@sutro.SFSU.EDU (06/03/91)
I apologize if the above question has been asked and answered. Let's assume that the localhost is 'devlgw' and the remotehost is 'devlds' respectively. When I login to remote host (at the initial login window on a Xstation given by a prompt that says, "Enter hostname (devlgw): " and then have my .profile invoke xinit script, the window manager will fire up on the remotehost rather than on my Xstation. Can someone please help me what I have to do to make the window manager appears on my Xstation instead of the remotehost when I perform a remote login on the Xstation's login window? Any help will be greatly appreciated.
rudy@chukran.austin.ibm.com (Rudy Chukran) (06/04/91)
> When I login to remote host (at the initial login window on a Xstation > given by a prompt that says, "Enter hostname (devlgw): " and then have > my .profile invoke xinit script, the window manager will fire up on the > remotehost rather than on my Xstation. Can someone please help me what I > have to do to make the window manager appears on my Xstation instead of > the remotehost when I perform a remote login on the Xstation's login > window? Any help will be greatly appreciated. I havent seen this behaviour, but I suspect the DISPLAY variable either isnt getting set in the first place (login should do this) or it is getting overridden. Id suggest some debugging echoes in your .profile to see what the value of DISPLAY is. ********************************************************************* IBM AIX Porting Center | RSCS: CHUKRAN at AUSTIN 11400 Burnet Rd. | AWDnet: rudy@chukran.austin.ibm.com Internal ZIP 2830 | internet: chukran@austin.iinus1.ibm.com Austin, Texas 78758 | Voice: 512-838-4674 Tieline: 678-4674 *********************************************************************
geo@george.austin.ibm.com (06/04/91)
In article <2#VUMFW@linac.fnal.gov>, looi@sutro.SFSU.EDU writes: > > Let's assume that the localhost is 'devlgw' and the remotehost is > 'devlds' respectively. > > When I login to remote host (at the initial login window on a Xstation > given by a prompt that says, "Enter hostname (devlgw): " and then have > my .profile invoke xinit script, the window manager will fire up on the > remotehost rather than on my Xstation. Can someone please help me what I > have to do to make the window manager appears on my Xstation instead of > the remotehost when I perform a remote login on the Xstation's login > window? Any help will be greatly appreciated. First. Do not execute xinit from an Xstation. X is already running on the Xstation by virtue of the boot program from the Xstation manager. If you are running version 3005 or later of the operating system and have chosen to load X11-R4 on your Xstation (a good choice IMHO), and then run xinit when you log in, you will get a memory conflict error (or some such...) due to the different versions of X11 that you are running: R4 on the Xstation and trying to superimpose R3 from the RS/6000. Put all of your login in programs in your .profile on the remotehost (or whatever login profile file that you choose to use...). NOW. To get all this to happen on the correct display (attached to your Xstation), put the following lines near the beginning of your .profile (name of Xstation is 'devlx'): DISPLAY=devlx:0 export DISPLAY This tells the remote system where the display associated with this session is. Of course, if you use this login from another terminal, the output will still be displayed on the Xstation, so you may want to get more clever than putting this in the .profile. You may just want to create a small executable shell script that you run after you log in from the Xstation, that starts the right programs and establishes the display. Such a file may look like: #! /bin/ksh # Start Xstation programs # # Define Xstation Display (Xstation netname="devlx" in this case) DISPLAY=devlx:0 export DISPLAY typeset PS1='$LOGNAME@$HOST:${PWD} \> ' export PS1 set -o emacs #### Turn off screen saver /usr/lpp/x_st_mgr/bin/xset s 0 #### Set Background Color ##### xsetroot -solid NavyBlue #*********** Start Initial Programs***************************** #### Clock xclock =-0+0 -fg Blue -bg Wheat -hd CadetBlue -hl Blue & #### Mailbox monitor /usr/lpp/X11/Xamples/bin/xbiff -geometry =112x100-0+0 -file /usr/mail/$LOGNAME \ -update 10 -n mail -fg MediumBlue -bg white& #### News Monitor Program /afs/austin/local/bin/xrn & #### Second Shell Window aixterm =80x25+0-0 -fg Wheat -bg SkyBlue & #### Start window manager mwm & ************** End example Notice that I started mwm (the window manager) last. It's not critical that I know of; some like to start it first. Whatever you like. I hope this helps. Sincerely, George Noren My opinions, of course... +-------------------------+--------------------------------+----------------+ |AWD Early Systems Support| AIX : geo@george.austin.ibm.com|PH: 512/838-4930| |IBM Austin - Zip 2830 | VNET: GEORGE at AUSVMQ |TL: 678-4930 | +-------------------------+--------------------------------+----------------+
looi@sutro.SFSU.EDU (W. W. Looi) (06/04/91)
In article <8149@awdprime.UUCP> geo@george.austin.ibm.com () writes: > > [partial text deleted] > If you look at the login script in /usr/lpp/x_st_mgr/bin/login the DISPLAY and XSTATION variables get exported in the /usr/lpp/x_st_mgr/bin/x_st_mgrd.cf by the "boot" program. And then, if you do a remote login at the Xstation login window, the login script will do a su nobody ; -c "rlogin $host -l $logname" the DISPLAY and XSTATION don't get passed down, thus make the window manager appears on the remotehost instead of the Xstation. >NOW. To get all this to happen on the correct display (attached to your >Xstation), >put the following lines near the beginning of your .profile (name of >Xstation is 'devlx'): > The solution you provided [by hardcoding the DISPLAY name in the remotehost's .profile] only works for one Xstation. I had the chance to muck around with the login script, and came out with a general solution. That's I do a remote copy of the DISPLAY [hence XSTATION] value to the remotehost's /tmp/DISPLAY, and then have my remotehost's .profile invoke a little script to manipulate the correct DISPLAY and XSTATION values. It's an interim hack, but it works for us. Pls email me if you're interested in my script. >DISPLAY=devlx:0 >export DISPLAY > >This tells the remote system where the display associated with this >session is. Of course, >if you use this login from another terminal, the output will still be >displayed on the Xstation, >so you may want to get more clever than putting this in the .profile. >You may just want to >create a small executable shell script that you run after you log in >from the Xstation, that >starts the right programs and establishes the display. Such a file may >look like: > >#! /bin/ksh ># Start Xstation programs ># ># Define Xstation Display (Xstation netname="devlx" in this case) >DISPLAY=devlx:0 >export DISPLAY >typeset PS1='$LOGNAME@$HOST:${PWD} \> ' >export PS1 > >set -o emacs >#### Turn off screen saver >/usr/lpp/x_st_mgr/bin/xset s 0 >#### Set Background Color ##### >xsetroot -solid NavyBlue >#*********** Start Initial Programs***************************** >#### Clock >xclock =-0+0 -fg Blue -bg Wheat -hd CadetBlue -hl Blue & >#### Mailbox monitor >/usr/lpp/X11/Xamples/bin/xbiff -geometry =112x100-0+0 -file >/usr/mail/$LOGNAME \ >-update 10 -n mail -fg MediumBlue -bg white& >#### News Monitor Program >/afs/austin/local/bin/xrn & >#### Second Shell Window >aixterm =80x25+0-0 -fg Wheat -bg SkyBlue & >#### Start window manager >mwm & > > >************** End example > >Notice that I started mwm (the window manager) last. It's not critical >that I know >of; some like to start it first. Whatever you like. I hope this helps. > > >Sincerely, >George Noren > >My opinions, of course... >+-------------------------+--------------------------------+----------------+ >|AWD Early Systems Support| AIX : geo@george.austin.ibm.com|PH: 512/838-4930| >|IBM Austin - Zip 2830 | VNET: GEORGE at AUSVMQ |TL: 678-4930 | >+-------------------------+--------------------------------+----------------+