LPD error - bad hostname RH7.3
I have an epson color 880 that I had setup and working in RH7.3, but when I moved to school, I now get a hostname assigned when my computer logs onto the network (didn't have this setup on my home network). Now, I am trying to get my printer to work again, and I get:
[kl2001@{ip} kl2001]$ lpq Get_local_host: hostname '**-***-***-***.xxx.xx.xxxxxxxx.xxx' bad [kl2001@{ip} kl2001]$ I tried manually setting a hostname in my /etc/sysconfig/network file, but to no avail, just get the same error, but instead of my IP, I get my chosen hostname in the error. I tried re-installing the printer (gui) before I typed lpq into the console and saw this error, as the gui doesn't report the error, just that it can't send data to the printer. Any help would be appreciated. Thank you in advance. :Pengy: |
sounds like you are trying to use an invalid name
|
the hostname is assigned by the ISP... can I force a valid localhost somehow???
|
run this command:
hostname Then edit /etc/hosts and set you 127.0.0.1 line to this: # this is just one line 127.0.0.1 localhost.localdomain localhost localhost output_of_the_hostname_command Save the file and run this: /sbin/service lpd restart |
great, it's working now, but won't I get the error again if I get assigned a different IP by my ISP??? is there a way to use wildcards to nake it so I don't have to re-do this each time I get a new IP?
|
the 127.0.0.1 will never change
|
no, that won't, but the results from hostname will, which is assigned by my ISP, and consists of my IP plus thier domain (i.e. 192.168.122.255.charter.com)
|
bummer
try it like this 127.0.0.1 localhost.localdomain localhost localhost $HOSTNAME I dont know if it will work but I guess it's worth a try |
No joy on the $HOSTNAME entry...looks like I will just have to change the file, or try to retain my IP address....
|
one other way is to have the file built like so
echo 127.0.0.1 localhost.localhost localhost $HOSTNAME > /etc/hosts put the command in rc.local if you connect on boot if not run it as a script after connecting |
that looks like it might work, we'll see if it holds up when my ISP changes IPs
|
All times are GMT -5. The time now is 12:03 PM. |