You are not logged in.

#1 2009-05-27 11:34:21

SardarNL
Member
Registered: 2008-11-22
Posts: 10

Gnome stops starting applications after wireless connection

When I successfully connect to TTLS-WEP(WPA-Enterprise, TTLS, PAP) network the gnome stops starting applications. By "starting" I mean:
- starting app by hotkey
- starting app from menu
- starting app from Alt+F2

The cursor changes to "wait" (stopwatch), then after 3-5 seconds it becomes normal, the app is not started (checked by SystemMonitor, htop, ps -e | grep, as root from Alt+Ctrl+F1 console). The problem appears for any program (gnome-terminal, urxvt, openoffice, firefox etc), console programs like ls work fine in both prior opened gnome-terminal and in Alt+Ctrl+F1 console. I guess the problem is with X. X is configured not to accept logins from network (not listening to any network).

Any program started before connecting keeps working normally. Only TTLS-WEP network causes this problem, connecting to WPA1-Personal type (at home) or to wired network doesn't cause the problem. The problem appears in both NetworkManager and wicd (NetworkManager is uninstalled after switching to wicd). Disabling NetworkManager/wicd and using wpa_supplicant directly from console doesn't cause the problem, but I really want automatic connection manager.

The questions:
  - where are log files of gnome? How can I see what the damn thing is doing at specific moment?
  - what can possibly cause the problem, since I don't see any relation between connecting to a network and starting general app.

Please don't suggest me to stop using gnome, I don't want to leave this DE without clear understanding of what is happening there.

Offline

#2 2009-05-27 11:52:30

Trent
Member
From: Baltimore, MD (US)
Registered: 2009-04-16
Posts: 990

Re: Gnome stops starting applications after wireless connection

SardarNL wrote:

- what can possibly cause the problem, since I don't see any relation between connecting to a network and starting general app.

Appearances can be deceiving smile  If connecting to a network has repercussions for your hostname, you may be unable to start X programs (because X is running on oldhost:0 and you're trying to start a program on newhost:0, is my understanding).  How this applies in your situation I don't know for sure.

Please don't suggest me to stop using gnome, I don't want to leave this DE without clear understanding of what is happening there.

Not likely! smile  It doesn't sound like a GNOME problem to me, rather an issue with your connection process.  Are you using networkmanager?  If so, can you connect via ifconfig / iwconfig / wpa_supplicant / dhcpcd from the command line?  I suspect that the last step is the one giving you trouble.  Try it from a console and see if/when your desktop breaks.

Offline

#3 2009-05-27 12:20:47

SardarNL
Member
Registered: 2008-11-22
Posts: 10

Re: Gnome stops starting applications after wireless connection

Trent wrote:

If connecting to a network has repercussions for your hostname, you may be unable to start X programs (because X is running on oldhost:0 and you're trying to start a program on newhost:0, is my understanding).

How an I see this? No changes /var/log/Xorg.0.log. /var/log/error.log contains messages about pulseaudio complaining about my sound (not configured yet), disabling pulseaudio from rc.conf doesn't help (however pulseaudio can't be completely disabled since it will be automatically started by gnome as drop-in replacement of esd). No new messages in other log files in /var/log  (so where gnome writes its own log?).

Trent wrote:

Are you using networkmanager?  If so, can you connect via ifconfig / iwconfig / wpa_supplicant / dhcpcd from the command line?  I suspect that the last step is the one giving you trouble.  Try it from a console and see if/when your desktop breaks.

Yes, I do use wicd (this problem was the last drop against NetworkManager, so replaced it completely by wicd). I've tried again to connect manually, thus disabling wicd, reboot, wpa_supplicant manually from root gnome-terminal in X session of normal user. Connected successfully and you are right, the problem appeared again. No app can be started anymore, processor load almost 0%, no accesss to HDD. System just silently doesn't start gui apps (also tried from already opened gnome-terminal), but works fine for gui-less apps (vim).

The problem doesn't appear at home when or when using wired connections, in all cases DHCP is used. I see there is a problem with wpa_supplicant, but how this service may be connected to X? If X is changing its "hosts" (first question, why? what is the point?) , then it should do the same thing when connecting to any other network (wpa_supplicant is involved, however in different mode, WPA1-Personal).

Offline

#4 2009-05-27 14:27:49

Trent
Member
From: Baltimore, MD (US)
Registered: 2009-04-16
Posts: 990

Re: Gnome stops starting applications after wireless connection

This is getting a bit deeper than I recall dealing with (anybody else?) but I'll see if I can help.

First, what is the output of 'hostname' before and after the connection?  What about the contents of /etc/hosts?  Does it match HOSTNAME= in /etc/rc.conf?

It occurs to me that there could be some type of a conflict with another host on your network which dhcp is dealing with by changing your hostname.  (I don't even know if this is possible, but I don't have any better ideas.)  Perhaps you could try changing your hostname in /etc/rc.conf and /etc/hosts, reboot, and see if the problem persists when you connect again.

I've had this problem before, but it was a long time ago with another distro.  X clients connect to the X server via the loopback interface IIRC, but if something happens to interfere with networking on the machine, the client may not be able to find a server.  In my case it was hostnames -- the X server had been started with one hostname, and the client programs started with another, so the clients were unable to find the machine on which they were supposed to start.  My symptoms were identical to yours -- already started programs work fine, console apps work fine, but can't start new X clients.

Can you log out of X, connect in the console, and start X again?  That might just solve the problem.  My wireless networks are now (as of this morning) managed by netcfg and started at boot, so the network connection is up before X starts.  You might try a similar setup if it works for you.

By the way, you can stop the wicd daemon without rebooting:  '/etc/rc.d/wicd stop'.  I think you then have to kill wpa_supplicant manually.

Last edited by Trent (2009-05-27 14:28:57)

Offline

#5 2009-06-11 10:39:43

SardarNL
Member
Registered: 2008-11-22
Posts: 10

Re: Gnome stops starting applications after wireless connection

Sorry for the delay, this problem occurs only one specific network, which I don't use often.

/etc/hosts contains entry for 127.0.0.1 localhost only, this looks correct to me. /etc/rc.conf:HOSTNAME is localhost. This is a laptop, it doesn't have any persistent hostname nor it is needed. But you a right, when I'm connected, my `hostname` changes to client194.flexnet2.rug.nl. But the same happens when I connect to any other network, the problem doesn't occur.

To fix this, I need to `hostname localhost` each time I connect to that "problem" network, then everything starts to work fine again. So this is not a wpa_supplicant nor the drivers problem. If I start X again (kill X or logout to gdm, login) then problem is resolved too. So this is X, which stops starting programs after hostname is changed. I guess this has something to do with security policies (PolicyKit or something), that tries to resolve new hostname, fails and dies.

Before I add a dirty hack `hostname localhost` to after connect scripts, how can this problem be fixed? How can I tell to wicd/dhcpcd to not change my hostname? Or configure something in X, so it will not be bound to hostname (why should it be? what is a hostname for a laptop, where nobody connects from outside world?).

I will also try to change my /etc/rc.conf:HOSTNAME="sardar-laptop", maybe this "non standard" value will not be overriden.

Offline

#6 2009-06-11 10:47:47

SardarNL
Member
Registered: 2008-11-22
Posts: 10

Re: Gnome stops starting applications after wireless connection

FIXED: do never ever set /etc/rc.conf:HOSTNAME="localhost" !
This is a default value, so connecting to a network will change this to something network relevant (IMHO good behavior of dhcpcd) and X will go crazy (IMHO bad behavior of X). Setting it to something different (my is "sardar-laptop") will prevent dhcpcd from changing it. So X stays working fine.

2 Trent - thanks for your tips about hostname smile

Offline

Board footer

Powered by FluxBB