Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
|
04-13-2005, 10:50 AM
|
#1
|
Member
Registered: Jul 2003
Distribution: FC3/GNOME, Slack 10.1
Posts: 31
Rep:
|
localhost.localdomain
I am working with Gnome/Fedora Core 3. Whenever I attempt to login, I get the dialog window:
=============================================
Could not look up internet address for localhost.localdomain
This will prevent GNOME from operating correctly.
It may be possible to correct the problem by adding
localhost.localdomain to the file /etc/hosts
[Log in Anyway] [Try Again]
=============================================
The above is the result of some errant action I took, but I do not know what. I seek guidance on reversing the error and fixing the problem. When I "Log in Anyway", all appears well.
|
|
|
04-13-2005, 10:55 AM
|
#2
|
LQ Guru
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298
Rep:
|
Make sure the localhost.localdomain is in /etc/hosts like below
Code:
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
|
|
|
04-13-2005, 11:50 AM
|
#3
|
Member
Registered: Jul 2003
Distribution: FC3/GNOME, Slack 10.1
Posts: 31
Original Poster
Rep:
|
Reddazz,
What was it that I did to cause this /etc/hosts update to become necessary?
And why did not that [network?] process automatically make the update itself?
|
|
|
04-13-2005, 01:39 PM
|
#4
|
LQ Guru
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298
Rep:
|
I don't know, but its obviously something to do with network configuration. I have noticed that if you use KDE, this error does not show up.
|
|
|
04-13-2005, 02:40 PM
|
#5
|
Member
Registered: Jul 2003
Distribution: FC3/GNOME, Slack 10.1
Posts: 31
Original Poster
Rep:
|
Reddazz,
FWIW, the only network configuration action I took was to create a dialup to my ISP. I surmise that had to be what triggered the condition, but why that process did not also update /etc/hosts is beyond me. In any event, putting the code you provided in /etc/hosts seems to have corrected the matter. Thank you for your assistance.
|
|
|
05-22-2005, 04:55 PM
|
#6
|
Member
Registered: Feb 2005
Distribution: Fedora Core 4 and happy user of KDE 3.5
Posts: 49
Rep:
|
I can't believe it! I am having the same problem, and it started after I created my dial-up account, too. The only difference is my message leaves out the .localdomain part ("Could not look up Internet address for localhost. This will prevent GNOME...")
I tried to fix with reddazz's code, but I can't find the correct file. I tried vi /etc/hosts at the terminal, but I just get a blank page, and I also tried to open it with Nautilus by navigating to /etc and double-clicking the hosts icon, but it says "Unable to access /etc/hosts."
What am I doing wrong?
|
|
|
05-22-2005, 05:06 PM
|
#7
|
Senior Member
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290
|
Your hosts file probably doesn't exist, which would definitely cause this problem. Just open it, type in the line, and then save it.
|
|
|
05-22-2005, 05:13 PM
|
#8
|
LQ Guru
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298
Rep:
|
Try running the network configuration tool and change the host name from there.
|
|
|
05-27-2005, 05:27 PM
|
#9
|
Member
Registered: Feb 2005
Distribution: Fedora Core 4 and happy user of KDE 3.5
Posts: 49
Rep:
|
Thank you both for your posts. It's great to have the help. Would the best method for creating the file be to use vi from the terminal, add the code,
Quote:
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
|
and save it as hosts?
Also, is it okay to use something beside localhost.localdomain (eg 127.0.0.1 anyname.anywhere anyname )?
Thanks again for your help!
P.S. I did try your suggestion reddazz, but I wasn't sure where to change the host name. The tool I used was system settings>network. Did I use the wrong one? That would be a lot easier than using vi for a beginner (like me ).
|
|
|
05-27-2005, 05:34 PM
|
#10
|
LQ Guru
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298
Rep:
|
Thats the right tool.
|
|
|
05-27-2005, 08:31 PM
|
#11
|
Member
Registered: Feb 2005
Distribution: Fedora Core 4 and happy user of KDE 3.5
Posts: 49
Rep:
|
So, should I add anyname.anywhere under the DNS tab, and should I type it just like that? That's the only place that seems editable. The host tab is empty for me, which is why I was confused before.
|
|
|
05-27-2005, 08:45 PM
|
#12
|
LQ Guru
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298
Rep:
|
You make the changes in the host tab. I will post the exact details when I am able to access my fedora core partition.
|
|
|
05-27-2005, 09:04 PM
|
#13
|
Senior Member
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290
|
You definitely need the localhost.localdomain entry as some stuff relies on it. You can also give your computer another name (a machine can have many names associated with it).
|
|
|
05-27-2005, 09:11 PM
|
#14
|
LQ Guru
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298
Rep:
|
Okay, start the network confiuration tool, go to the hosts tab, click on edit. For the ip address, you put 127.0.0.1, for the hostname put something that won't clash with other domains on the web e.g. myhost.mydomain.lan and for the aliases, you need to put the hostname e.g myhost as well as localhost.localdomain & localhost. So your dialg box would be something like below,
Code:
Address: 127.0.0.1
Hostname: myhost.mydomain.lan
Aliases: myhost localhost.localdomain localhost
Make sure you save your changes before exiting.
|
|
|
05-27-2005, 09:37 PM
|
#15
|
Member
Registered: Feb 2005
Distribution: Fedora Core 4 and happy user of KDE 3.5
Posts: 49
Rep:
|
Thank you both again! I can finally fix this problem that's been egging me for at least a month.
Quote:
You definitely need the localhost.localdomain entry as some stuff relies on it. You can also give your computer another name (a machine can have many names associated with it).
|
Thanks btmiller. That's why I don't like to barrel ahead on something this sensitive myself. I wasn't sure whether the localhost part was necessary; I probably would've left it out.
Your detailed instructions are also very much appreciated, reddazz. It's nice for a newbie to have someone actually run through a whole process sometimes to double-check their own method.
I just have one more question to bother you with. I'm not on a network (except for my dialup ISP), so should I put the lan part of Hostname: myhost.mydomain.lan in the hostname line?
|
|
|
All times are GMT -5. The time now is 04:00 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|