GUI applications failing to launch on hostname changes

This forum is dedicated to advanced help and support :

Ask here your questions about advanced usage of Mageia. For example you may post here all your questions about network and automated installs, complex server configurations, kernel tuning, creating your own Mageia mirrors, and all tasks likely to be touchy even for skilled users.

GUI applications failing to launch on hostname changes

Postby Tsuroerusu » May 23rd, '12, 00:49

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.
Last edited by Tsuroerusu on May 29th, '12, 16:50, edited 1 time in total.
Tsuroerusu
 
Posts: 3
Joined: May 22nd, '12, 10:51

Re: KDE going on strike

Postby johanliebs » May 28th, '12, 06:29

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"
johanliebs
 
Posts: 15
Joined: May 28th, '12, 06:16

Re: KDE going on strike

Postby Tsuroerusu » May 28th, '12, 13:25

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.
Tsuroerusu
 
Posts: 3
Joined: May 22nd, '12, 10:51

Re: KDE going on strike

Postby doktor5000 » May 28th, '12, 14:01

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
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18016
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: KDE going on strike

Postby knightron » May 29th, '12, 09:37

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.
knightron
 
Posts: 10
Joined: May 28th, '12, 09:40

Re: KDE going on strike

Postby knightron » May 29th, '12, 11:34

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.
knightron
 
Posts: 10
Joined: May 28th, '12, 09:40

Re: KDE going on strike

Postby Tsuroerusu » May 29th, '12, 11:53

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.
Tsuroerusu
 
Posts: 3
Joined: May 22nd, '12, 10:51


Return to Advanced support

Who is online

Users browsing this forum: No registered users and 1 guest