Link to home
Start Free TrialLog in
Avatar of Nick
Nick

asked on

xhost and stdin problem

OK, unless I set xhost +localhost prior to dialing-up (this solution obtained from here), I cannot start any processes. It appears to be a permissions/ownership problem somewhere. Also, when a user telnets in, this error message appears:-
xhost: unable to open display "" 
Now, I have also noticed that when I shutdown, this message:-

stdin: is not a tty

is displayed as the first entry on the shutdown screen (sometimes more than once, i.e. multiple entries), but not in sys logs?
Now, after a bit of poking around, I believe these are related.

Ideas, anyone?

Thanks,

Nick
Avatar of bernardh
bernardh

localhost should be defined in the /etc/hosts file of the server you are connecting.

telnet to the server

another thing to check is the DISPLAY setting:

# DISPLAY=localhost:0;export DISPLAY

to test: run any x-based command,

# x_application -display localhost:0

you may also try to replace localhost with the IP address, if the server you are trying to connect also act as DHCP server

Avatar of Nick

ASKER

Adjusted points to 150
Avatar of Nick

ASKER

OK, I apologise...  I didn't give enough info.

I have the localhost defined correctly (I think) in my Linux box's host file:-

127.0.0.1      localhost
192.168.1.21      486Linux
192.168.1.20      AMD-K6_233

I dial up through my Linux box, acting as gateway for my local network (private, me and my neighbour).  The Linux machine is acting as Samba server, gateway (ipchains) and  IP masquerading (plus now Apache, IRC, FTP servers)

(here if you want to see:-
http://www.nickw.co.uk/network.htm )

So, the forgetting all that, lets just look at the Linux machine.

I dial-in to my ISP and all connects fine... (better than A Win connection any day :-) ).  BUT, unless I set xhost +localhosts <i>prior</i> to dialing in, I cannot start any process whilst on line.

I also get the DISPLAY error also if I try to set xhost +localhosts from a console whilst on-line (without setting previously).

Incidently, if I do not set xhosts +localhost prior to dial-up, Samba also fails to work whilst on line.

**Phew**

Thanks,

Nick
The reason that you have to do "xhost +localhost" before dialing up is that the system's hostname changes from what it was at boot (localhost) to whatever the IP it gets when dialed up resolves to. X implements a security feature that prevents someone else from taking over your display and/or keyboard by only talking to the hostname it was started from.

To avoid having to remember to type it in every time you can create the file /etc/X0.hosts and put "localhost" in the file.
Avatar of Nick

ASKER

Right, I can understand that bit, but surely every Linux machine doesn't have this problem - i.e. not being able to launch any process(es) when the machine is connected via ppp dial-up?  You would never live with it!

And I still get the DISPLAY error even after setting localhost via telnet. Here is the full script immediately after logging in (and with the instructions being carried out from Bernard:-

xhost:  unable to open display ""
[prompt]$ #DISPLAY=localhost:0;export DISPLAY
[prompt]$ netscape -display localhost:0
Xlib: connection to "localhost:0.0" refused by server
Xlib: Client is not authorized to connect to Server
Error: Can't open display: localhost:0

And what about this stdin message? (If they are not related I will post a fresh question)

Cheers,
Nick
Well, that's a different situation. The X server in that case is on the machine you are telneting out of and you have to tell the X server to allow the remote host access. You have to tell the remote system where the display is. As example, This is what I'd do and see it I telnet from my local machine to a remote system and star an X app on the remote that I want displayed locally. I happen to know what my local machine name is (wilowisp), but for the example I'll pretend that it's connecting over a dial-up:

levie> hostname
localhost
levie> xhost +asgard.server.com
  (dial-up the remote and get on-line)
levie> telnet asgard.server.com
Trying 192.168.0.1...
Connected to asgard.
Escape character is '^]'.


SunOS 5.6

login: levie
Password:
Last login: Wed Mar  8 07:31:27 from du11.server.com
levie> who
root       console      Dec  7 16:10    (:0)
root       pts/4        Dec  7 16:10    (:0.0)
levie      pts/3        Mar  8 14:16    (du23.server.com)
root       pts/5        Jan  5 13:23    (:0.0)
levie> DISPLAY=du23.server.com:0; export DISPLAY
levie> xterm &

If you follow that you'll see that I told my laptop's X server it was to allow the remote "asgard.server.com" access. Then after loggin in on the remote I used "who" to find out what the remote thought my local machines name is and used that in setting DISPLAY. As a result of that sequence, the local machine knows to accept (via xhost +) the data that the remote knows where to send (via DISPLAY).
Greetings.

There is an option to avoid setting your hostname from the IP of the interface you bring up with ppp. Assuming you're doing it with kppp, that's a check box <somewhere> in the options. If you're using some other dialer (or possibly a script) check the configuration of that.

Other ways to get back the expected behaviour (in case you cant locate the right switch), are:

i) get off X and back in (if using kppp, that'll also kill your connection - not good);

ii) or, reset your hostanme to its prior value - you have to do it manually, and it's inconvenient.

Cheers,
    alf


Avatar of Nick

ASKER

Thanks Alf, yep there is an option in the set-up of kppp, and that works the same as xhost +localhost.

Thanks, jlevie, as that display giggery pokery worked as well.

Now, who do I award the points?

I will resolve that issue on the following:-

What is the 'stdin is not a tty' message.  This is surely to do with the x-server, and has got to be related to the other problems I have had?

(i.e. from what I have read, the standard input on the screen is somewhere being assigned as a device, when it shouldn't??)

Thanks,
Nick

Regarding the "stdin is not a tty" message. This is happening on your local Linux box when shutting down the system, right? Which Linux are you running, how are you starting the X server, and how are you invoking shutdown?
Avatar of Nick

ASKER

Yep, right...
The kernel build is:-
2.2.13-7mdk (Mandrake Deluxe Linux)
The X-Server starts from boot (inittab ? as xdm ??).
I shut down via KDE.

The message is found on the screen 'after' the messages that were there from booting up (i.e. the status as each process is started)... so I am not sure if it is recorded on 'shutting down', or the last entry from booting-up.  The X-Server starts last, I believe (?), and the messages reported on the screen move so fast I cannot read them, so I only ever see them to peruse when shutting down - so this stdin message may be there from boot-up.

I hope you understand my ramblings ;-)

Cheers,
Nick
Have a look in /var/log/messages and see if it's logged there. It may or may not be depending on where it's coming from.

By "shutdown via KDE" I assume you mean that you logout and then start the shutdown from the session manager panel, right?

You can find out if it's coming from the boot process or the X server by commenting out the line in inittab that re-spans the X server. And once you see the tail of the boot up, you can start the X server manually with "startx".

Something that I've found to be plus is to put the console in VGA mode to get more lines on the screen. Add "vga=792" to /etc/lilo.conf and run lilo to install the config. I always modify the lilo conf to add a "safe boot" seciton and only put the "vga" setting in the default boot section...
Avatar of Nick

ASKER

Ok, as I said in I have no system log of what is doing it.  Apeended after this is my full shut-down and restart log.

Yes, I do shut down as per KDE session manger panel.

I will experiment tomorrow with the conf changes.

Thanks,
Nick.

Mar 10 13:43:55 486Linux PAM_pwdb[502]: (kde) session closed for user root
Mar 10 13:44:35 486Linux xfs: xfs shutdown succeeded
Mar 10 13:44:38 486Linux httpd: httpd shutdown succeeded
Mar 10 13:44:38 486Linux sound: Saving sound configuration:
Mar 10 13:44:39 486Linux sound: sound
Mar 10 13:44:39 486Linux sound:
Mar 10 13:44:39 486Linux rc: Stopping sound succeeded
Mar 10 13:44:41 486Linux smb: smbd shutdown succeeded
Mar 10 13:44:42 486Linux smb: nmbd shutdown succeeded
Mar 10 13:44:44 486Linux inet: inetd shutdown succeeded
Mar 10 13:44:46 486Linux crond: crond shutdown succeeded
Mar 10 13:44:47 486Linux kernel: Kernel logging (proc) stopped.
Mar 10 13:44:47 486Linux kernel: Kernel log daemon terminating.
Mar 10 13:44:49 486Linux syslog: klogd shutdown succeeded
Mar 10 13:44:50 486Linux exiting on signal 15
Mar 10 13:51:22 486Linux syslogd 1.3-3: restart.
Mar 10 13:51:22 486Linux syslog: syslogd startup succeeded
Mar 10 13:51:22 486Linux kernel: klogd 1.3-3, log source = /proc/kmsg started.
Mar 10 13:51:22 486Linux kernel: Inspecting /boot/System.map-2.2.13-7mdk
Mar 10 13:51:23 486Linux syslog: klogd startup succeeded
Mar 10 13:50:51 486Linux rc.sysinit: Finding module dependencies succeeded
Mar 10 13:50:53 486Linux rc.sysinit: Loading sound module succeeded
Mar 10 13:50:54 486Linux rc.sysinit: Loading midi module succeeded
Mar 10 13:50:55 486Linux rc.sysinit: Checking filesystems succeeded
Mar 10 13:51:00 486Linux rc.sysinit: Mounting local filesystems succeeded
Mar 10 13:51:00 486Linux rc.sysinit: Turning on user and group quotas for local filesystems succeeded
Mar 10 13:51:02 486Linux rc.sysinit: Enabling swap space succeeded
Mar 10 13:51:03 486Linux mandrake_everytime: Building KDM sessions succeeded
Mar 10 13:51:05 486Linux init: Entering runlevel: 5
Mar 10 13:51:08 486Linux apmd: WARNING:
Mar 10 13:51:08 486Linux apmd:   apmd's internal clock setting has been replaced by the apmd_proxy!
Mar 10 13:51:08 486Linux apmd:   To set the clock to UTC, you must edit the apmd_proxy program.
Mar 10 13:51:08 486Linux apmd:  
Mar 10 13:51:08 486Linux apmd[131]: Version 3.0beta8 (APM BIOS 1.1, Linux driver 1.9)
Mar 10 13:51:09 486Linux apmd: apmd startup succeeded
Mar 10 13:51:10 486Linux network: Enabling IPv4 packet forwarding succeeded
Mar 10 13:51:12 486Linux ifup: SIOCADDRT: Invalid argument
Mar 10 13:51:13 486Linux network: Bringing up interface lo succeeded
Mar 10 13:51:15 486Linux ifup: SIOCADDRT: Invalid argument
Mar 10 13:51:16 486Linux network: Bringing up interface eth0 succeeded
Mar 10 13:51:18 486Linux portmap: portmap startup succeeded
Mar 10 13:51:19 486Linux netfs: Mounting other filesystems succeeded
Mar 10 13:51:20 486Linux random: Initializing random number generator succeeded
Mar 10 13:51:26 486Linux crond: crond startup succeeded
Mar 10 13:51:27 486Linux kernel: Loaded 5998 symbols from /boot/System.map-2.2.13-7mdk.
Mar 10 13:51:27 486Linux kernel: Symbols match kernel version 2.2.13.
Mar 10 13:51:27 486Linux kernel: Loaded 146 symbols from 8 modules.
Mar 10 13:51:27 486Linux kernel: Linux version 2.2.13-7mdk (root@kenobi.mandrakesoft.com) (gcc version 2.95.1 19990816 (release)) #1 Wed Sep 15 18:02:18 CEST 1999
Mar 10 13:51:27 486Linux kernel: Console: colour VGA+ 80x25
Mar 10 13:51:27 486Linux kernel: Calibrating delay loop... 26.62 BogoMIPS
Mar 10 13:51:27 486Linux kernel: Memory: 63064k/65536k available (1044k kernel code, 416k reserved, 952k data, 60k init)
Mar 10 13:51:27 486Linux kernel: Checking if this processor honours the WP bit even in supervisor mode... Ok.
Mar 10 13:51:27 486Linux kernel: VFS: Diskquotas version dquot_6.4.0 initialized
Mar 10 13:51:27 486Linux kernel: CPU: Cyrix Cx486DX2 stepping 04
Mar 10 13:51:27 486Linux kernel: Checking 386/387 coupling... OK, FPU using exception 16 error reporting.
Mar 10 13:51:27 486Linux kernel: Checking 'hlt' instruction... OK.
Mar 10 13:51:27 486Linux kernel: POSIX conformance testing by UNIFIX
Mar 10 13:51:27 486Linux kernel: PCI: No PCI bus detected
Mar 10 13:51:27 486Linux kernel: Linux NET4.0 for Linux 2.2
Mar 10 13:51:27 486Linux kernel: Based upon Swansea University Computer Society NET3.039
Mar 10 13:51:27 486Linux kernel: NET4: Unix domain sockets 1.0 for Linux NET4.0.
Mar 10 13:51:27 486Linux kernel: NET4: Linux TCP/IP 1.0 for NET4.0
Mar 10 13:51:27 486Linux kernel: IP Protocols: ICMP, UDP, TCP, IGMP
Mar 10 13:51:27 486Linux kernel: Initializing RT netlink socket
Mar 10 13:51:27 486Linux kernel: Starting kswapd v 1.5  
Mar 10 13:51:27 486Linux kernel: Detected PS/2 Mouse Port.
Mar 10 13:51:27 486Linux kernel: Serial driver version 4.27 with MANY_PORTS MULTIPORT SHARE_IRQ enabled
Mar 10 13:51:27 486Linux kernel: ttyS00 at 0x03f8 (irq = 4) is a 16450
Mar 10 13:51:27 486Linux kernel: ttyS01 at 0x02f8 (irq = 3) is a 16450
Mar 10 13:51:27 486Linux kernel: ttyS03 at 0x02e8 (irq = 3) is a 16550A
Mar 10 13:51:27 486Linux kernel: pty: 256 Unix98 ptys configured
Mar 10 13:51:27 486Linux kernel: apm: BIOS version 1.1 Flags 0x03 (Driver version 1.9)
Mar 10 13:51:27 486Linux kernel: Real Time Clock Driver v1.09
Mar 10 13:51:27 486Linux kernel: RAM disk driver initialized:  16 RAM disks of 4096K size
Mar 10 13:51:27 486Linux kernel: hda: Maxtor 83500A4, ATA DISK drive
Mar 10 13:51:27 486Linux kernel: hdb: FX810T4, ATAPI CDROM drive
Mar 10 13:51:27 486Linux kernel: ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
Mar 10 13:51:27 486Linux kernel: hda: Maxtor 83500A4, 3339MB w/256kB Cache, CHS=7237/15/63
Mar 10 13:51:27 486Linux kernel: hdb: ATAPI 8X CD-ROM drive, 256kB Cache
Mar 10 13:51:27 486Linux kernel: Uniform CDROM driver Revision: 2.55
Mar 10 13:51:27 486Linux kernel: Floppy drive(s): fd0 is 1.44M
Mar 10 13:51:27 486Linux kernel: FDC 0 is an 8272A
Mar 10 13:51:27 486Linux kernel: md driver 0.36.6 MAX_MD_DEV=4, MAX_REAL=8
Mar 10 13:51:27 486Linux kernel: scsi : 0 hosts.
Mar 10 13:51:27 486Linux kernel: scsi : detected total.
Mar 10 13:51:27 486Linux kernel: Partition check:
Mar 10 13:51:27 486Linux kernel:  hda: hda1 hda2 hda3
Mar 10 13:51:27 486Linux kernel: VFS: Mounted root (ext2 filesystem) readonly.
Mar 10 13:51:27 486Linux kernel: Freeing unused kernel memory: 60k freed
Mar 10 13:51:27 486Linux kernel: Adding Swap: 131312k swap-space (priority -1)
Mar 10 13:51:27 486Linux kernel: ad1848/cs4248 codec driver Copyright (C) by Hannu Savolainen 1993-1996
Mar 10 13:51:27 486Linux kernel: YM3812 and OPL-3 driver Copyright (C) by Hannu Savolainen, Rob Hooft 1993-1996
Mar 10 13:51:27 486Linux kernel: eth0: 3c509 at 0x300 tag 1, 10baseT port, address  00 a0 24 41 ed a1, IRQ 10.
Mar 10 13:51:27 486Linux kernel: 3c509.c:1.16 (2.2) 2/3/98 becker@cesdis.gsfc.nasa.gov.
Mar 10 13:51:27 486Linux kernel: eth0: Setting Rx mode to 1 addresses.
Mar 10 13:51:28 486Linux inet: inetd startup succeeded
Mar 10 13:51:28 486Linux keytable: Loading keymap:
Mar 10 13:51:29 486Linux keytable: Loading /usr/lib/kbd/keymaps/i386/qwerty/uk.kmap.gz
Mar 10 13:51:30 486Linux keytable: Loading system font:
Mar 10 13:51:30 486Linux rc: Starting keytable succeeded
Mar 10 13:51:33 486Linux httpd: httpd startup succeeded
Mar 10 13:51:34 486Linux sound: Starting sound configuration:
Mar 10 13:51:34 486Linux sound: sound
Mar 10 13:51:34 486Linux sound:
Mar 10 13:51:35 486Linux rc: Starting sound succeeded
Mar 10 13:51:37 486Linux PAM_pwdb[435]: (su) session opened for user xfs by (uid=100)
Mar 10 13:51:38 486Linux PAM_pwdb[435]: (su) session closed for user xfs
Mar 10 13:51:38 486Linux xfs: xfs startup succeeded
Mar 10 13:51:41 486Linux smb: smbd startup succeeded
Mar 10 13:51:43 486Linux smb: nmbd startup succeeded
Mar 10 13:51:43 486Linux linuxconf: Linuxconf final setup
Mar 10 13:51:47 486Linux rc: Starting linuxconf succeeded
Mar 10 13:51:47 486Linux rc: Starting local succeeded
Yeah, I was afraid it wouldn't be logged, but there was a chance that something might have been logged that would have provided a clue.

Try the cahnge to inittab an see what happens...
Avatar of Nick

ASKER

OK, I looked at that, and an interesting observation happened.
First, there is no 'stdin is not a tty' message before x starts, so I presume this message occurs at shutdown?
Secondly, when I logged in PRIOR to starting x, I got this message [again]:-
xhost cannot connect to display.

Something is not quiet right, although other than these messages I have np's.

Re the lilo conf and change to the VGA mode, I never done this as
the problem I have in 'reading' it on boot is not screen size, but the
speed that the messages go by as x starts.

Nearly there I think... I am learning at the time.

Thanks,
Nick
The xhost error when manually starting X is probably a significant clue as to what's happening, if we can figure out why it happens. With X auto start disabled, execute "hostname" and see what it returns.

The point in increasing the lines on the console screen via the vga set is that a lot more lines means that it takes longer to scroll them off the top, thus giving you more time to look at them.
Avatar of Nick

ASKER

Right, the hostname command without X started returns 486Linux, which is correct.

I reconfigured lilo, and created another boot image section, keeping the 'original' one as default 'safe boot'... [great and easy idea!].  I think you have earnt the points with that concept alone, as I have never bothered reading up on lilo due to the fact that I do not have a dual boot with Windoze (Why, WHy, WHY does anyone want to do that, anyway? :-) ).  I never realised it was such a  powerful boot-up script.  I used 'vga = ask' in the 'experimental' boot image, and selected a higher res screen, but when X starts it scrolls so fast I can't read it (all over in about ¼ sec).

OK, I still get this 'xhost can't open DISPLAY"" ' message.

Some more points:-

When I log-in with X started, I get 'new mail'.  This reports a X-Cron error message about /sbin:/bin:/usr/sbin:/usr/bin then some path name to <filename>.bz2 is not a recognized file  ?? (2 files are here).  I mention this briefly (I am recalling from my head, I didn't write it down) as this may lead to a fresh question.

Also, I am now convinced that somewhere the X server hasn't got the rights to open the DISPLAY device[s], so I have been fishing around.  The file /etc/X11/xdm/Xservers contains this:-
#This file should contain an entry to start server on the local display.

The entry within:-
:0 local /usr/X11R6/bin/x

Now, I believe this should contain:-

486Linux:0 local /usr/X11R6/bin/x   ?

I am loathe to change and re-boot in case it all goes pear shaped.

Thanks,
Nick
P.S. The points are yours, jlevie :-)
ASKER CERTIFIED SOLUTION
Avatar of jlevie
jlevie

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Nick

ASKER

Ok, Mr (?) J Levie, sit back, relax, and have a laugh.

If you look at my third post in this thread, you can see I have already got  '127.0.0.1   localhost'  in the hosts file.
Now, you will also see  I have also my machine name (486Linux) as 192.168.1.21, and my Win machine at 1.21.  Now, for love nor money I could not remember why  I entered my Linux machine in it's own hosts file(?) so arrhh I thought, a conflict - and removed all the entries except for '127.0.0.1 localhost' and rebooted.
Then I remembered why I had that entry...smb & nmb failed to start at boot - and it was then that I had the most stupidest thought ever...
"I wonder if the hostname '486Linux' should be IP 127.0.0.1?"... so I changed the hosts file to '127.0.0.1  486Linux', and rebooted again.

====8^(_________)

The KDE log-on window appeared ok, but everytime I logged on it just thought about it for a bit, and then came back to the log-on window again.  I tried all options... another level, failsafe (!)... nothing worked... it just kept coming back to the log-on window.  I rebooted again, and then saw that the X-Server couldn't connect to ANYTHING...

Right, I thought, calm down.  How do I boot-up without X so I can log on and edit the hosts file?  I didn't know (and a rescue boot disc crossed my mind, but that is the ultimate escape).  **Bingo** I will try samba and edit it in Windows :-)  NO Samba isn't working either because of the edited hosts file :-(  ... ummmm...  TELNET !!!!
Yes... I got a connection and logged in while Linux was at the KDE log-on stage.  Right "kedit hosts".....  'Unable to connect to X Server'
Arrrgggghhhhh.
Then panicking, I remembered Vi.  'Vi hosts'  - YES got the file up... Vi?  What NEXT?  :-D

Luckily I have a Windoze version on my Win machine, and fired that up to read the destructions of how to use it... and finally managed to edit the hosts file back to '127.0.0.1 localhost' - I rebooted Linux, and **phew** all booted up OK.

I have now configured it all back to how it was.

Right, I am giving you the points for valiantly trying to help me, as I have learnt a lot from this experience (re lilo!!).  I have decided to understand a lot more about what is going on before I try to correct this problem, as I have said, everything (network, dial-up, ipchains, masquerading, Apache, ircd,telnetd,Proftpd etc.) works great apart from the messages that get reported.

Thankyou,

Nick
P.S.  Watch this space ;-)
P.P.S.  One think I forgot to mention was that the Mandrake Linux Deluxe version I have has RPM's compiled for a i586... so when I installed in on a i486, a lot of the daemons (samba, ppp, apache,ftp,telnet etc..) didn't get installed... I had to get i386 versions for all of them... I reckon somewhere I have a conflict!.

Avatar of Nick

ASKER

Thanks for all your time!!

Nick
Well, you're right, I should have reviewed the prior comments and I would have seen that localhost was properly defined. Darn it, it would have been so simple if that hadn't been there, and it would have made so much sense...

Alright, so far in Linux 102 (Linux 101 is all about learning that there is in fact something other than a Microsoft product...) we've learned about adding a "safe" boot mode to lilo. The next lesson is that you can boot Linux into single user mode and fix most any problem from there. Or at least fix it enough to be able to go to multi-user mode and complete the fix then. To get to single user mode, enter "linux single" at the Lilo prompt. While it should have been covered in Linux 101, learning the rudiments of vi is well worth while, as you've discovered. Both emacs and Xemacs are much more powerful and easier to use, vi still has it's place when you need a dirt simple editor ('cause you can't run the fancy ones).

Since we can't seem to figure out why the system seems to think it can't talk to it's own display (I think it's confused about who it is, but haven't figured out why yet), lets see if we can't work around the problem (there's usually more than one way to do anything in Unix). Create the file /etc/X0.hosts and put these lines in it:

localhost
486linux

and reboot. That should explicitly tell the X server that both localhost and 486linux are allowed to connect. If that still doesn't work, add a line containing "+" to the file, which should allow anyone to connect (it's something of a security hole, but you are already having to open that same hole).

I'm more than a bit surprised that the OS shipped with 586 binaries. I know that RedHat only provides 386 binaries to avoid exactly that kind of problem.

While it has nothing to do with your problem, I'm feeling immensely pleased with myself right now and have to engage in a drive-by gloat. I've just succeeded in rescuing my new Soyo MB and 550mhz AMD K6. Somehow it managed to eat the contents of its flash bios and it looked like I'd have to ship the whole board back. With a little help from my next door neighbor (see http://www.devrs.com to see what he's into) we were able to take the flash prom out and re-load it with the Award bios... and it worked! Right next to it I've got a 500mhz Pentium III and the $220 Soyo/AMD just blows the doors off the Pentium.
Avatar of Nick

ASKER

Whoa... I've done heart transplants before when I upgraded my CPU from a cyrix166 to an AMD-K6 233, but never had the nerve to attempt brain surgery =8^O.  Sounds a good machine!
Re devrs.com... nice little site.. I will keep my eyes on it.  I see with interest that the good ol' Z80 assembler is there... I cut my teeth in the 80's with a ZXSpectrum, and Zacks Z80 bible :-).

Ok, back to the present.  I added the X0.hosts file and tried all the suggestions.  No change.

1.  Telnet in from my Win machine:-
xhost: Cannot open dispaly ""

2.  On shut-down:-

stdin is not a tty.

Same ol' faces.

Now, I have notice when I fire up Kfirewall (IPCHAINS GUI config) the interface lo is assigned 127.0.0.1 (which is correct) but the SM = 255.0.0.0 ???  Is that right (and related to this problem), or does it merit a new question

Cheers,
Nick
I may have gotten confused here, I thought we were talking about having to to "xhost +" when logged onto the console of the Linux box, not from a telnet session. The X0.hosts file only applies to the X apps and sessions when logged directly onto the Linux machine's console.

The "xhost: Cannot open display", in a telnet session sounds like you have the env variable DISPLAY defined in your shell init scripts. A correct DISPLAY var would be appropriate if you are running an X server on the windows box, but otherwise it should be undefined in a telnet session.

A netmask of 255.0.0.0 is correct. 127.0.0.0 is a reserved Class A network.
Avatar of Nick

ASKER

Bloody hell...  running X on a win box.  No I am not... and I thought about that deeply [top of my to-do list tomorrow].  Why is the message relayed at once the telnet connection is made BEFORE doing anything?

I guessed the SM was correct due to the network class, but still can't work out why lo is class A on my set-up (Don't answer, just my wanderings of mind :-)  )

OK, so issue is resolved in so much that I have no problem with xhost logged on to my Linux machine via a console, on or off line.

This thread is declared **Finished**

Thanks,

Nick :-)
The "xhost error" at telnet connection could be something in your shell init files, like starting X automatically at log in or auto-starting some X app. I don't know what shell you are using, if it's bash you'd want to look in .bashrc & .bash_profile. For csh you'd look in .cshrc.

Sudden thought, do you get the "stdin not a tty" on just a startup/shutdown cycle without an remote telnet access?
The reason I ask is that if there was a telnet session involved and it did try to start some X app, that app could have hung. Since the telnet session would have been closed before shutdown, the app wouldn't have a tty associated with it and, well if there's no tty for stdin...
Avatar of Nick

ASKER

*BINGO** Big time... I sorted it!!!

Right, to keep it short... I was told when this problem became apparent to add
xhost +localhost
to my bash.rc file...  I did, in the global one (Doh!).
I removed it... NO MORE ERROR messages :-)
Next, I added (from the Linux host) my Win machine:-
xhost +AMD-K6_233 (why did I call it that - too much/awkward to type now!)?
And now, when I telnet in and try to run an X session (i.e. netscape), I get the EXPECTED error of  XLIB....connection error etc..  because I am not running an X-server on Windows... Yippee, this is what I have been expecting to see :-)... and all other non-X processes work :-)

Secondly, I used the option in Kppp to 'turn off' allowing my dial-up DHCP IP to become host, so therefore all processes will start when I am on-line (this is where this war and peace thread really started).

One last question... is there a recommended X-server for Win9* (freeware, of course) - nothing fancy required?

I have looked, but to no avail.

Thanks for all your help... got there in the end.

Nick
The last time I looked, about three months ago, I couldn't find any GOOD free X servers for windows. There were a couple that looked like they might promise when they mature a bit more. I didn't think to save a bookmark to them (I've too many as it is).