# 'No protocol specified' due to Network manager

## matomato76

Hi, 

I use network manager for both of wireless(wlan0) and wired(eth0) network. Aside from that, log on is normally done with gdm. 

I have two routers. Their domains are not same. I'd like to say router R1 is in the domain, 'foo.campus.edu' and router R2 is in 'bar.campus.edu'. R1 is a wired-only router and R2 is a wireless router. 

Both of R1 and R2 give my laptop a domain name in addition to an ip, respectively. For example, R1 gives me 'dhcp40.foo.campus.edu' and R2 provides me with 'a-laptop31.bar.campus.edu'. This domain name is not static. R1, which is connected to my laptop with a wire, works perfect. However, the wireless network does not. 

I can freely plug in and out the wire. The Gentoo box works perfect. But if I turn on/off the switch that controls the wireless network, then, X always says 'cannot open display' and 'no protocol specified'. Because both of R1 and R2 give a domain name, when I plug in/out the wire, the host name is also changed. Nonetheless, I have no problem at all in the case that the wired router R1 changes the domain name. I get in trouble only when the domain name is newly updated by the wireless router, R2.

Can you help me to figure out this problem? Thanks in advance. 

%P.S. The thing is that wireless network is set after log in so that the domain name is always changed to something like 'a-laptop31.bar.campus.edu' when only the wireless network is used. In a result, I can't use X unless I change the domain to localhost.localdomain forcefully by using hostname.

----------

## chithanh

The hostname changing is a long-standing problem with NetworkManager and some DHCP clients. You will find several bugs in bugzilla about this. One suggested workaround is setting a hostname in dhclient.conf

----------

## matomato76

 *chithanh wrote:*   

> The hostname changing is a long-standing problem with NetworkManager and some DHCP clients. You will find several bugs in bugzilla about this. One suggested workaround is setting a hostname in dhclient.conf

 

Thank you anyway.

----------

