def METHOD_NAME(menu_dir):
    """In KDE, the .destop files are not taken into account immediately"""
    for cmd in ["kbuildsycoca5", "kbuildsycoca4", "kbuildsycoca"]:
        if which(cmd):
            subprocess.call([cmd])
            break
    udd = "update-desktop-database"
    if which(udd):
        subprocess.call([udd, menu_dir])