#!/usr/bin/python

import os
import commands  

tool = "/usr/lib/linuxmint/mintBackup/mintBackup.py"
sentence = "Please enter your password to launch mintBackup"
icon = "/usr/lib/linuxmint/mintBackup/icon.svg"

desktop_environnment = commands.getoutput('/usr/lib/linuxmint/common/env_check.sh')
launcher = "gksu  --message \"<b>%s</b>\"" % sentence 

if (desktop_environnment == "KDE"):
    launcher = "kdesudo -i %s -d --comment \"<b>%s</b>\"" % (icon, sentence)

command = "%s %s" % (launcher, tool)
os.system(command)