Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9182325
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T18:32:00+00:00 2026-06-17T18:32:00+00:00

I want to simulate mouse clicks in Python (and if it is possible, also

  • 0

I want to simulate mouse clicks in Python (and if it is possible, also keyboard inputs) in a Linux system (Ubuntu), so I am able to create a macro for an external program.

I have researched a bit, and found questions like this which use win32api or ctypes to do the job. But since I am working in Ubuntu, those doesn’t fit for me.

I also found Xaut (former Xautomation), which is said to simulate mouse and keyboard interactions over Linux systems. But it is hard to install for me, and it lacks documentation and examples anyway.

I really like the win32api solution, it’s very simple. Isn’t there any similar solution for Linux?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T18:32:02+00:00Added an answer on June 17, 2026 at 6:32 pm

    Unlike Windows, Linux is a secure system by design so injecting/intercepting user events isn’t simple 🙂

    But there are tools which can do the same on Linux (at least when they have xauth credentials, so no snooping/cracking other users on the same computer). Try xdotool which offers a wide range of commands to find and select windows and then send events to them.

    xdotool is available for most Linux distributions (debian and rpm based).

    Note: For security reasons, synthetic events in X11 have a flag set and some software ignores all events with this flag.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i want to simulate keyboard clicks and to type certain message in Cyrillic. i
Let's say I've got a window for which I want to simulate a mouse
I want to create java code which will stimulate a mouse click on any
I am working on an automated testing library, and want to simulate mouse and
I want to simulate mouse movement every x seconds. For that, I'll use a
I want to write an app that will, given some network input, simulate mouse
Here is the original question but it is considered to java: Simulate mouse clicks
Is it possible to programmatically create input events in c#. I want to be
I want to simulate GMail/Twitter keyboard shortcuts of pressing a key, followed by another
I want to simulate clicking with the mouse on all elements of a given

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.