LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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


Reply
  Search this Thread
Old 04-13-2005, 10:50 AM   #1
RJEmery
Member
 
Registered: Jul 2003
Distribution: FC3/GNOME, Slack 10.1
Posts: 31

Rep: Reputation: 15
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.
 
Old 04-13-2005, 10:55 AM   #2
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
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
 
Old 04-13-2005, 11:50 AM   #3
RJEmery
Member
 
Registered: Jul 2003
Distribution: FC3/GNOME, Slack 10.1
Posts: 31

Original Poster
Rep: Reputation: 15
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?
 
Old 04-13-2005, 01:39 PM   #4
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
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.
 
Old 04-13-2005, 02:40 PM   #5
RJEmery
Member
 
Registered: Jul 2003
Distribution: FC3/GNOME, Slack 10.1
Posts: 31

Original Poster
Rep: Reputation: 15
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.
 
Old 05-22-2005, 04:55 PM   #6
Dimension User
Member
 
Registered: Feb 2005
Distribution: Fedora Core 4 and happy user of KDE 3.5
Posts: 49

Rep: Reputation: 15
Question

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?
 
Old 05-22-2005, 05:06 PM   #7
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
Your hosts file probably doesn't exist, which would definitely cause this problem. Just open it, type in the line, and then save it.
 
Old 05-22-2005, 05:13 PM   #8
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
Try running the network configuration tool and change the host name from there.
 
Old 05-27-2005, 05:27 PM   #9
Dimension User
Member
 
Registered: Feb 2005
Distribution: Fedora Core 4 and happy user of KDE 3.5
Posts: 49

Rep: Reputation: 15
Smile

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).
 
Old 05-27-2005, 05:34 PM   #10
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
Thats the right tool.
 
Old 05-27-2005, 08:31 PM   #11
Dimension User
Member
 
Registered: Feb 2005
Distribution: Fedora Core 4 and happy user of KDE 3.5
Posts: 49

Rep: Reputation: 15
Question

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.
 
Old 05-27-2005, 08:45 PM   #12
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
You make the changes in the host tab. I will post the exact details when I am able to access my fedora core partition.
 
Old 05-27-2005, 09:04 PM   #13
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
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).
 
Old 05-27-2005, 09:11 PM   #14
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
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.
 
Old 05-27-2005, 09:37 PM   #15
Dimension User
Member
 
Registered: Feb 2005
Distribution: Fedora Core 4 and happy user of KDE 3.5
Posts: 49

Rep: Reputation: 15
Talking

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?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
localhost.localdomain steve007 Linux - Newbie 3 07-27-2005 03:48 AM
localhost.localdomain cryzpene Linux - Software 1 06-05-2004 11:57 AM
localhost.localdomain d1ny3 Mandriva 2 04-17-2004 08:27 PM
localhost.localdomain??? neozero62 Linux - Newbie 2 10-31-2003 10:25 AM
localhost.localdomain blankx87@m-i-m. Linux - Newbie 1 11-17-2002 04:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:00 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration