Re: wireless connection and X session

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Rick Stevens a écrit :
On Tue, 2006-05-02 at 15:17 -0500, Aaron Konstam wrote:

On Tue, 2006-05-02 at 17:32 +0200, François Patte wrote:

Mikkel L. Ellertson a écrit :

François Patte wrote:


Bonjour,

I am facing a problem that I don't understand. I installed FC4 on my
laptop and wireless is working fine but if I launch the wireless
connection after the boot (using for instance ifup eth1) I loose the
ownership of the X session, ie I am unable to open any graphical
application.

If I kill my session and log again, I recover this ownership (and the
wireless connection is not lost...).

Who can help me?

Thank you.

Dumb question - is your hostname changing when you bring up the
network connection? If so, this will cause problems in X.

This seems to be exactly the problem and it seems to be present only
with gnome..... (not appears with kde...)


I don't buy that.  KDE may restart X when the hostname changes, but X
depends on the hostname being set.  Read on.


What can i do? How to guess the hostname you will get when you want to
use a wifi in an airport for instance? Shall I put all possible names in
/etc/hosts?

I'm interrested to the solution of this problem....

Thanks.

Well here is my question. If you are using  wireless communication
using DHCP to multiple access points why are you defining a hostname?
Take the hostname the dhcp server gives you.


That will only work if X comes up AFTER the machine receives its IP and
hostname from the DHCP server.  Remember that the local X session is
tied to the X server with its display at "hostname:0".  If the hostname
changes to "newhostname" and you DON'T restart X, there'll be no
"newhostname:0" display and you won't be able to open any new X clients.
End of story.

If you're not sure if you'll get DHCPd before or after X comes up, the
best bet is to define a fixed hostname and tie it to 127.0.0.1 in
your /etc/hosts file (you already have one..."localhost") and ignore any
hostname the DHCP server gives you.

this only works if you define the hostname in /etc/sysconfig/network

 Edit your dhclient.conf file and
add 'supersede host-name "localhost"' to the stanza that defines your
connection.  For example (stripped down to minimums),

       timeout 60;
       retry 60;
       reboot 10;
       select-timeout 5;
       initial-interval 2;

       interface "wlan0" {
           supersede host-name "localhost";  <<<---NOTE! Ignore DHCP
           request subnet-mask, broadcast-address, time-offset, routers,
                domain-name-servers;
           require subnet-mask, domain-name-servers;
       }

This seems to be the best solution.

Thank you.


Alternately, you can accept the hostname the DHCP server gives you and
then add some commands to /usr/sbin/dhclient-script (e.g.
"/usr/sbin/gdm-restart") so X restarts with the new hostname.  I leave
that as an exercise for the reader.

Hum!? there is no difference with: closing your session after setting up the network, then log in again. And it is quite violent!

--
François Patte
UFR de mathématiques et informatique
Université René Descartes
http://www.math-info.univ-paris5.fr/~patte

--
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux