You are not logged in.
Pages: 1
So, this has me stumped. Once again, my hostname changed from "darkstar" to "new-host", causing my X authorization to become invalid and X apps to fail. This happened today after resuming from suspend.
% cat /etc/hostname
darkstar
#
# /etc/hosts: static lookup table for host names
#
#<ip-address> <hostname.domain.org> <hostname>
127.0.0.1 localhost.localdomain localhost darkstar
::1 localhost.localdomain localhost darkstar
# End of file
(The extra entry in /etc/hosts is because of that annoying bug with Thunderbird launch)
With connman, this was apparently by design:
https://wiki.archlinux.org/index.php/Co … e_hostname
With netctl, I'm having the same behaviour, but I can't find any trace of it.
journalctl | grep hostname
Sep 15 18:50:10 localhost systemd[1]: No hostname configured.
Sep 15 18:50:10 localhost systemd[1]: Set hostname to <localhost>.
Sep 15 18:57:27 darkstar systemd[1]: Set hostname to <darkstar>.
Sep 16 21:39:23 darkstar systemd[1]: Set hostname to <darkstar>.
Sep 21 13:56:28 new-host sudo[3856]: mouse : TTY=pts/1 ; PWD=/home/mouse/netctl ; USER=root ; COMMAND=/usr/bin/hostnamectl set-hostname darkstar
Sep 21 13:56:28 new-host dbus[312]: [system] Activating via systemd: service name='org.freedesktop.hostname1' unit='dbus-org.freedesktop.hostname1.service'
Sep 21 13:56:28 new-host dbus[312]: [system] Successfully activated service 'org.freedesktop.hostname1'
Sep 21 13:56:28 darkstar systemd-hostnamed[3859]: Changed host name to 'darkstar'
The Sep 15/16 entries are when I initially configured the hostname. The Sep 21 is when I ran hostnamectl manually to fix my hostname.
netctl also only sets the hostname when so configured in the profile (which I didn't do):
https://projects.archlinux.org/netctl.g … ib/ip#n149
So, if not netctl, what changed my hostname to "new-host" ?
Last edited by Alad (2015-09-21 18:01:08)
Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby
Offline
Seems like it could be getting assigned from your router. Could you possibly be running another network management utility (NM, etc.)?
Offline
Seems like it could be getting assigned from your router. Could you possibly be running another network management utility (NM, etc.)?
No, I only had netctl-ifplugd@enp0s25 and netctl-auto@wlp2s0 enabled.
https://gist.github.com/anonymous/1b5c2 … temctl-log
To find out more, I've disabled both netctl services, and configured wpa_supplicant as described on the wiki. Trying both dhcpcd and dhclient, there was no indication to the hostname, and the `hostname` command showed no difference either. Logs:
https://gist.github.com/anonymous/1b5c2 … client-log
Looking at the router, I found no "new-host" in the system logs, but googling my router make showed e.g:
http://userbase.be/forum/viewtopic.php? … cf#p454687
So you're probably right. Thanks!
(For now, I'm using `xhost si:localuser:$USER` in ~/.xinitrc as a workaround. It's likely better to make my router and/or dhclient behave, somehow)
edit: according to man hostnamectl:
"This tool distinguishes three different hostnames: the high-level "pretty" hostname which might include all kinds of special characters (e.g. "Lennart's Laptop"), the static hostname which is used to initialize the kernel hostname at boot (e.g. "lennarts-laptop"), and the transient hostname which is a default received from network configuration. If a static hostname is set, and is valid (something other than localhost), then the transient hostname is not used."
edit2: http://www.freedesktop.org/wiki/Softwar … hostnamed/ has some more info, but as far as I can see, none on how to set my hostname in stone.
Last edited by Alad (2015-09-21 18:17:25)
Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby
Offline
Pages: 1