Skip to content

Linux Compatability #5

@Bluejee

Description

@Bluejee

Please view the Contributing Guidelines for information on Contributing.

Describe the bug
There seems to be slight compatibility erros for some functions like opening files or accessing the mouse location without using xhost + ( which might be insecure.)

To Reproduce
Clone the repo in a linux machine and try to run the main python file.(after installing all the necessary packages.)

Expected behavior
The program should not run, and instead show an error due to the package pyautogui.

Screenshots

Traceback (most recent call last):
  File "/home/user/Desktop/WebMacroDeck/webmacrodeck.py", line 2, in <module>
    import actions
  File "/home/user/Desktop/WebMacroDeck/actions.py", line 1, in <module>
    import pyautogui
  File "/home/user/miniconda3/lib/python3.12/site-packages/pyautogui/__init__.py", line 246, in <module>
    import mouseinfo
  File "/home/user/miniconda3/lib/python3.12/site-packages/mouseinfo/__init__.py", line 223, in <module>
    _display = Display(os.environ['DISPLAY'])
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/miniconda3/lib/python3.12/site-packages/Xlib/display.py", line 80, in __init__
    self.display = _BaseDisplay(display)
                   ^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/miniconda3/lib/python3.12/site-packages/Xlib/display.py", line 62, in __init__
    display.Display.__init__(*(self, ) + args, **keys)
  File "/home/user/miniconda3/lib/python3.12/site-packages/Xlib/protocol/display.py", line 129, in __init__
    raise error.DisplayConnectionError(self.display_name, r.reason)
Xlib.error.DisplayConnectionError: Can't connect to display ":0": b'Authorization required, but no authorization protocol specified\n'

Additional context
This can be solved by using xhost + to authorise the access to display for the package, but that seems like a very insecure way to use the app. xhost +localhost seems to a suggestion, but not working.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions