You are not logged in.
Pages: 1
I am trying to change my hostname
my /etc/rc.conf file
# -----------------------------------------------------------------------
# NETWORKING
# -----------------------------------------------------------------------
#
# HOSTNAME: Hostname of machine. Should also be put in /etc/hosts
#
HOSTNAME="gauranga"
my /etc/hosts file
#<ip-address> <hostname.domain.org> <hostname>
127.0.0.1 localhost.localdomain localhost gauranga
# End of file
my /etc/NetworkManager/nm-system-settings.conf file
[main]
plugins=keyfile
[keyfile]
hostname=gauranga
But after rebooting the computer the following thing happens
my /etc/hosts file : Notice that gauranga was removed automatically after reboot
#<ip-address> <hostname.domain.org> <hostname>
127.0.0.1 localhost.localdomain localhost
# End of file
And after I connect my vodafone net connect the following happens
my /etc/hosts file : Notice that 112-79-209-128.live.vodafone.in was added automatically after reboot.
#<ip-address> <hostname.domain.org> <hostname>
127.0.0.1 112-79-209-128.live.vodafone.in localhost.localdomain localhost
# End of file
and as per the thread http://bbs.archlinux.org/viewtopic.php?id=59575, this is causing my programs not to open in KDE or any Desktop environment.
As it gives the error:
No Protocol specified
Error cannot open display :0.0
I have tried ten times changing the /etc/hosts. But nothing happens. So how can I set my hostname to gauranga only.
Offline
I'm not sure _where_ it is being put, but the hostname command should do it
bash$ sudo hostname gauranga
On my puter - the only places in /etc where the hostname is found is /etc/hosts and /etc/rc.conf (plus the wireless and wired .conf-files, but they (in turn) are taken from the current hostname.
Offline
What are you using to connect to your network/ISP? Whatever it is, it's changing your settings kind of like dhcpcd does.
Offline
You want to change "localhost" in the hosts file to your one, not put it afterwards, and yes, make sure you have root permissions to edit those files and make sure they save correctly.
Offline
You want to change "localhost" in the hosts file to your one, not put it afterwards, and yes, make sure you have root permissions to edit those files and make sure they save correctly.
I have 'localhost paradox' and 'localhost hysteric' in my computers and work fine. According to the wiki, you shouldn't remove localhost from the hosts file.
Sorry for my English. Feel free to point out my errors.
Offline
I am also having localhost gauranga
but unfortunately its not working
Offline
Whatever is touching your hosts file, as a temporary workaround you can protect it from being written with "chattr +i". Then look into the program you use to connect to the internet, as sand_name suggested, or try an alternative one.
Offline
Seeing he posted a network manager file it is probably that, I think it's known to sometimes do w/e it wants with your network settings...
Offline
http://bugs.archlinux.org/task/17742
Additional comments about closing: 0.7.999-2 should fix this issue. This version has been patched to do hostname setting only in case it's configured from the keyfile settings plugin, all automatic lookups are disabled.
Not sure if I am interpreting this right, does it mean you should explicitly omit the "plugins=keyfile" etc part in nm-settings? If so, the wiki needs an update. Can you check this, sant527?
Last edited by hokasch (2010-05-25 13:00:17)
Offline
Pages: 1