Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Problems with X and wireless connection.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
brent7890
n00b
n00b


Joined: 13 Jul 2011
Posts: 61
Location: Los Angeles, CA

PostPosted: Tue Dec 13, 2011 4:00 am    Post subject: Problems with X and wireless connection. Reply with quote

I've been wondering about a problem I've been having where after I connect to a foreign host, programs are unable to interface with X. I posted this in Networking section of Gentoo Forums, and have been waiting for a month for answers, and haven't got any sufficient ones. Therefore, this is merely a paste from what I previously wrote in the other thread, which is here:

https://forums.gentoo.org/viewtopic-t-902444.html

I use Wicd, to add on to what I've already said, and if you can help me, it would solve the problem I'm having:

Hi. I'm having trouble with X opening applications after I wirelessly connect to other networks besides my own at home. The programs are unable to interface with Xorg. I'm getting errors such as:

No protocol specified
(program): cannot connect to x server :0. Error: Connection refused
(terminal:3594): Gtk-WARNING **: cannot open display: :0

or if I run something like VLC:

VLC media player 1.1.12 The Luggage (revision exported)
Blocked: call to unsetenv("DBUS_ACTIVATION_ADDRESS")
Blocked: call to unsetenv("DBUS_ACTIVATION_BUS_TYPE")
No protocol specified
[0x7f3bc0] main interface error: no suitable interface module
[0x6e9150] main libvlc error: interface "globalhotkeys,none" initialization failed
[0x6e9150] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
No protocol specified
[0x7932b0] qt4 interface error: Could not connect to X server
Remote control interface initialized. Type `help' for help.

This only happens when I connect to other wireless networks. Probably some kind of security issue? I'm not using root account. Other than this, I'm not sure what to say. If I interface programs with x BEFORE I connect, they stay open, and I can issue commands to them and they work perfectly fine. After I connect, the problem arises when I open new applications or windows through xorg. I'm using KDE.

Thanks to anyone who reads, comments, or posts anything that may lead me in the right direction.
Back to top
View user's profile Send private message
lamarque
n00b
n00b


Joined: 11 Jan 2006
Posts: 49
Location: Rio de Janeiro / Brasil

PostPosted: Wed Dec 14, 2011 1:17 pm    Post subject: Reply with quote

Some time ago I faced this problem in my notebook. I workaround it by adding a script in /etc/profile.d/ with the following content:

export DISPLAY=$(echo $DISPLAY | sed -e 's:localhost::')

I do not know why DISPLAY was being set as localhost:0. As far as I know when using localhost:0 instead of :0 Xorg will use tcp sockets instead unix sockets (this one is assumed to be faster but only works on the same machine).

I do have tcp enabled in my Xorg because sometimes I need to export DISPLAY from a chrooted directory and I do not want to 'mount --bind' my /tmp to make unix socket work in that situation.

If you do not need Xorg's tcp support you can pass the -nolistentcp parameter to Xorg, I think that will disable localhost:0 and force Xorg to use unix sockets only.
_________________
Lamarque V. Souza
http://www.geographicguide.com/brazil.htm
Linux User #57137 - http://counter.li.org
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum