diff --git a/src/fenrirscreenreader/commands/commands/export_clipboard_to_x.py b/src/fenrirscreenreader/commands/commands/export_clipboard_to_x.py index e4a7fe49..296c93bd 100644 --- a/src/fenrirscreenreader/commands/commands/export_clipboard_to_x.py +++ b/src/fenrirscreenreader/commands/commands/export_clipboard_to_x.py @@ -6,6 +6,7 @@ from fenrirscreenreader.core import debug import os +import importlib import _thread import pyperclip @@ -42,6 +43,7 @@ class command(): # Set display environment variable os.environ['DISPLAY'] = display # Attempt to set clipboard content + importlib.reload(pyperclip) # Weird workaround for some distros pyperclip.copy(clipboard) # If we get here without exception, we found a working display success = True diff --git a/src/fenrirscreenreader/commands/commands/import_clipboard_from_x.py b/src/fenrirscreenreader/commands/commands/import_clipboard_from_x.py index 2d6224d5..40f395e1 100644 --- a/src/fenrirscreenreader/commands/commands/import_clipboard_from_x.py +++ b/src/fenrirscreenreader/commands/commands/import_clipboard_from_x.py @@ -5,6 +5,7 @@ # By Chrys, Storm Dragon, and contributers. from fenrirscreenreader.core import debug +import importlib import _thread import pyperclip import os @@ -34,6 +35,7 @@ class command(): # Set display environment variable os.environ['DISPLAY'] = display # Attempt to get clipboard content + importlib.reload(pyperclip) # Weird workaround for some distros clipboardContent = pyperclip.paste() # If we get here without exception, we found a working display if clipboardContent: