From 4eee8a6f5791427441bc4024ee88932a4b90ccc0 Mon Sep 17 00:00:00 2001 From: Daniel Napora Date: Tue, 5 Nov 2013 14:01:45 +0100 Subject: Show current DE name --- usr/share/mageiawelcome/helpers.py | 16 ++++++++++++++++ usr/share/mageiawelcome/index.html | 1 + usr/share/mageiawelcome/mageiawelcome.py | 4 ++++ 3 files changed, 21 insertions(+) diff --git a/usr/share/mageiawelcome/helpers.py b/usr/share/mageiawelcome/helpers.py index cac5578..1ad236b 100644 --- a/usr/share/mageiawelcome/helpers.py +++ b/usr/share/mageiawelcome/helpers.py @@ -4,6 +4,22 @@ import csv import os +def get_desktop_name(x): + return { + '01KDE4':'KDE', + '02GNOME':'Gnome', + 'LXDE':'LXDE', + '06xfce4':'XFCE', + '10MATE':'Mate', + '10Cinnamon':'Cinnamon', + '05RazorDesktop':'RazorQt', + '23E17':'Enlightenment', + '07IceWM':'IceWM', + '26Openbox':'Openbox', + '03WindowMaker':'WindowMaker', + '09Fvwm2':'Fvwm2', + }.get(x,'Other') + def is_installed(name): return os.WEXITSTATUS(os.system('rpm -q --quiet ' + name)) diff --git a/usr/share/mageiawelcome/index.html b/usr/share/mageiawelcome/index.html index d7e1cf1..63b7cdb 100644 --- a/usr/share/mageiawelcome/index.html +++ b/usr/share/mageiawelcome/index.html @@ -136,6 +136,7 @@ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" $release
$kernel_l $kernel
$arch_l $arch
+ $desktop_l $desktop
diff --git a/usr/share/mageiawelcome/mageiawelcome.py b/usr/share/mageiawelcome/mageiawelcome.py index 5048b67..3899859 100644 --- a/usr/share/mageiawelcome/mageiawelcome.py +++ b/usr/share/mageiawelcome/mageiawelcome.py @@ -51,7 +51,9 @@ def main(): arch = '32-bit' home = os.getenv("HOME") username = os.getenv("USER") + desktop = get_desktop_name(os.getenv("DESKTOP_SESSION")) + #collect packages nad its status listapp = get_listapp() @@ -70,6 +72,8 @@ def main(): l['kernel'] = kernel l['arch_l'] = _("arch:") l['arch'] = arch + l['desktop_l'] = _("Desktop:") + l['desktop'] = desktop l['welcome'] = _("Welcome") l['user'] = username l['welcome_msg'] = _("

Thank you for choosing Mageia!

We have put a lot of effort to provide you with the best possible system, however please note that as nothing in this world is perfect neither is this distribution, therefore we will be very thankful for every contribution you can make to it.

To find out how you can help click here.

Don't forget to tell your friends about Mageia.

") -- cgit v1.2.1