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
2
votes
0 answers

xdotool key ignored by Firefox while working on other windows

I'm on Ubuntu 20, Firefox 84.0 (64-bit). I've been trying to use xbindkeys and xdotool to create custom keyboard shortcuts for special characters like '→' or '«' (in brief, I hate compose key and ctrl+shift+u methods, I have always prefered…
mrt
  • 133
  • 1
  • 7
2
votes
1 answer

Lock keyboard and mouse while running xdtool commands through a sh script

Consider the following illustrative sh script which uses xdtool to open a new tab in the terminal, change it to tab 1, and then write "Hello world": #!/bin/sh cd ${0%/*} || exit 1 # run from this directory xdotool key ctrl+shift+t …
Élio Pereira
  • 181
  • 1
  • 14
2
votes
2 answers

C++ desktop GUI testing on Travis CI

I enjoy Travis CI a lot for continuous integration testing. I test most of my C++ console, desktop (Qt, SFML) and web (using Wt) applications with it. It is great for testing browser-based applications and has documented this nicely. One thing I…
2
votes
1 answer

Pasting on input field via python

I am having difficulty finding a proper solution to paste my input into a input field. I am using the library Xdo. What am i doing ? The Python file is running in the backend. The program fetches data from a Smart card. Data returned are numerical…
Sijan Shrestha
  • 2,136
  • 7
  • 26
  • 52
2
votes
3 answers

How to use xdotool to open a new tab, switch to it and run commands in it

I am trying to write a bash script to automate running some commands. However some of these commands should be running in their own terminal tab. So I use the following in my bash script to open a new tab: xdotool key ctrl+shift+t this does the…
MehdiB
  • 870
  • 12
  • 34
2
votes
4 answers

Why does xdotool type twice ? How can I avoid it?

[Wed Aug 05 20:49:43 deppfx@localhost:~] $xdotool type password password[Wed Aug 05 20:50:51 deppfx@localhost:~] $password How can I avoid this ? Can someone please explain this behavior ?
deppfx
  • 701
  • 1
  • 10
  • 24
2
votes
1 answer

DOSBox screen capture to specific file

I have a project where I am trying to 'stream' a DOS game, working in DOSBox on Ubuntu. The idea is to take screenshots of the screen, then upload these to a server. To take screenshots from DOSBox, I use xdotool to trigger the key combination…
kubuzetto
  • 1,046
  • 1
  • 12
  • 31
2
votes
4 answers

How to change url on Chromium kiosk mode via ssh

I have a Chromium running in Kiosk mode. I want to change the URL of the page via SSH If it weren't in Kiosk mode I'd use xdotool: export DISPLAY=":0" WID=$(xdotool search --onlyvisible --class chromium|head -1) xdotool windowactivate ${WID} xdotool…
EDP
  • 309
  • 1
  • 6
  • 18
2
votes
0 answers

How to make kate copy (ctrl+c) with xdotool

I am trying to make the Kate editor copy the current line or the current selection to clipboard using xdotool. Using xdotool I could move the cursor and delete and do other actions but not copy. The copy shortcut (ctrl+c) works if I press it in kate…
2
votes
2 answers

Hiding active window in linux

I have written a small script to hide a Chrome window but want to modify the code to hide the active window. I can use xdotool to get the active window id and hide it. I run into problems when I want to unhide it. How do I check for a hidden…
JoeJoe
  • 119
  • 1
  • 6
2
votes
3 answers

Bash Script: Delete characters in string up to and including a phrase?

I have a bash script for hiding X11 windows. I want to be able to find what window the mouse is positioned over and unmap that window. Using xdotool I've gotten a way to find the window ID: $ xdotool getmouselocation x:392 y:344 screen:0…
Wyatt Ward
  • 1,056
  • 12
  • 18
2
votes
1 answer

Unable to send alt key with xdotool

I am trying the following command: xdotool key --clearmodifiers --delay 500 alt+f and the result is the following error: X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 132…
milarepa
  • 759
  • 9
  • 28
2
votes
1 answer

xdotool output lost in iTerm2

I am running Mac OS X 10.7.5. I have installed XQuartz v2.7.4, and along with it X11 v2.6.5. I have started iTerm2 with Xserver, and I believe it's working correctly since when I run xdpyinfo, the beginning of the output in xterm and in iterm2 is…
user1797466
  • 507
  • 6
  • 14
2
votes
2 answers

(SED) : code works ok via terminal, but not in a bash script. what should i "escape"?

In terminal let's run.. a=' aa a ' b=`echo $a | sed -e 's/^ *//g' -e 's/ *$//g'` i believe it removes empty spaces from beginning and ending of the script. but preserves the empty space inbetween aa a but when i run this in a bash script.. it…
user2716439
2
votes
1 answer

xdotool : how to wait so file opens and then execute ( xdotool windowactivate --sync $a )

What we have here is a code that looks for the title AAA if it finds it, it activates it and then repositions it. but the problem is, if the file is not open.. it will open it just fine. however won't activate and reposition it. a=`xdotool search…
user2694283
1 2
3
10 11