To write a cross-distribution interface, you do not need much attention.
In fact, the only incompatibility problem that I remember is:
Icon icon or notification area or application indicator (called Ubuntu)
For example, the standard tray icon (created by gtk.StatusIcon does not work in Ubuntu Unity by default
It is better to use appindicator.Indicator if the appindicator module was found, otherwise just use the classic StatusIcon
And if you pay too much attention to the style / theme of your program, you may have problems with other environments such as KDE
If you are not using suitable engines to act as a bridge, see:
https://wiki.archlinux.org/index.php/Uniform_Look_for_Qt_and_GTK_Applications
To find out about / OS distribution, I wrote a function like this:
def getOsFullDesc(): name = '' if os.path.isfile('/etc/lsb-release'): lines = open('/etc/lsb-release').read().split('\n') for line in lines: if line.startswith('DISTRIB_DESCRIPTION='): name = line.split('=')[1] if name[0]=='"' and name[-1]=='"': return name[1:-1] if os.path.isfile('/suse/etc/SuSE-release'): return open('/suse/etc/SuSE-release').read().split('\n')[0] try: import platform return ' '.join(platform.dist()).strip().title()
source share