Questions tagged [xdotool]

fake keyboard/mouse input, window management, and more

www.semicomplete.com/projects/xdotool:

This tool lets you simulate keyboard input and mouse activity, move and resize windows, etc. It does this using X11's XTEST extension and other Xlib functions.

Additionally, you can search for windows and move, resize, hide, and modify window properties like the title. If your window manager supports it, you can use xdotool to switch desktops, move windows between desktops, and change the number of desktops.

165 questions
58
votes
2 answers

How to enable "Preserve Log" in Network tab in Chrome developer tools by default?

How to enable "Preserve Log" in Network tools in Chrome developer tools by default? Everytime I press F12 and then select Network tab, I need to click preserve log checkbox to make it preserve request/responses. Is it possible to have it checked all…
14
votes
1 answer

Get X/Y position of caret (input text cursor) under Xorg?

I'd like to display a popover right above where the user is typing, in any Linux app (GTK, Qt, Electron, etc.), running on X. I figured out creating the popover, now I'm trying to figure out how to get the coordinates of the input text cursor (what…
nkkollaw
  • 1,947
  • 1
  • 19
  • 29
12
votes
3 answers

xdotool doesn't work via SSH

I want to use xdotool via SSH but get the following error: Error: Can't open display: (default) I found this solution: export DISPLAY='0:0' Still get nearly the same error :(. I also tried: export DISPLAY=:0; or: export DISPLAY="0:0", ... Always…
Franklin84
  • 463
  • 1
  • 6
  • 20
8
votes
4 answers

xdotool type takes ages and causes entire desktop to freeze

I've been using xdotool type in the past only to type a shrugface on shortcut using xdotool type '¯\_(ツ)_/¯'. That works, but always takes quite a long time and causes the entire desktop to freeze (entirely, not just input) for a few seconds. Didn't…
confetti
  • 1,062
  • 2
  • 12
  • 27
8
votes
1 answer

xdotool recorder

Does anybody know of an automated xdotool script generator? Ideally, I would like to record a series of actions on my desktop and have it automatically made into an xdotool script for me instead of manually adding pauses and counting pixels, etc.
user788171
  • 16,753
  • 40
  • 98
  • 125
7
votes
1 answer

Trying to to run xdotool but getting 'Can't open display: (null)'

I am sorry to reporting this well known error message again. Nothing works for me. I am running on MacOS Catalina, if it is important. I installed xdotool with brew on my Mac and try to run xdotool getmouselocation The error message that follows…
mrbela
  • 4,477
  • 9
  • 44
  • 79
7
votes
4 answers

how do you get window ID for xdotool automatically

I am trying to automate testing forms that selenium would take too long (javascript heavy modern forms), and I want to use xdotool and get window IDs. I see you can call xdotool selectwindow and click it, but then you have to click it each time. I…
codyc4321
  • 9,014
  • 22
  • 92
  • 165
6
votes
1 answer

xdotool commands bound to key shortcuts doesnot work

I like VIM a lot and I wanted to use it's keybindings everywhere. There are many IDE plugins that can emulate this but I wanted more, maybe VIM keybindings in Minecraft? :D or VIM keybindings everywhere without the need to download any plugin. I…
George Shalvashvili
  • 1,263
  • 13
  • 21
6
votes
1 answer

How can I focus window by application / class name in XMonad

I'm trying to do the equivalent of xdotool search "Chromium" windowactivate --sync key --clearmodifiers ctrl+r i.e. I would like to switch to Chromium and reload the current page. However, with XMonad I get the following error: Your windowmanager…
Aton
  • 1,125
  • 8
  • 18
6
votes
2 answers

xdotool how to do horizontal scrolling?

I'm writing a bash script to control a browser remotely. So far I have vertical scrolling implemented using xdotool click 4 //up xdotool click 5 //down How can I implement horizontal scrolling using xdotool? I saw numbers 6 and 7 mentioned on some…
Alex Stone
  • 46,408
  • 55
  • 231
  • 407
6
votes
4 answers

How to reach end of page with xdotool, how to page up and down

How can I command a window to go to end of page with xdotool? "key End" seems to send and End keystroke, but nothing happens: xdotool selectwindow key End "click 5" scrolls down, but how to know if the page has reached the end? Also, the PageUp…
nightcod3r
  • 752
  • 1
  • 7
  • 26
6
votes
4 answers

xdotool and keyboard layout

Problem I am trying to do: xdotool type 'date;' but instead of the expected date; I get: dateq I have a greek keyboard, but when I issue the command the language is set to US. A note: when greek language is used, the key 'q' of the keyboard is…
vkats
  • 117
  • 1
  • 8
5
votes
0 answers

Wayland surface position

I know Wayland protocol doesn't provide option to control shell surface position on the screen. I would like to find a way for controlling window/surface placement. I have tried tools like xdotool and wmctrl, but they only recognize XWayland…
5
votes
2 answers

The way to detect the current mouse cursor type from bash or python

I know that I can get the current location of the mouse cursor by executing "xdotool getmouselocation". I would like to detect the current mouse cursor type such as pointer, beam, or hand cursor from bash terminal or python code. Would this be…
user1350338
  • 97
  • 2
  • 6
5
votes
7 answers

Cron xdotool doesn't run

I am new to using crontab, and I've been trying to get a simple cron job. I want press F5 every 1 minute to refresh Mozzila Firefox. I am using xdotool for press F5. I have script /usr/local/bin/refresh.sh: #!/bin/bash xdotool search --name…
Tomas
  • 49
  • 1
  • 7
1
2 3
10 11