Page 1 of 1

GUI applications failing to launch on hostname changes

PostPosted: May 23rd, '12, 00:49
by Tsuroerusu
I just installed Mageia 2 on my laptop, I chose KDE during the installation. So far, the only changes made are that I have installed radeon-firmware, and NetworkManager.

I have a problem where KDE gets into a state where no launcher, be it on the desktop, the menus, even the plasma applets, seem to work at all. I can't launch anything, It appears up some minutes after login, even after rebooting, does anybody have any ideas?

My immediate thought is that kded or something like that crashes in the back, so that nothing works, but that seems rather strange to me. KDE 4.x has been robust for a long time now, and it seems like a rather obvious bug to come up during testing.

In ~/.xsession-errors, there's tons of like "No protocol specified", "Error: cannot open display: :0", "cannot connect to X server :0" etc., so it would appear that programs can't access the X server for some reason. The strange thing is that this occurs some minute post-login.

Edit: Some guys on IRC helped track down the problem, it is this bug: https://bugs.mageia.org/show_bug.cgi?id=3782

Edit2: The topic title has been changed by me, Tsuroerusu, on knightron's insistence.

Re: KDE going on strike

PostPosted: May 28th, '12, 06:29
by johanliebs
My quick fix is to rename the hidden ".kde"directory or delete it if it's a new install. Restart X and it will rebuild a default ".kde"

Re: KDE going on strike

PostPosted: May 28th, '12, 13:25
by Tsuroerusu
For anybody having the same problem, a workaround is to set a hostname on the machine, so that NetworkManager does not change it. What was happening for me is that when NM connected it changed the hostname to that which it could gain from a reverse-lookup on the IP address.

A GUI for this would be rather helpful, as MCC doesn't give one that unless one configures a static LAN connection, let alone be when using NetworkManager on a laptop. But the hostname can be configured by:

Edit: /etc/sysconfig/network

Add:
HOSTNAME=host.domain



Edit: /etc/hosts

Append the following to the 127.0.0.1 line after "localhost":
host.domain host



And then do a reboot, and X.Org and NetworkManager should be working fine.

I saw some discussions about moving to NetworkManager by default for Mageia 3 (I think Mandriva is planning that as well), I would like to vouch for that, as I think NetworkManager is a lot more intuitive than MCC for configuring networks, and integrates nicer into KDE and GNOME.

Anyway, this was really rather painless to deal with, so congratulations to the developers for cranking out a good distribution.

Re: KDE going on strike

PostPosted: May 28th, '12, 14:01
by doktor5000
Well, that's a good fix in general, but the OP has quite a different problem, which is coming from a hostname change, which all graphical tools will react allergic upon. It has another root cause, and can't be fixed that way you proposed.

@Tsuroerusu:Image
;)
And thanks for the compliments

Re: KDE going on strike

PostPosted: May 29th, '12, 09:37
by knightron
Hi this is a networkmanager issue i believe. It occures to me too, but only once i disconnect from networkmanager. You should confirm if this is the times that it is recting to you aswell. Unforunatly i don't have a fix.
p.s.
your thread title sucks, i stumbled into here out of curiosity. You should come up with more descriptive titles. It may be the reason no one has propese a fix yet.

Re: KDE going on strike

PostPosted: May 29th, '12, 11:34
by knightron
Just a quick update. I've been tinkering a little. It seems to occure when i connect, not when i disconnect. If i open a terminal before connecting, and then i connect, it freezes up. If i attempt to launch a program fom the terminal while it's in this frozen state, this is what i get.
No protocol specified
No protocol specified
No protocol specified
No protocol specified
No protocol specified
No protocol specified
Error: cannot open display: :0


If someone has any sugestions, or know how to fix this, i'd be greatly appreciated as this is one issue that is likley to cause me to give up on Mageia.
Also can a mod or the op please change the title of this thread so it gets the exposure it should.

Re: KDE going on strike

PostPosted: May 29th, '12, 11:53
by Tsuroerusu
knightron wrote:Hi this is a networkmanager issue i believe. It occures to me too, but only once i disconnect from networkmanager. You should confirm if this is the times that it is recting to you aswell. Unforunatly i don't have a fix.

This problem occurred to me, once I used NetworkManager to connect to a network where the LAN IP is resolvable through a reverse-lookup, as that resulted in the hostname being changed from "localhost" which is the default.


knightron wrote:p.s.
your thread title sucks, i stumbled into here out of curiosity. You should come up with more descriptive titles. It may be the reason no one has propese a fix yet.

Point taken on the topic title, however I beg to differ, this is a known bug, as you can see in my original post it is already reported in Bugzilla, the reason why no fix is proposed is because this is an open bug.