I am using the following script Mouse Position Python Tkinter
to successfully print out my mouse coordinates on a Raspberry Pi running Raspbian. However, for the script to work I have to run it from the GUI. IS there any way for a Python script running outside of any desktop environment, to detect mouse coordinates and mouse clicks?