PDA

View Full Version : HOWTO Correct GNOME Error on Startup:



JonR
13th May 2004, 09:49 AM
HOWTO Correct GNOME Error on Startup:

PROBLEM
As shipped with Fedora Core 1 the GNOME GUI can throw an error when it is first loaded at login:

“Could not look up Internet address for %machinename, this will prevent Gnome from working correctly. It may be possible to correct the problem by adding %machinename to the file /etc/hosts.”
[Log in anyway?] or [Try again].

The error message is displayed after the user has entered their password and before the GNOME GUI finishes loading. Should you wish to deal with the problem the solution is offered in the message. If you are not a Linux newbie your course of action is obvious. If you are a Linux newbie, read on...

SOLUTION
Open a Terminal window in Gnome and become root.
Issue the following commands:

# cp /etc/hosts /etc/hosts.fc1setup
# vi /etc/hosts

In the vi editor type “a” to go into insert mode. After the current last line of the file add the line:

127.0.0.1 %machinename
(Remember to replace %machinename with the name of your system.)

Type [Esc] ZZ to save the file and exit.
Close the Terminal window.

Reboot the system. You should now get a clean Gnome load.

POSSIBLE CONSEQUENCE
On my laptop I found that when I'm not connected to my network, the machine appears to hang on boot after applying this fix. Verbose boot indicated that it hung starting the “sendmail” and “sm-client” daemons. The hang lasts for about two minutes, after which the load appears to complete normally.
(I guess this is to do with the mail processes trying to find a network and failing but if anyone out there can explain this phenomenon more clearly I should be interested to hear from them since it didn't happen before I applied this fix.)

foolish
13th May 2004, 10:37 AM
This is great, I remember when I was young and hopeless and stumbled upon this error. Thank you.

cathal
14th May 2004, 02:10 PM
I remember in the oldin days i used to rename my machine to localhost which i taught at the time was a way around it :) eventually coped it was the default in hosts.... ah the good oul days :)

gonzalo76
19th May 2004, 03:29 AM
POSSIBLE CONSEQUENCE 2

If you're ussing Azureus, you'll not be able to use it if you changed your machinename. You'll have this error message after trying to start it with the ./azureus command:


Attempting to start Azureus...
java.net.UnknownHostException: localhost
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at org.gudy.azureus2.ui.swt.Main$StartSocket.<init>(Main.java:40)
at org.gudy.azureus2.ui.swt.Main.<init>(Main.java:127)
at org.gudy.azureus2.ui.swt.Main.main(Main.java:163)
I've already edited azureus PROGRAM_DIR and JAV_PROGRAM_DIR but I still had this error.

Problem:
The /etc/hosts file is invalid....you need a reference to localhost:
127.0.0.1 localhost.localdomain localhost

Solution:
I edited my /etc/hosts to 127.0.0.1 localhost.localdomain localhost and I could started Azureus again.

Greetings
gonzalo

P.S: GNOME works fine in spite of that message.
Anyway, KDE does not complain about it. KDE 3.2.2 ROCKS !!!

jale2ice
21st May 2004, 04:28 AM
Here is my /etc/hosts.... and Azureus works just fine.

[jale2ice@bigpimpin jale2ice]$ cat /etc/hosts
127.0.0.1 localhost localhost.localhost bigpimpin
[jale2ice@bigpimpin jale2ice]$

theory_prof
21st September 2004, 06:42 AM
I am using a network connection at work and earthlink dial-up at home.
No problem with the dial-up.


At work, I boot up, at the login screen I get localhost .localdomain as the machine name.
Now I log in, and activate the network connection. The network connection succeeds but
GNOME fails to work after this, i.e. when I double icons click nothing happens.
So I log out. (For some reason this is still possibbe the normal way through the GUI.)

Next the login screen knows my machine name, "Welcome to speedy.cs.myuniversity.edu",
I log back in again, and now I have a working connection *and* GNOME works.

Is there any way to avoid this extra log-in-and-out dance *without* side effects described below?

(My current etc/hosts is
127.0.0.1 localhost.localdomain localhost
122.135.11.222 speedy.cs.myuniversity.edu speedy
)










QUOTE=JonR]HOWTO Correct GNOME Error on Startup:

PROBLEM
As shipped with Fedora Core 1 the GNOME GUI can throw an error when it is first loaded at login:

“Could not look up Internet address for %machinename, this will prevent Gnome from working correctly. It may be possible to correct the problem by adding %machinename to the file /etc/hosts.”
[Log in anyway?] or [Try again].

The error message is displayed after the user has entered their password and before the GNOME GUI finishes loading. Should you wish to deal with the problem the solution is offered in the message. If you are not a Linux newbie your course of action is obvious. If you are a Linux newbie, read on...

SOLUTION
Open a Terminal window in Gnome and become root.
Issue the following commands:

# cp /etc/hosts /etc/hosts.fc1setup
# vi /etc/hosts

In the vi editor type “a” to go into insert mode. After the current last line of the file add the line:

127.0.0.1 %machinename
(Remember to replace %machinename with the name of your system.)

Type [Esc] ZZ to save the file and exit.
Close the Terminal window.

Reboot the system. You should now get a clean Gnome load.

POSSIBLE CONSEQUENCE
On my laptop I found that when I'm not connected to my network, the machine appears to hang on boot after applying this fix. Verbose boot indicated that it hung starting the “sendmail” and “sm-client” daemons. The hang lasts for about two minutes, after which the load appears to complete normally.
(I guess this is to do with the mail processes trying to find a network and failing but if anyone out there can explain this phenomenon more clearly I should be interested to hear from them since it didn't happen before I applied this fix.)[/QUOTE]

theory_prof
21st September 2004, 07:05 AM
I am using a network connection at work and earthlink dial-up at home.
No problem with the dial-up.


At work, I boot up, at the login screen I get localhost .localdomain as the machine name.
Now I log in, and activate the network connection. The network connection succeeds but
GNOME fails to work after this, i.e. when I double icons click nothing happens.
So I log out. (For some reason this is still possibbe the normal way through the GUI.)

Next the login screen knows my machine name, "Welcome to speedy.cs.myuniversity.edu",
I log back in again, and now I have a working connection *and* GNOME works.

Is there any way to avoid this extra log-in-and-out dance *without* side effects described below?

(My current etc/hosts is
127.0.0.1 localhost.localdomain localhost
122.135.11.222 speedy.cs.myuniversity.edu speedy
)



HOWTO Correct GNOME Error on Startup:

PROBLEM
As shipped with Fedora Core 1 the GNOME GUI can throw an error when it is first loaded at login:

“Could not look up Internet address for %machinename, this will prevent Gnome from working correctly. It may be possible to correct the problem by adding %machinename to the file /etc/hosts.”
[Log in anyway?] or [Try again].

The error message is displayed after the user has entered their password and before the GNOME GUI finishes loading. Should you wish to deal with the problem the solution is offered in the message. If you are not a Linux newbie your course of action is obvious. If you are a Linux newbie, read on...

SOLUTION
Open a Terminal window in Gnome and become root.
Issue the following commands:

# cp /etc/hosts /etc/hosts.fc1setup
# vi /etc/hosts

In the vi editor type “a” to go into insert mode. After the current last line of the file add the line:

127.0.0.1 %machinename
(Remember to replace %machinename with the name of your system.)

Type [Esc] ZZ to save the file and exit.
Close the Terminal window.

Reboot the system. You should now get a clean Gnome load.

POSSIBLE CONSEQUENCE
On my laptop I found that when I'm not connected to my network, the machine appears to hang on boot after applying this fix. Verbose boot indicated that it hung starting the “sendmail” and “sm-client” daemons. The hang lasts for about two minutes, after which the load appears to complete normally.
(I guess this is to do with the mail processes trying to find a network and failing but if anyone out there can explain this phenomenon more clearly I should be interested to hear from them since it didn't happen before I applied this fix.)