Results 1 to 3 of 3
freebsd 6.0
i try to set new hostname using:
Code:
sysctl kern.hostname=newhost.com
it works, but now when i try xterm it says:
Code:
$ xterm
Xlib: connection to ":0.0" refused ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 12-17-2006 #1Just Joined!
- Join Date
- Dec 2006
- Posts
- 17
sysctl hostname
freebsd 6.0
i try to set new hostname using:
it works, but now when i try xterm it says:Code:sysctl kern.hostname=newhost.com
so i change hostname back and xterm works again. can i change hostname without restart?Code:$ xterm Xlib: connection to ":0.0" refused by server Xlib: No protocol specified xterm Xt error: Can't open display: :0.0
- 02-02-2007 #2
You could try setting your hostname with the "hostname" command. I have absolutely no clue if it will work...
Let me know if it did.
EDIT: You can also set your hostname in /etc/rc.conf so that when you reboot it will be already set.
- 02-02-2007 #3Just Joined!
- Join Date
- Jan 2007
- Posts
- 11
for changing the hostname without restart the system.
sysctl kernel.hostname=newhost.com
also make the entry in /etc/sysctl for permanent.
kernel.hostname=newhost.com


Reply With Quote
