summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--usr/share/mageiawelcome/helpers.py16
-rw-r--r--usr/share/mageiawelcome/index.html1
-rw-r--r--usr/share/mageiawelcome/mageiawelcome.py4
3 files changed, 21 insertions, 0 deletions
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<br />
$kernel_l $kernel<br />
$arch_l $arch<br />
+ $desktop_l $desktop<br />
</div>
</header>
<section>
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'] = _("<p>Thank you for choosing Mageia!</p><p> 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.</p><p>To find out how you can help <a class='weblink' href='http://www.mageia.org/en/contribute/'>click here</a>.</p><p>Don't forget to tell your friends about Mageia.</p>")