Bug 21454 - mageiawelcome fails to load on login
Summary: mageiawelcome fails to load on login
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 6
Hardware: x86_64 Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Mageia tools maintainers
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-05 15:33 CEST by Jim Beard
Modified: 2018-10-28 22:20 CET (History)
3 users (show)

See Also:
Source RPM: mageiawelcome-1.13-1.mga6
CVE:
Status comment:


Attachments

Description Jim Beard 2017-08-05 15:33:56 CEST
Description of problem:  Mageiawelcome fails to load on login


Version-Release number of selected component (if applicable):
mageiawelcome-1.13-1.mga6


How reproducible:
login, or run manually

Steps to Reproduce:
1.  run mageiawelcome on the command line

$ mageiawelcome
Traceback (most recent call last):
  File "/usr/share/mageiawelcome/mageiawelcome.py", line 251, in <module>
    my_quit_wrapper(main)()
  File "/usr/share/mageiawelcome/mageiawelcome.py", line 242, in fun2
    x = fun(*args, **kwargs) # equivalent to "apply"
  File "/usr/share/mageiawelcome/mageiawelcome.py", line 55, in main
    desktop = get_desktop_name(os.path.basename(os.getenv("DESKTOP_SESSION")))
  File "/usr/lib64/python3.5/posixpath.py", line 139, in basename
    i = p.rfind(sep) + 1
AttributeError: 'NoneType' object has no attribute 'rfind'
Marja Van Waes 2017-08-06 12:02:54 CEST

Assignee: bugsquad => mageiatools
CC: (none) => marja11, napcok, yves.brungard_mageia

Comment 1 papoteur 2017-08-06 20:42:21 CEST
Thanks for the report.
What is you Desktop environment?
Can you give the output of:
echo $DESKTOP_SESSION
Comment 2 Jim Beard 2017-08-07 02:20:53 CEST
XDG_CURRENT_DESKTOP=GNOME

[jim@sorrel ~]$ echo $DESKTOP_SESSION

[jim@sorrel ~]$
Comment 3 papoteur 2017-08-07 11:28:00 CEST
Thanks Jim.
And which DM do you use? GDM?
Comment 4 Jim Beard 2017-08-07 15:31:17 CEST
[jim@sorrel ~]$ cat .desktop
DISPLAYMANAGER=gdm
DESKTOP=GNOME
[jim@sorrel ~]$

Is there a command to verify which desktop is running?
Comment 5 Mageia Robot 2017-08-10 13:59:30 CEST
commit 096701893d70a9e75cb9839ad37ad50a55f68f2f
Author: Papoteur <papoteur@...>
Date:   Thu Aug 10 13:56:07 2017 +0200

    ignore DESKTOP_SESSION when it is void (mga#21454)
---
 Commit Link:
   http://gitweb.mageia.org/software/mageiawelcome/commit/?id=096701893d70a9e75cb9839ad37ad50a55f68f2f
Comment 6 papoteur 2017-08-10 14:03:55 CEST
Hello Jim
Can you test this new version?
Get mageiawelcome.py from git http://gitweb.mageia.org/software/mageiawelcome/plain/usr/share/mageiawelcome/mageiawelcome.py?id=096701893d70a9e75cb9839ad37ad50a55f68f2f
copy it as root in /usr/share/mageiawelcome/
Launch mageiawelcome
If OK, I will push this in a new release.
Comment 7 Jim Beard 2017-08-10 17:00:58 CEST
That did not seem to do it.

[jim@sorrel ~]$ ls -l /usr/share/mageiawelcome/mageiawelcome.py
-rw-r--r-- 1 root root 9830 Aug 10 10:49 /usr/share/mageiawelcome/mageiawelcome.py

[jim@machine ~]$ /usr/bin/mageiawelcome
Traceback (most recent call last):
  File "/usr/share/mageiawelcome/mageiawelcome.py", line 252, in <module>
    my_quit_wrapper(main)()
  File "/usr/share/mageiawelcome/mageiawelcome.py", line 243, in fun2
    x = fun(*args, **kwargs) # equivalent to "apply"
  File "/usr/share/mageiawelcome/mageiawelcome.py", line 54, in main
    desktop = get_desktop_name(os.path.basename(os.getenv("DESKTOP_SESSION")))
  File "/usr/lib64/python3.5/posixpath.py", line 139, in basename
    i = p.rfind(sep) + 1
AttributeError: 'NoneType' object has no attribute 'rfind'
Comment 8 papoteur 2017-08-12 10:09:48 CEST
Hello,
I can't reproduce the problem. I configured a virtualbox machine with GDM, started GNOME, GNOME on Xorg, Gnome Classic, but never got the error.
In the same time, .desktop continue to contain:
DESKTOP=Plasma
This part is very mysterious. I will commit a change to catch any error.
Papoteur
Comment 9 Mageia Robot 2017-08-12 11:39:59 CEST
commit 4c2474ddc50674e1e08bc0d798e71cf39e4834f0
Author: Papoteur <papoteur@...>
Date:   Sat Aug 12 10:23:36 2017 +0200

    better management of DESKTOP_SESSION (mga#21454)
    
    use XDG_CURRENT_DESKTOP instead of reporting "unknown"
---
 Commit Link:
   http://gitweb.mageia.org/software/mageiawelcome/commit/?id=4c2474ddc50674e1e08bc0d798e71cf39e4834f0
Comment 10 papoteur 2017-08-14 22:14:44 CEST
@Jim,
Do you mean to be able to test this new version?
Comment 11 Jim Beard 2017-08-14 23:35:55 CEST
I am not familiar with gitweb, and following the link above did not lead me to something I could easily understand or act on.
What do you wish me to do?  Did you intend I copy and run the new script cited?  Or make the modifications using an editor or some other method?
Comment 12 papoteur 2017-08-15 09:53:20 CEST
Here is the link to get mageiawelcome.py
http://gitweb.mageia.org/software/mageiawelcome/tree/usr/share/mageiawelcome/mageiawelcome.py?id=4c2474ddc50674e1e08bc0d798e71cf39e4834f0
As previously, you can replace it as root  in /usr/share/mageiawelcome/
Comment 13 Jim Beard 2017-08-15 14:24:34 CEST
It looks like that did it.  I replaced /usr/share/mageiawelcome/mageiawelcome.py
with the script I found in Comment 12, and ran the command mageiawelcome.

[jim@machine ~]$ mageiawelcome
ATTENTION: default value of option vblank_mode overridden by environment.
ATTENTION: default value of option vblank_mode overridden by environment.
NOT SANDBOXED
>>> "close"
[jim@machine ~]$

Thank you!
Comment 14 papoteur 2018-10-28 22:20:50 CET
The fix has been published before 6.1 release.

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


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