How to tell if a full-screen application is running?

Is it possible in python to tell if a full screen application on linux is running? I have a feeling it might be possible using Xlib but I haven't found a way. EDIT: By full screen I mean the WHOLE...

Problems importing python-Xlib

I installed a new module and it appears as if one of its dependencies was not already installed. The module is called Xlib.display. Here is the error message I received: from Xlib.display import...

How to manage my application window with python-xlib?

I would like to find a linux-wide (insofar as it uses X11) way to control the window geometry of my application, which I program using Python. All my researches point to using python-xlib, which...

Get display count and resolution for each display in Python without xrandr

I'm running Ubuntu and I want to get the number of attached displays, their current resolution and, if possible, their position in relation to each other. Because I don't like parsing Console...

How do you install Python Xlib with pip?

"Python Xlib" ( http://pypi.python.org/pypi/Python%20Xlib ) is a low level python library for working with xlib. I have installed it on my Ubuntu Linux machine via apt, i.e. sudo aptitude install...

Selenium firefox browser is not working on centos 6.0 using Python

How do I get Selenium to work on Centos 6.0? I get the below error. I am using selenium 2.31.0 on python 2.6 yum install ImageMagick ImageMagick-perl xorg-x11-server-Xephyr Xvfb firefox sudo...

python xlib xgrabkey keyrelease events not firing

i want to catch keydown and keyup events with python xlib, but keyup events disappear when some keys are pressed simultaneously. if 2 or more keyes are released simultaneously then there will be 2...

Xlib and Firefox behavior

I'm trying to create a small window manager (just for fun), but I'm having problems in handling windows created by Firefox (only with that application, other apps works fine) The problem is, after...

Can I run Scrapy on Windows with Python 3?

Seems like Scrapy 1.1.0rc3 isn't working on Windows with Python 3. When I run scrapy crawl dmoz command specified on Scrapy tutorial I get following exception: D:\Copy From 2\Python...

How to install the pyautogui module on RedHat

I've been using the Python module pyautogui on Windows where it is fairly simple to install and need to install it on a RedHat server for work. The official documentation gives the following...

How do I get the active window on Gnome Wayland?

Background: I'm working on a piece of software called ActivityWatch that logs what you do on your computer. Basically an attempt at addressing some of the issues with: RescueTime, selfspy, arbtt,...

pip3 install pyautogui, error code 1

I can't install pyautogui i've tried everything, such as pip3 install pillow also followed the steps on the website pyautogui website. Here is the message i receive when...

Pyautogui does not move the actual mouse pointer

I've been having a problem with pyautogui. Anytime I use the functions, it works, but it uses an "invisible" mouse pointer. Basically the module doesn't use the mouse to click things, but they...

How to simulate python key presses in Google Collab notebook?

I have developed a Collab notebook in Python that intends to simulate keyboard keys' presses in order to play a game which it will monitor as a part of reinforcement learning. I have tried using...

Python3.6 and Pyautogui - Pixel commands - TypeError: __new__() takes 4 positional arguments but 5 were given

I'm relatively new to Python and I'm attempting to make a fun little project using Pyautogui and Python3.6. The goal of this project is to create a tensorflow powered project that learns to play...

How do I write text to the root window using Python's Xlib?

I'm running a Debian 10 stable x64 system with the dwm window manager, and I'm using Python 3.7.3. From what I can tell from some example code and the draw_text method itself, I should be able to...

Gnome Keybinder doesn't bind properly to XF86AudioPlay

I've successfully managed to get a Python program to listen for Control+Alt+P and Control+Alt+O even when the window doesn't have focus. However I can't seem to capture <FX86Audio...> events even...

Get notifications when active X window changes using Python xlib

I'd like to monitor which window is active on a Linux system running X, and when that active window gets resized or moved. I can monitor the active window (it's held in the _NET_ACTIVE_WINDOW...

PyArcade (Pyglet) python3 Help needed

Python 3.8.1 using python-arcade and linux manjaro os This project is a multiplayer game built with python arcade I get these errors while running : class Client(arcade.Window): def...

ModuleNotFoundError: No module named 'pynput' Python3 and pip3

I want to use 'pynput', so I used pip to add it to my environment. The installation proceeds without problem. But I am unable to import it into my project. I am using python 3.8.1 on my...

How to send a key press after capturing another key event in X11

I'm trying to implement a Python script in Linux to capture the key press a send the key press a again (so it sends a twice). Through some code at...

How do I not get OSError: [Errno -9993] Illegal combination of I/O devices when using pyaudio

I believe it's this module that's crashing my program and throwing this error: OSError: [Errno -9993] Illegal combination of I/O devices. I wrapped the call to this module in a try except...

Works in terminal but not in VS code

I have a problem that just drives me crazy. I have a python script, that works when I run it in the terminal (ubuntu) but not in vscode. The terminal code is just: python helper.py and the...

Python3 xlib: Failed to parse Xauthority

As a minimal example, the following code: from Xlib import xauth xauth.Xauthority() gives the following output: Xlib.xauth: warning, failed to parse part of xauthority file...

/usr/bin/env: ‘python’: No such file or directory

I am trying install Docker with Minetest thought Make. I download Dockerfile Makefile and supervisord.conf from here: https://github.com/zaoqi/minetest-novnc-docker Use fromdos to convert them to...

python pywhatkit module take much time to install and not install in linux

I am using vs code in linux(raspberry pi 4), when i am trying to install pywhatkit python module using pip, pip3 install pywhatkit, it download some data of pywhatkit, after some time it freeze at...

Pyinstaller - python script converted to .exe doesn't execute the program in the way expected

I wish to convert my .py script (which works perfectly when executed) into .exe using Pyinstaller, however when the conversion is done and I launch the newly made .exe file, the cmd pops up with...

How to get a variable loaded from .Xresources?

I'm using Regolith which loads a bunch of Xresources, with variables like i3-wm.font: typeface_wm in some Xresources file. As far as I understand, these should be loaded into to X11 window system,...

Why can't I use Pyautogui in Ubuntu 20.04 LTS?

I've been trying to use Pyautogui at Ubuntu, but I simply can't make it work, while I have no trouble doing it at Windows. It doesn't matter what dependency I install, everytime I try to use...

Is it possible to run X11 on Gitlab CI?

I'm trying to use pyinstaller to build a python game into a binary file. I had it working, but today I switched to using arcade instead of pygame. I can build this fine locally, but when...

Relevant tags