Solved

xdm login window - no hostname

Posted on 1998-06-23
15
412 Views
Last Modified: 2010-03-18
I have a linux box (Redhat 5) running xdm.
When I log in from a Win 95 xserver, the xlogin window shows the hostname as '1' instead of its correct name.
I believe the name is supposed to come from the file etc/X11/xdm/Xresources, where the line
xlogin*greeting: CLIENTHOST appears - I believe this is supposed to be replaced with the correct line by Xsetup.
As far as I can tell, other files appear to be correct.
0
Comment
Question by:argo
15 Comments
 

Expert Comment

by:xilef
ID: 1584577
Do the commands "uname -n" and/or "hostname" report the right name?

0
 

Author Comment

by:argo
ID: 1584578
Yes, the commands return the correct hostname.
0
 
LVL 1

Expert Comment

by:henckens
ID: 1584579
Did you enter the hostname in /etc/HOSTNAME ?
0
 

Author Comment

by:argo
ID: 1584580
the hostname is correct in etc/HOSTNAME
0
 

Author Comment

by:argo
ID: 1584581
Increased points to 300
0
 
LVL 3

Expert Comment

by:marcelofr
ID: 1584582
the output of

# hostname -f

is correct? what if you "dig(1)" a bit?


0
 

Author Comment

by:argo
ID: 1584583

host name -f returns the correct name

what commands would you like me to enter within dig?
0
Give your grad a cloud of their own!

With up to 8TB of storage, give your favorite graduate their own personal cloud to centralize all their photos, videos and music in one safe place. They can save, sync and share all their stuff, and automatic photo backup helps free up space on their smartphone and tablet.

 
LVL 1

Expert Comment

by:chytrace
ID: 1584584
Coud you please send me the contents of the following files ?:
/etc/hosts
/usr/lib/X11/xdm/Xservers
/usr/lib/X11/xdm/Xresources
/etc/sysconfig/network

Regards
               Radovan
0
 

Expert Comment

by:spjuver
ID: 1584585
I don't understand theproblem issue. What is a 'Win 95 xserver'??
Do you use a X-emulator on a win 95 machine as X-client to a Linux-server??
Or do you use the win-95-look fvwm95 at the same machine??
0
 
LVL 1

Expert Comment

by:stormerider
ID: 1584586
Also, is it a possibility that you are getting the X display # rather than the hostname? Ie,
default on machine would be machine:0 for display, the next would be machine:1... does the client X viewer show you the display #? Have you tried another X client viewer on 95?


0
 

Author Comment

by:argo
ID: 1584587
This might be true - I am getting a '1' as the name, even if true, I cannot understand why only one of my three Linux machines does it.

Yes, I have tried Exceed 6, a demo copy of X-Win32 and MI/X - all with the same result.

0
 
LVL 2

Expert Comment

by:JYoungman
ID: 1584588
The xdm configuration file is loaded via xrdb.  xrdb passes the input file through the C preprocessor.  The "1" is absolutely typical of what happens when you have a preprocessor macro defined, but with no specified value.  

To investigate this, please run this command:-
echo "foo: CLIENTHOST" | xrdb -n -merge -

This should just say "foo: your-host-name", not "foo: 1".  If it says the latter, run this:-
echo "foo: CLIENTHOST" | strace -f -o TRACE xrdb -n -merge -
and see whar arguments are passed to /lib/cpp in the exec call
("grep exec TRACE").

0
 

Author Comment

by:argo
ID: 1584589
The first command does return foo: 1

The second gives

373   execve("/usr/X11R6/bin/xrdb", ["xrdb", "-n", "-merge"], [/* 20 vars */]) = 0
374   execve("/bin/sh", ["sh", "-c", "/lib/cpp -traditional -Dlinux -D"...], [/* 20 vars */]) = 0
374   execve("/lib/cpp", ["/lib/cpp", "-traditional", "-Dlinux", "-D__i386__", "-D_POSIX_C_SOURCE=199309L", "-D_POSIX_SOURCE", "-D_BSD_SOURCE", "-D_SVID_SOURCE", "-DHOST=paul", "-DSERVERHOST=paul", "-DSRVR_paul", "-DDISPLAY_NUM=0", "-DCLIENTHOST=linux", "-DCLNT_linux", "-DVERSION=11", "-DREVISION=0", ...], [/* 20 vars */]) = 0

it appears to contain the correct definition, so I'm still stuck...

0
 
LVL 2

Accepted Solution

by:
JYoungman earned 300 total points
ID: 1584590
Aha!
How funny!  (sorry! :-)

"linux" is ITSELF a macro, which the preprocessor defines with
the value 1.  How awkward.  You could prevent this happeining by passing the option -Ulinux to the /lib/cpp program, but I don't know of a way to do that.

The best solution is to add the line
      #undef linux

to /etc/X11/xdm/Xresources, somewhere before the first
line which references HOSTNAME.

0
 

Author Comment

by:argo
ID: 1584591
It was funny - I didn't even want the box called 'linux' it was just a name I gave it while setting up...

Thanks
0

Featured Post

New! My Passport Wireless Pro Wi-Fi Mobile Storage

Portable wireless storage to offload, edit, and stream anywhere.

High-capacity, wireless mobile storage designed to accompany professional photographers and videographers in the field to easily offload, edit and stream captured photos and high-definition videos.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now