diff --git a/safeeyes/__main__.py b/safeeyes/__main__.py index 53e0a08e..2d8ac43d 100755 --- a/safeeyes/__main__.py +++ b/safeeyes/__main__.py @@ -30,6 +30,8 @@ def main(): """Start the Safe Eyes.""" + signal.signal(signal.SIGINT, signal.SIG_DFL) # Handle Ctrl + C + system_locale = translations.setup() config = Config.load() @@ -39,5 +41,4 @@ def main(): if __name__ == "__main__": - signal.signal(signal.SIGINT, signal.SIG_DFL) # Handle Ctrl + C main() diff --git a/safeeyes/utility.py b/safeeyes/utility.py index 847615da..0f0149c4 100644 --- a/safeeyes/utility.py +++ b/safeeyes/utility.py @@ -564,7 +564,11 @@ def initialize_platform(): parent_dir = str(Path(local_icon).parent) if os.path.exists(global_icon): - # This icon is already added to the /usr/share/icons/hicolor folder + # This icon is already added to the /usr/share/icons/hicolor folder. + # No need to create a link but we delete potentially stale symlinks + # from e.g. past runs from a virtualenv that has been removed in the + # meantime to avoid ending up with hard-to-debug SafeEyes without icons. + delete(local_icon) continue # Create the directory if not exists