If there's a broken symlink in .config/menus, tl-desktop-activate.sh will crash: $ sh -x /opt/thinlinc/etc/xstartup.d/35-tl-desktop-activate.sh + ID='id -u' ++ id -u + '[' 1028 -ne 0 ']' + /opt/thinlinc/bin/tl-desktop-builder Traceback (most recent call last): File "/opt/thinlinc/bin/tl-desktop-builder", line 63, in <module> write_menu ( II , ooo0Oo0 ) File "/opt/thinlinc/modules/thinlinc/tl_desktop/apps.py", line 202, in write_menu os . symlink ( iiIIiIiIi , Ii1iIiii1 ) ; OSError: [Errno 17] File exists + rm -f /var/tmp/kdecache-bobby/ksycoca + rm -f /var/tmp/kdecache-bobby/ksycoca4 This is due to this code: if os.path.exists(mfsl): os.unlink(mfsl) os.symlink(menufile, mfsl); But os.path.exists returns False for broken symlinks: >>> os.path.exists.__doc__ 'Test whether a path exists. Returns False for broken symbolic links'