Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Desktop Environments
  • Search

Gnome and /etc/hosts

Problems with GUI applications? Questions about X, KDE, Gnome, Fluxbox, etc.? Come on in. NOTE: For multimedia, go up one forum
Post Reply
Advanced search
7 posts • Page 1 of 1
Author
Message
trico
n00b
n00b
User avatar
Posts: 16
Joined: Sun Jul 04, 2004 9:26 pm
Location: Rochester, Minnesota USA

Gnome and /etc/hosts

  • Quote

Post by trico » Wed Jul 07, 2004 10:41 pm

I just finished installing Gnome and Xorg. When I started Gnome the first itme (and maybe the second), it complained about nor finding the system in /etc/hosts. It's true, its not in there. I'm using dhcp to assign a address on boot and it looks to me like the hosts file wants a static ip address. So the first question is - how do I make Gnome happy with my system?

I started the GUI several times, and it seems that the last couple time Gnome stopped complaining. I've made no changes to /etc/hosts. So - what's going on? Anyone know?

Just checked, /etc/hosts contains the localhosts entry and some info on ipv6. Nothing more.

trico
Top
CompNerd
Retired Dev
Retired Dev
User avatar
Posts: 311
Joined: Sun Mar 16, 2003 8:02 pm
Location: 127.0.0.1

  • Quote

Post by CompNerd » Wed Jul 07, 2004 10:59 pm

Hmm, Im not sure if this would work, but you can give the address 127.0.0.1 the name of your machine along with localhost. Its a nasty hack, but it just may work

CompNerd
Top
trico
n00b
n00b
User avatar
Posts: 16
Joined: Sun Jul 04, 2004 9:26 pm
Location: Rochester, Minnesota USA

  • Quote

Post by trico » Thu Jul 08, 2004 12:02 am

A correction to my original post - Gnome continues to complain whenever I start it up.

trico

PS: This is my first post from my new gentoo linux system. Yay!
Top
LouTheBlueGuru
n00b
n00b
User avatar
Posts: 44
Joined: Wed Feb 04, 2004 2:12 am
Location: Fayetteville, AR
Contact:
Contact LouTheBlueGuru
Website

  • Quote

Post by LouTheBlueGuru » Thu Jul 08, 2004 12:37 am

I always put 127.0.0.1 in my hosts file. I f your using dhcp then in your /etc/conf.d/net file, make sure the following line is uncommented:

ifconfig_eth0=( "dhcp" )

The fact that your network is working means that it must be pulling an IP address. With dhcp this address is not static, but can change. You can run ifconfig and find out the address dhcp is providing and then put that in the hosts file. Be aware, however that this address can cahnge if your network configuration changes.
Lou_The_Blue_Guru

For those working with computers that haven’t figured this out yet: "Everything is related with every other thing ... " -- The Jaina Philosophy of Non-Absolutism
Top
trico
n00b
n00b
User avatar
Posts: 16
Joined: Sun Jul 04, 2004 9:26 pm
Location: Rochester, Minnesota USA

  • Quote

Post by trico » Thu Jul 08, 2004 1:37 am

Here's my /etc/hosts file:

127.0.0.1 localhost
# IPV6 versions of localhost and co
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

Here's the pertinant section of /etc/conf.d/net:
# For DHCP set iface_eth? to "dhcp"
# For passing options to dhcpcd use dhcpcd_eth?
#
iface_eth0="dhcp"
#dhcpcd_eth0="..."

Gnome complains with the above settings... I uncommented the above iface_eth0="dhcp" during installation, but didn't uncomment the second statement since I didn't have a clue what option I would pass to dhcpcd.

I've been googling on the subject and have found several posts from people with similar problems (with various distributions). There appear to be two recomendations 1) write a script to snatch the assigned IP address from ifconfig and write it into /etc/hosts in the appropriate format. And 2) just enter 127.0.0.2 myhost.mydomain myhost. The latter sounds odd to me, but they claim it works.

The man pages for hosts note that with the advent of DNS that the /etc/hosts file is much less important than it used to be. But offer no enlightenment why Gnome should be interested in using it.

I'll try option 2 above when Openoffice completes emerging.

trico
Top
Putrifier
n00b
n00b
Posts: 46
Joined: Tue Jun 29, 2004 3:29 pm

  • Quote

Post by Putrifier » Thu Jul 08, 2004 2:12 am

127.0.0.1 localhost kix

Thats my /etc/hosts.
I had the same problem as you till a few days ago.that fixed it.

(kix is my pc name, btw.its the the part that you see in your bash shell, "root@kix #" ).

thats the only line you need to change, none of that dhcp stuff. the only reason Gnome is whining, is because it cant reach your PC, (kix in my case). it doesnt have a clue where to find it. by adding your hostname up there, you are telling it that your pc ip is 127.0.0.1 . because, remember, Gnome and KDE are nothing more than clients, connected via a network to the server (which is XFree, Xorg or whatever you use). nothing more. :)
Top
trico
n00b
n00b
User avatar
Posts: 16
Joined: Sun Jul 04, 2004 9:26 pm
Location: Rochester, Minnesota USA

  • Quote

Post by trico » Thu Jul 08, 2004 11:58 am

That did the trick. Thanks.

trico
Top
Post Reply

7 posts • Page 1 of 1

Return to “Desktop Environments”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic