You are not logged in.
Hi
Yes, I'm very very newbie
I configured my hostnamectl with --static option because there's a problem each time that nm-appelt connect to a network. Because trasient hostname always messing with my X apps.
But today I wake up my system and XFCE didn't start. After checking my hostname in command line, it appers to be named "dhcppc64"
Then I typed again > hostnamectl set hostname --static localhost
and then too> hostname localhost
after that I killed my lightdm and restarted X and I was able to enter my XFCE desktop
but if nm-applet connect to a network it changes my hostname again to "dhcppc64" then my hostnamectl didn't take any effect
Where is the problem? In hostnamectl or nm-applet?
Thank you for your patience
Last edited by daivolt (2016-06-05 06:16:16)
Offline
Mod note: Moving to "Networking, server and protection".
Offline
If a static hostname is set, and is valid (something other than localhost), then the transient hostname is not used.
Offline
If I change something other than localhost (ex: localhost.localdomain) what happens is that each time e run a app I get for example:
"Invalid MIT-MAGIC-COOKIE-1 keyQXcbConnection: Could not connect to display :0.0"
I really don't understand why is recommended to have configured "localhost.localdomain" in /etc/hosts, and why my system only works with "localhost" configured with hostname command. My $DISPLAY variable always is ":0.0"
In other distros this never happens, why a transient hostname changing by some app
Offline
If I change something other than localhost (ex: localhost.localdomain) what happens is that each time e run a app I get for example:
"Invalid MIT-MAGIC-COOKIE-1 keyQXcbConnection: Could not connect to display :0.0"
Did you change the hostname while the X server was running and not restart it?
Offline
Yes. Good point
Changed my hostname and restarted solved the problem
But my hostname still is localhost
Last edited by daivolt (2016-06-04 19:24:44)
Offline
But my hostname still is localhost
You do not say what you expect it to be. If you are referencing
If I change something other than localhost (ex: localhost.localdomain) what happens is that each time e run a app I get for example
localhost.localdomain is the hostname localhost followed by the domainname seperator "." followed by the domainname localdomain.
So the hostname part of that string is localhost.
Offline
Thank you loqs for your support but I'm not going anywhere.
sometimes my hostname is localhost when I typed hostname command, sometimes it is localhost.localdomain and previusly it was dhcppc64. Until now is "localhost.localdomain" and then I have that problem with Apps that doesn't connect to X server.
All the time I need to set hostname to "localhost" manually, even though I set my system with static hostname. I supossed that static hostname doesn't change, but I think I must be wrong
But thank you
Last edited by daivolt (2016-06-04 21:01:28)
Offline
Thank you loqs for your support but I'm not going anywhere.
Let me try one last time to explain.
All the time I need to set hostname to "localhost" manually, even though I set my system with static hostname. I supossed that static hostname doesn't change, but I think I must be wrong
From my first post in this thread
man hostnamectl wrote:If a static hostname is set, and is valid (something other than localhost), then the transient hostname is not used.
So localhost is not a valid static hostname. So the transient hostname will be used.
sometimes my hostname is localhost when I typed hostname command, sometimes it is localhost.localdomain and previusly it was dhcppc64. Until now is "localhost.localdomain" and then I have that problem with Apps that doesn't connect to X server.
It would appear that when you you connect to the network you receive a transient hostname of dhcppc64 this is used instead of the static hostname because the static hostname is set to the invalid value of localhost.
The X server issue then occurs because the hostname has been changed from the invalid static hostname of localhost to the transient hostname of dhcppc64.
If you set the static hostname to a valid value not so not localhost or localhost.localdomain then the transient hostname should stop being used.
Note because setting the static hostname to a valid value will change the hostname the X server will need to be restarted to allow connections.
Offline
You're rigth.
Trying to set hostname static first time for some reason let dhcppc64 as hostname and I was thinking that it was static, but no
Sencond time when I changed it to "daivolt" I miss that it was alerady transient, then it changed to localhost again automatically.
Now I tried one more time and now is all ok
Thanks
Last edited by daivolt (2016-06-04 22:33:43)
Offline
Please mark the thread as solved by editing your first post and prepending [solved] to the title.
Offline