Solved

xdm login window - no hostname

Posted on 1998-06-23
15
418 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Are You Using the Best Web Development Editor?

The worlds of web hosting and web development are constantly evolving. Every year we see design trends change, coding standards adapt and new frameworks/CMS created. With such a quick pace of change it’s easy to get lost trying to keep up.

See if your editor made the list.

 

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
 
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

Congratulations! You’re Certified – Now What?

Starting a new career can be overwhelming. Becoming certified in your field of expertise is a great start, but where do you go from here?  Here are some tips to help you on your career journey.

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…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

627 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