Skip to main content
Topic: XFCE4 : when hostname is changed, windows manager does not work properly (Read 373 times) previous topic - next topic
0 Members and 2 Guests are viewing this topic.

XFCE4 : when hostname is changed, windows manager does not work properly

Hi,
in a recent update, I just noticed that my laptop hostname changed to localhost.
when I change it back to the original name, I can still log in XFCE4, but windows manager does not work properly.
ie you cannot move windows, there is no decoraton, etc

I changed it using:
sudo vi /etc/conf.d/hostname  /etc/hostname  /etc/openrc/conf.d/hostname

and in effect the change occurs on /etc/conf.d/hostname

If I login into a fresh account: no problem
If I login into KDE plasma: no problem

I fixed it once in the past, can someone tell me where to look ?

ie I remember once it was networkmanager wifi changed hostname

solution
Prevent dhcpcd from setting hostname. on peut le faire de manière globale

Which gave the my problem is not about DHCP but about NetworkManager. Adding the following to /etc/MetworkManager/NetworkManager.conf solved the problem to me:

[main]
plugins=keyfile
hostname-mode=none

source:
systemd - NetworkManager interferes with hostname configuration - Unix & Linux Stack Exchange
https://unix.stackexchange.com/questions/513246/networkmanager-interferes-with-hostname-configuration

Re: XFCE4 : when hostname is changed, windows manager does not work properly

Reply #1
On all the recent unix systems I have used the hostname command can be used to display or set the system hostname. Try man hostname. I believe the official file used to store the system hostname is /etc/hostname, try man 5 hostname.

Re: XFCE4 : when hostname is changed, windows manager does not work properly

Reply #2
yes yes, hostname allows to do that.  :D
and FYI it is slightly different than the config file.

The thing is: when you do change it, you will notice after a moment that no application seems to launch, and the window manager seems stuck.
This is because the DISPLAY variable and the Xauthority is somewhat linked to hostname.

My concern is more: when I change it, even after a reboot, I have the same behavior.

The only solution I can imagine is:  creating a new fresh user home, and move all of my stuff to it.
That's to avoid spending time trying to find out which config file is responsible for that.

Re: XFCE4 : when hostname is changed, windows manager does not work properly

Reply #3
Did you follow the xfce4 faq and just put 127.0.0.1 localhost into /etc/hosts? It might be that xfce4 requires a hostname which it is fetching from /etc/hosts. If you have a different hostname than localhost perhaps you should just try and provide the right mapping in /etc/hosts

eg

127.0.0.1 localhost mypreferredhostname

I don't use lxdm or xfce4. My runit system uses slim as login manager and that starts x11 and uses ~/.xinitrc. The DISPLAY env variable is just DISPLAY=:0.0

 

Re: XFCE4 : when hostname is changed, windows manager does not work properly

Reply #4
Adding it to the hosts file is a good idea, i will try it