Bug 28280 - Drakxtools fail to launch in GUI mode after configuring network
Summary: Drakxtools fail to launch in GUI mode after configuring network
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: High normal
Target Milestone: Mageia 9
Assignee: Mageia tools maintainers
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-02 20:27 CET by Ben McMonagle
Modified: 2023-01-03 07:57 CET (History)
5 users (show)

See Also:
Source RPM:
CVE:
Status comment: workaround added to xinitrc package and pushed.


Attachments
launchGUIs script (69.70 KB, application/zip)
2021-02-02 21:12 CET, Ben McMonagle
Details

Description Ben McMonagle 2021-02-02 20:27:33 CET
Description of problem:Running MCC from the Live system is ok. after installation and reboot into the installd system, MCC will not open after the authentication dialogue is accepted. running from a user terminal, the dialogue box appears and accepts input, but after choosing *authenticate*, the dialogue closes with no GUI presented. from a root terminal, running mcc brings up the drakconf ncurses window.

# hostnamectl set-hostname set_a_name and rebooting does not appear to fix this.

Version-Release number of selected component (if applicable):

PATH: Mageia-8-rc-Live-Xfce-i586
ISO:  Mageia-8-rc-Live-Xfce-i586.iso
DATE: Sun 31 Jan 2021 02:23:32 PM CET


How reproducible:
on this hardware - often

Steps to Reproduce:
1.install from above .iso and reboot
2.attempt to open MCC
3.
Comment 1 Ben McMonagle 2021-02-02 20:29:45 CET
output of terminal:

$ mcc
Too late to run INIT block at /usr/lib/perl5/vendor_perl/Glib/Object/Introspection.pm line 257.
Ignore the following Glib::Object::Introspection & Gtk3 warnings
No protocol specified
Unable to init server: Could not connect: Connection refused
Cannot be run in console mode.
Ben McMonagle 2021-02-02 20:30:52 CET

Hardware: All => i586
Keywords: (none) => 8rc1
Target Milestone: --- => Mageia 8
Whiteboard: (none) => round 5

Comment 2 Ben McMonagle 2021-02-02 20:31:41 CET
hardware:

# lspcidrake
lpc_ich         : Intel Corporation|Atom Processor Z36xxx/Z37xxx Series Power Control Unit [BRIDGE_ISA] (rev: 09)
xhci_pci        : Intel Corporation|Atom Processor Z36xxx/Z37xxx, Celeron N2000 Series USB xHCI [SERIAL_USB] (rev: 09)
Card:Intel 810 and later: Intel Corporation|Atom Processor Z36xxx/Z37xxx Series Graphics & Display [DISPLAY_VGA] (rev: 09)
mei_txe         : Intel Corporation|Atom Processor Z36xxx/Z37xxx Series Trusted Execution Engine [CRYPT_OTHER] (rev: 09)
unknown         : Intel Corporation|Atom Processor Z36xxx/Z37xxx Series SoC Transaction Register [BRIDGE_HOST] (rev: 09)
hub             : Linux 5.10.12-desktop586-3.mga8 xhci-hcd|xHCI Host Controller [Hub|Unused|Full speed (or root) hub]
usbhid          : ASUSTek COMPUTER INC.|ASUS Base Station(T100) [Human Interface Device|Boot Interface Subclass|Keyboard]
hub             : Linux 5.10.12-desktop586-3.mga8 xhci-hcd|xHCI Host Controller [Hub|Unused|Full speed (or root) hub]
hid_generic     : ASUSTek COMPUTER INC. ASUS Base Station(T100)
hid_generic     : ASUSTek COMPUTER INC. ASUS Base Station(T100)
hid_generic     : ATML1000:00 03EB:8C0D
hid_generic     : ASUSTek COMPUTER INC. ASUS Base Station(T100)
Morgan Leijström 2021-02-02 20:35:18 CET

CC: (none) => fri

Comment 3 Ben McMonagle 2021-02-02 21:10:08 CET
heres a gotcha.

after running launchGUIs -t 2 as root, it will now work. 
however, not permanently.

issue returns after a reboot.

some  temporary change has been made?
Comment 4 Ben McMonagle 2021-02-02 21:12:31 CET
Created attachment 12303 [details]
launchGUIs script

normally run as user.
if running as root, disable internet, also would not normally be recommended.
Comment 5 Martin Whitaker 2021-02-02 21:15:15 CET
So, from the error message in the terminal, this is definitely an X authentication failure. Can you show the output from hostnamectl after this happens.

Does logging out and logging back in again allow it to work?
Martin Whitaker 2021-02-02 21:24:19 CET

CC: (none) => mageia

Comment 6 Ben McMonagle 2021-02-02 22:22:10 CET
(In reply to Martin Whitaker from comment #5)
> So, from the error message in the terminal, this is definitely an X
> authentication failure. Can you show the output from hostnamectl after this
> happens.
> 

[me@linux ~]$ hostnamectl
   Static hostname: localhost
Transient hostname: linux.local
         Icon name: computer-laptop
           Chassis: laptop
        Machine ID: f1101e7bcd974a3eb74ce91801f15733
           Boot ID: 1e4b8a00c0344481b946aefd165deb57
  Operating System: Mageia 8
            Kernel: Linux 5.10.12-desktop586-3.mga8
      Architecture: x86
[me@linux ~]$ mcc
Too late to run INIT block at /usr/lib/perl5/vendor_perl/Glib/Object/Introspection.pm line 257.
Ignore the following Glib::Object::Introspection & Gtk3 warnings
No protocol specified
Unable to init server: Could not connect: Connection refused
Cannot be run in console mode.

~
launchGUIs
~

$ mcc
Too late to run INIT block at /usr/lib/perl5/vendor_perl/Glib/Object/Introspection.pm line 257.
Ignore the following Glib::Object::Introspection & Gtk3 warnings
Subroutine Gtk3::main redefined at /usr/share/perl5/vendor_perl/Gtk3.pm line 539.
GLib-GObject-CRITICAL **: g_boxed_type_register_static: assertion 'g_type_from_name (name) == 0' failed at /usr/lib/perl5/DynaLoader.pm line 210.
GLib-GObject-CRITICAL **: g_boxed_type_register_static: assertion 'g_type_from_name (name) == 0' failed at /usr/lib/perl5/DynaLoader.pm line 210.
GLib-GObject-CRITICAL **: g_boxed_type_register_static: assertion 'g_type_from_name (name) == 0' failed at /usr/lib/perl5/DynaLoader.pm line 210.
GLib-GObject-CRITICAL **: g_boxed_type_register_static: assertion 'g_type_from_name (name) == 0' failed at /usr/lib/perl5/DynaLoader.pm line 210.
"cannot run /usr/sbin/isodumper" since it is not installed [Writing ISO] at /usr/libexec/drakconf line 833.
Oops, secure memory pool already initialized
Oops, secure memory pool already initialized

(authenication dialogue presented, accepted and MCC GUI presented)

$ hostnamectl
   Static hostname: localhost
Transient hostname: linux.local
         Icon name: computer-laptop
           Chassis: laptop
        Machine ID: f1101e7bcd974a3eb74ce91801f15733
           Boot ID: 1e4b8a00c0344481b946aefd165deb57
  Operating System: Mageia 8
            Kernel: Linux 5.10.12-desktop586-3.mga8
      Architecture: x86

not sure what isodumper is doing in there.

will install and see what happens

> Does logging out and logging back in again allow it to work?

will find out in a minute - logging out
.....
no, after logging back in - problem persists.

will see if adding isodumper changes thing
Comment 7 Ben McMonagle 2021-02-02 22:26:31 CET
adding isodumper (gtk) no difference
Comment 8 Martin Whitaker 2021-02-02 22:29:12 CET
When you log out and log back in again, is it disconnecting and reconnecting the network?
Comment 9 Ben McMonagle 2021-02-03 00:26:43 CET
(In reply to Martin Whitaker from comment #8)
> When you log out and log back in again, is it disconnecting and reconnecting
> the network?

yes

so other stuff: 

[me@localhost Documents]$ mcc
Too late to run INIT block at /usr/lib/perl5/vendor_perl/Glib/Object/Introspection.pm line 257.
Ignore the following Glib::Object::Introspection & Gtk3 warnings
No protocol specified
Unable to init server: Could not connect: Connection refused
Cannot be run in console mode.
[me@localhost Documents]$ ./launchGUIs -s 63 -d 1 -t 2
Version 5
Input applications file = /home/me/guiApps.txt
New Results file = /home/me/guiResults.txt
New Failures file will = /home/me/guiFails.txt
Running in Automatic mode
Doing 1 tests 63-63 of 115, for 2 seconds
The following lines will be run (unless excluded) [~ is space]
(it would help to show their source line numbers...)

/usr/bin/gparted~%f


Is this OK? Just Enter to continue, anything else to quit: 

========================================================
Trying line 63, test 1/1: '/usr/bin/gparted %f'
localuser:root being added to access control list
New process correctly found: 19067 gparted, killing it
./launchGUIs: line 326: 19067 Killed                  $COMMAND
y/usr/bin/gparted %f seems to WORK
========================================================

1/1 apparent successes, 0/1 apparent failures
Press Enter to see the result summary (Q|q to quit 'less')  

mv: cannot stat '/home/me/guiFails.txt.19029': No such file or directory
[me@localhost Documents]$ mcc
Too late to run INIT block at /usr/lib/perl5/vendor_perl/Glib/Object/Introspection.pm line 257.
Ignore the following Glib::Object::Introspection & Gtk3 warnings
Subroutine Gtk3::main redefined at /usr/share/perl5/vendor_perl/Gtk3.pm line 539.
GLib-GObject-CRITICAL **: g_boxed_type_register_static: assertion 'g_type_from_name (name) == 0' failed at /usr/lib/perl5/DynaLoader.pm line 210.
GLib-GObject-CRITICAL **: g_boxed_type_register_static: assertion 'g_type_from_name (name) == 0' failed at /usr/lib/perl5/DynaLoader.pm line 210.
GLib-GObject-CRITICAL **: g_boxed_type_register_static: assertion 'g_type_from_name (name) == 0' failed at /usr/lib/perl5/DynaLoader.pm line 210.
GLib-GObject-CRITICAL **: g_boxed_type_register_static: assertion 'g_type_from_name (name) == 0' failed at /usr/lib/perl5/DynaLoader.pm line 210.
Oops, secure memory pool already initialized

(authenication dialogue presented, accepted and MCC GUI presented)
Comment 10 Ben McMonagle 2021-02-03 00:37:36 CET
dont know if this is helpful:

running gparted from terminal and ctrl+c to kill the dialogue box does allow mcc then to present GUI
Comment 11 Ben McMonagle 2021-02-03 00:46:18 CET
heres a trick:

connecting to the wifi via drakroam, then logging out or rebooting, MCC works.

disconnection wifi via drakroam and reconnect with network manager = no MCC
Comment 12 Martin Whitaker 2021-02-03 00:47:42 CET
(In reply to ben mcmonagle from comment #9)
> (In reply to Martin Whitaker from comment #8)
> > When you log out and log back in again, is it disconnecting and reconnecting
> > the network?
> 
> yes

Ah, I suspect when you configured the network interface, you didn't tick the box to let all users share it. That would make a difference. Each time the connection is made, NetworkManager tries to discover and set the hostname from the network. linux.local is the default name returned by a reverse DNS lookup.

> Trying line 63, test 1/1: '/usr/bin/gparted %f'
> localuser:root being added to access control list

So either launchGUIs or gparted is relaxing the X access permissions, which is why MCC starts afterwards. You can do the same by (as your normal user)

  xhost +si:localuser:root

Setting a proper hostname should fix the problem. I don't know why 'hostnamectl set-hostname' didn't work for you. You could try doing it manually by editing the /etc/hostname file.

The other possible fix is to append the line

  hostname-mode=none

to the /etc/NetworkManager/NetworkManager.conf file, which will stop NetworkManager meddling with the hostname.
Comment 13 Martin Whitaker 2021-02-03 09:41:18 CET
The problems are more widespread than first thought. Even on the Plasma Live, which doesn't use NM, running drakconnect to configure the network and leaving the host name as the default of localhost.localdomain causes subsequent attempts to start the MCC (or any drakx GUI tool) to fail. There has been some subtle change to the way host names are managed by the system. On Mageia 7, hostnamectl would report

[root@localhost ~]# hostnamectl
   Static hostname: localhost.localdomain
 
whilst on Mageia 8 it reports

[root@localhost ~]# hostnamectl
   Static hostname: localhost.localdomain
Transient hostname: localhost

So I think the fix for all this is to do the same as we used to do for GNOME/Wayland, and have a startup script that executes

  xhost +si:localuser:root

each time a user starts a graphical session.
Comment 14 Morgan Leijström 2021-02-03 14:45:19 CET
I see this on Live Xfce 64 RC1 take 5

As an industrial machine designer i am stumped at why answering the phone in the office makes all control panels in manufacturing die...

Confirming workaround: In Terminal window:
 $ xhost +si:localuser:root
 localuser:root being added to access control list
Morgan Leijström 2021-02-03 14:45:46 CET

Severity: normal => major
Hardware: i586 => All
Priority: Normal => release_blocker

Comment 15 Morgan Leijström 2021-02-03 14:46:56 CET
forgot to say:

...and then MCC launches OK from both icon and Terminal.
Morgan Leijström 2021-02-03 19:17:01 CET

Summary: Installed from Live Xfce32 MCC does not open after authentication entered => Drakxtools fail to launch in GUI mode after configuring network

Comment 16 Thomas Andrews 2021-02-05 03:10:20 CET
(In reply to Martin Whitaker from comment #13)
> The problems are more widespread than first thought. Even on the Plasma
> Live, which doesn't use NM, running drakconnect to configure the network and
> leaving the host name as the default of localhost.localdomain causes
> subsequent attempts to start the MCC (or any drakx GUI tool) to fail. There
> has been some subtle change to the way host names are managed by the system.
>
Well now this is weird. I have a Plasma install created by the Live iso just yesterday, and it's not showing the problem. 

The system is wifi-only, and the wifi was set up using the net_applet before the install, so maybe that did an end-run around drakconnect. 

After the boot the first thing I did was call up MCC, and everything is normal. I set up the Princeton mirror, and went after updates. When there were none, I used urpmi --auto-update. That got me several, but even after another boot MCC behaves normally. 

I did retain /home through the install, and as far as that goes this /home once belonged to a Mageia 7 install. I didn't do anything with the hostname - it's whatever it was set by the installer.

CC: (none) => andrewsfarm

Morgan Leijström 2021-02-05 14:31:38 CET

Keywords: (none) => IN_ERRATA8

Comment 17 Dave Hodgins 2021-02-06 22:47:03 CET
How about a script in /etc/X11/xinit.d/ with ...
#!/bin/sh
while inotifywait -e modify /proc/sys/kernel/hostname; do
    xhost +si:localuser:root
done

Untested at this point.

CC: (none) => davidwhodgins

Comment 18 Thomas Backlund 2021-02-12 13:27:02 CET
(In reply to Martin Whitaker from comment #13)
> The problems are more widespread than first thought. Even on the Plasma
> Live, which doesn't use NM, running drakconnect to configure the network and
> leaving the host name as the default of localhost.localdomain causes
> subsequent attempts to start the MCC (or any drakx GUI tool) to fail. There
> has been some subtle change to the way host names are managed by the system.
> On Mageia 7, hostnamectl would report
> 
> [root@localhost ~]# hostnamectl
>    Static hostname: localhost.localdomain
>  
> whilst on Mageia 8 it reports
> 
> [root@localhost ~]# hostnamectl
>    Static hostname: localhost.localdomain
> Transient hostname: localhost
> 
> So I think the fix for all this is to do the same as we used to do for
> GNOME/Wayland, and have a startup script that executes
> 
>   xhost +si:localuser:root
> 
> each time a user starts a graphical session.


Seems no-one has a better solution for now so we should go for this one.
Can you do it so we can get wide testing 

Then with a little dreaming hope to get it better fixed in mga9
Comment 19 Aurelien Oudelet 2021-02-12 22:41:56 CET
Workaround has been pushed to repository to xinitrc package

http://svnweb.mageia.org/packages?view=revision&revision=1675229
This need a Real test please.

Thanks Martin W.

Status comment: (none) => workaround added to xinitrc package and pushed.
CC: (none) => ouaurelien

Comment 20 Aurelien Oudelet 2021-02-16 05:11:21 CET
Works as expected under Cinnamon, GNOME Wayland, GNOME, XFCE, icewm-session.

Reducing as not a blocker one.

Target Milestone: Mageia 8 => Mageia 9
Priority: release_blocker => High

Comment 21 Morgan Leijström 2021-02-16 11:17:02 CET
Do the fix it not work in Plasma?
Comment 22 Morgan Leijström 2021-02-16 19:14:45 CET
Is this related:
Bug 28365 - Control Center does not start in Plasma Wayland
Comment 23 Martin Whitaker 2021-02-16 20:51:14 CET
(In reply to Morgan Leijström from comment #22)
> Is this related:
> Bug 28365 - Control Center does not start in Plasma Wayland

It's related in that it's an X authorisation problem, but it has a different cause. See bug 26101.
Comment 24 Morgan Leijström 2021-02-24 23:54:27 CET
Now removed from Errata, including the mention of bug 27601.

Keywords: IN_ERRATA8 => (none)

Comment 25 Aurelien Oudelet 2021-03-05 18:20:03 CET
(In reply to Aurelien Oudelet from comment #20)
> Works as expected under Cinnamon, GNOME Wayland, GNOME, XFCE, icewm-session.
> 
> Reducing as not a blocker one.

Workaround set in xinitrc script.

Assigning to Magiea Tools maintainers, against Cauldron.

Keywords: 8rc1 => (none)
Severity: major => normal
Whiteboard: round 5 => (none)
Assignee: bugsquad => mageiatools
Version: 8 => Cauldron

Comment 26 Ben McMonagle 2023-01-03 07:57:34 CET
fixed

Status: NEW => RESOLVED
Resolution: (none) => FIXED


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