Bug 5230 - Network manager is changing hostname and blocks X from launching applications
Summary: Network manager is changing hostname and blocks X from launching applications
Status: RESOLVED DUPLICATE of bug 3782
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: i586 Linux
Priority: Normal major
Target Milestone: ---
Assignee: Mageia Bug Squad
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-04 14:37 CEST by Kamil Rytarowski
Modified: 2012-06-25 04:53 CEST (History)
5 users (show)

See Also:
Source RPM: networkmanager-0.9.4.0-3.mga2
CVE:
Status comment:


Attachments

Description Kamil Rytarowski 2012-04-04 14:37:18 CEST
Description of problem:
After connecting to a network with networkmanager-0.9.4.0-3.mga2 (WEP), there is changed hostname and therefore it's not possible to launch any X applications anymore.

How reproducible:
Always

Steps to Reproduce:
1. connect to a WEP network with networkmanager
2. read errors
>>>
No protocol specified
Can't open display :0.0
<<<
How to fix? https://bbs.archlinux.org/viewtopic.php?id=59575

add this to: /etc/NetworkManager/NetworkManager.conf
>>>
[keyfile]
hostname = localhost
<<<
restart service, reconnect
Comment 1 Manuel Hiebel 2012-04-04 19:48:43 CEST
I have never seen this bug but well

CC: (none) => mageia, olav, sander.lepik, tmb

Comment 2 Colin Guthrie 2012-04-04 20:45:45 CEST
If this happens then your login DM config is busted (or the DM itself is just buggy). The XAuthority should certainly not be keyed to your hostname.

Can you reproduce simply by logging in as you normally do, becoming root and then changing the hostname manually? If so, it's really not NetowrkManager's fault. Even drakxnet allows you to configure things such that the network conenction can set the hostname (NEED_HOSTNAME=yes IIRC).

But the real thing is how your x is authenticate, and it certainly shouldn't be based on hostname.
Comment 3 Lutz Lacher 2012-04-04 22:18:10 CEST
I had the same problem on Monday after a normal update. I'm using systemd and networkmanager and haven't change any config.
After the update (and a reboot because of glibc) i wasn't able to start any program in LXDE after connecting with networkmanager. I think an updated package changed /etc/hostname but i can't reproduce it any more.
Comment 4 Kamil Rytarowski 2012-04-05 14:20:35 CEST
(In reply to comment #2)
> If this happens then your login DM config is busted (or the DM itself is just
> buggy). The XAuthority should certainly not be keyed to your hostname.
> 
> Can you reproduce simply by logging in as you normally do, becoming root and
> then changing the hostname manually? If so, it's really not NetowrkManager's
> fault. Even drakxnet allows you to configure things such that the network
> conenction can set the hostname (NEED_HOSTNAME=yes IIRC).
> 
> But the real thing is how your x is authenticate, and it certainly shouldn't be
> based on hostname.

[kamil@localhost zap3]$ xclock 
[kamil@localhost zap3]$ hostname
localhost
[kamil@localhost zap3]$ xclock 
[kamil@localhost zap3]$ hostname test_a
hostname: you must be root to change the host name
[kamil@localhost zap3]$ sudo hostname test_a
[kamil@localhost zap3]$ xclock 
[kamil@localhost zap3]$ hostname 
test_a
[kamil@localhost zap3]$
Comment 5 Kamil Rytarowski 2012-04-27 21:26:39 CEST
Ping!

After fresh boot.iso installation this is still true.
Comment 6 Colin Guthrie 2012-04-29 00:01:24 CEST
Just to satisfy my thoughts here, can you install and use gdm as your DM and see if this is still a problem?
Comment 7 Kamil Rytarowski 2012-04-29 16:27:58 CEST
(In reply to comment #6)
> Just to satisfy my thoughts here, can you install and use gdm as your DM and
> see if this is still a problem?
With GDM + Gnome3: No, it's not.
Comment 8 Colin Guthrie 2012-04-29 17:16:39 CEST
So if things work in GDM+Gnome, I'd suggest that this is more of a problem with KDE and KDM then rather than NetworkManager per-se.
Comment 9 Kamil Rytarowski 2012-04-29 17:41:36 CEST
(In reply to comment #8)
> So if things work in GDM+Gnome, I'd suggest that this is more of a problem with
> KDE and KDM then rather than NetworkManager per-se.

I have not tested it with KDE and KDM, just Slim + Window Maker.
Comment 10 Colin Guthrie 2012-04-29 17:58:26 CEST
Oh sorry, I just assumed... slim is generally a bit messed up permissions wise and such like :s
Comment 11 Frank Griffin 2012-04-29 19:36:12 CEST
I don't know if this is still the case, but some months back NM had the bad habit of setting the hostname to something set in an NM config file (I believe the default was localhost.localdomain).

The problem occurred when you had a wired connection that started via ifplugd and specified NEED_HOSTNAME=yes.  ifplugd would get and set the hostname from DHCP, and NM would later trample on this.  IIRC, it even issued a syslog message saying that it was doing it.

IINM this eventually got fixed.

Something similar is reported in bug#3782.

CC: (none) => ftg

Comment 12 Marja Van Waes 2012-05-26 13:10:01 CEST
Hi,

This bug was filed against cauldron, but we do not have cauldron at the moment.

Please report whether this bug is still valid for Mageia 2.

Thanks :)

Cheers,
marja

Keywords: (none) => NEEDINFO

Comment 13 Manuel Hiebel 2012-06-25 04:53:44 CEST
indeed yes exactly the same

*** This bug has been marked as a duplicate of bug 3782 ***

Keywords: NEEDINFO => (none)
Status: NEW => RESOLVED
Resolution: (none) => DUPLICATE


Note You need to log in before you can comment on or make changes to this bug.