Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 256024 - gnome-extra/nm-applet-0.6.6 makes XServer refuse any other client connections
Summary: gnome-extra/nm-applet-0.6.6 makes XServer refuse any other client connections
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Steev Klimaszewski (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-22 17:35 UTC by Daniel Klaffenbach
Modified: 2009-01-26 20:31 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Klaffenbach 2009-01-22 17:35:45 UTC
I am on KDE 4.1.4, Xorg 7.4 and Linux 2.6.27.10.
I am using NetworkManager to connect to Wireless LANs through nm-applet (*sigh*). After launching nm-applet, no other X applications can be started. All apps started before nm-applet still work fine.
If I launch a console before nm-applet, and try to start up another X app through the console I always get:

user@frodo ~ $ xev
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

xev:  unable to open display ':0.0'

This happens with nm-applet under KDE4 and XFCE (stable). All the gnome-deps are also stable.

Reproducible: Always




user@frodo ~ $ emerge --info     
Portage 2.2_rc23 (default/linux/x86/2008.0, gcc-4.3.2, glibc-2.7-r2, 2.6.27.10 i686)
=================================================================                   
System uname: Linux-2.6.27.10-i686-Mobile_AMD_Sempron-tm-_3100+-with-glibc2.0       
Timestamp of tree: Wed, 21 Jan 2009 10:00:02 +0000                                  
app-shells/bash:     3.2_p39                                                        
dev-java/java-config: 1.3.7-r1, 2.1.6-r1                                            
dev-lang/python:     2.4.4-r13, 2.5.2-r7                                            
dev-python/pycrypto: 2.0.1-r6                                                       
dev-util/cmake:      2.6.2-r1                                                       
sys-apps/baselayout: 2.0.0                                                          
sys-apps/openrc:     0.3.0-r1                                                       
sys-apps/sandbox:    1.2.18.1-r2                                                    
sys-devel/autoconf:  2.13, 2.63                                                     
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2                      
sys-devel/binutils:  2.18-r3                                                        
sys-devel/gcc-config: 1.4.0-r4                                                      
sys-devel/libtool:   1.5.26                                                         
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe -ftree-vectorize"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/4.1/env /usr/kde/4.1/share/config /usr/kde/4.1/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=native -O2 -pipe -ftree-vectorize"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="de_DE.UTF-8"
LC_ALL="de_DE.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="de"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/layman/gnustep /usr/portage/local/custom"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X a52 aac aalib acl acpi alsa bash-completion berkdb bzip2 cairo cdr cli cracklib crypt cups daap dbus divx dri dvd dvdr dvdread dvi encode esd firefox flac fortran gdbm gif gimp glitz gtk2 hal htmlhandbook iconv ieee1394 imagemagick ipod isdnlog java jpeg jpg kde kdeprefix laptop ldap lm_sensors mad midi mmx mmxext mng mp3 mp4 mpeg mudflap ncurses nfs nls nptl nptlonly nsplugin ogg opengl openldap openmppam pcre pda pdf perl png pppd python qt4 quicktime readline reflection samba scanner session skins spell spl sse sse2 sse3 ssl ssse3 startup-notification svg sysfs tcpd tiff unicode usb vcd vorbis webdav wifi win32codecs x86 xcomposite xorg xscreensaver xulrunner xv xvid zlib" ALSA_CARDS="atiixp" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de" USERLAND="GNU" VIDEO_CARDS="ati radeon"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2009-01-24 01:06:33 UTC
Oops. gnome-extra confused me.
Comment 2 Robert Piasek (RETIRED) gentoo-dev 2009-01-24 10:31:09 UTC
Can you please double check if you have your hostname configured correctly? By default networkmanager will change it to the name assigned by your dhcp server, or change it to localhost.localdomain if he won't be able to establish correct hostname.

To test it, you can try:

1) Start your system _without_ networkmanager running
2) check your hostname
3) run networkmanager and nm-appet and check hostname

The ways to solve it:
1) make sure you've got /etc/conf.d/hostname setup
2) make sure you've got an entry in your /etc/hosts file corresponding to your IP address.

You can always create a system-wide connection which will be activated _before_ the X server starts.

Can you also post some logs?
Comment 3 Daniel Klaffenbach 2009-01-26 14:15:03 UTC
You are right - it is a hostname problem. Before I start NM and nm-applet my hostname is "frodo", which I configured in /etc/conf.d/hostname.
After I run NM and nm-applet my hostname changes, because the dhcp servers assign different hostnames to my machine (and these hostnames keep changing - depending on my location).

When I enter:
/etc/init.d/hostname restart
everything is working again.

I already have configured my actual hostname in /etc/hosts:
127.0.0.1       frodo.home.local        frodo localhost

So, how can we change this? Is there already a patch or an option for NetworkManager? It obviously is not a very elegant way when X refueses client connections after the hostname changes - so maybe there also is a fix for Xorg?
Comment 4 Daniel Klaffenbach 2009-01-26 14:16:29 UTC
(In reply to comment #2)
> Can you also post some logs?
Oh, I forgot. Which logs do you need?
Comment 5 Robert Piasek (RETIRED) gentoo-dev 2009-01-26 16:39:35 UTC
(In reply to comment #3)
> You are right - it is a hostname problem. Before I start NM and nm-applet my
> hostname is "frodo", which I configured in /etc/conf.d/hostname.
> After I run NM and nm-applet my hostname changes, because the dhcp servers
> assign different hostnames to my machine (and these hostnames keep changing -
> depending on my location).
> 
> When I enter:
> /etc/init.d/hostname restart
> everything is working again.
> 
> I already have configured my actual hostname in /etc/hosts:
> 127.0.0.1       frodo.home.local        frodo localhost
> 
> So, how can we change this? Is there already a patch or an option for
> NetworkManager? It obviously is not a very elegant way when X refueses client
> connections after the hostname changes - so maybe there also is a fix for Xorg?
> 

There have been a patch for dhclient to skip assigning hostnames based on dhcp or a setting in config file - can't remember. I will poke Uberlord to see if something can be done with dhcpcd.

Personally I don't know any fix for Xorg.

Give me a day and I will try to come with something up.

Thanks,
Rob
Comment 6 Robert Piasek (RETIRED) gentoo-dev 2009-01-26 18:26:22 UTC
OK, I've got some more information for you.

Firstly I've noticed you're using 0.6.6, so you should try this (it's elog from ebuild):

You need to be in the plugdev group in order to use NetworkManager
Problems with your hostname getting changed?

Add the following to /etc/dhcp/dhclient.conf
send host-name "YOURHOSTNAME"
supersede host-name "YOURHOSTNAME"


If you decide to switch to NM-0.7 (which I recommend), you can use either dhclient or dhcpcd.

To avoid problems with dhcpcd you need to edit /etc/dhcpcd.conf and remove
host_name from "option" line.

Try it and let me know about your results.
Comment 7 Daniel Klaffenbach 2009-01-26 20:31:26 UTC
(In reply to comment #6)
> Add the following to /etc/dhcp/dhclient.conf
> send host-name "YOURHOSTNAME"
> supersede host-name "YOURHOSTNAME"
Thanks, this hint helped. I just put:

send host-name YOURHOSTNAME;
supersede host-name YOURHOSTNAME;

in the dhclient.conf

Anyway - this behavior is really annoying and confusing. I know that it is not a bug in Networkmanager - but why the heck does X refuse client connections when the hostname changes? For me this is just a proof for the bad (or let's say outdated) design of X...
I think this bug can be closed - yet we should think about a better way to address this kind of problem.

Thanks for your help, Robert!