Questions tagged [xdotool]
xdotool is a command-line tool to automate GUI tasks such as window manipulation. It can simulate key presses and mouse clicks.
179
questions
0
votes
0
answers
100
views
xdotool send request in Postman
I am trying to "Send Request" in Postman active tab from terminal with xdotool.
In Postman, we can use ctrl+enter key combination to "Send Request". So I tried:
xdotool search --onlyvisible --class ...
3
votes
1
answer
960
views
Keyboard shortcut to move to next window
I have a question much like this one:
keyboard shortcut to switch to next window
I'm looking for a shortcut that allows me to cycle through the windows that are currently open.
The reason why Alt+...
0
votes
0
answers
120
views
Remap Super+Left to the Home button
I want to remap Super+Left key combination to the Home button. I tried tools like xdotools, xte and xbindkeys, but for some weird reason it worked only on Firefox, and not on any other window.
...
1
vote
2
answers
287
views
how to register a shortcut key to type a diacritic in icewm?
I am trying to setup shortcut keys to type common diacritics.
I am able to have xdotool type the diacritic in a terminal or from the icewm command bar (or even from gmrun):
xdotool key Aacute
But ...
5
votes
1
answer
5k
views
xdotool: moving window "above" 0 0
As per the title. When I do
xdotool getactivewindow windowmove 0 0 windowsize 1200 $height_first_monitor
xdotool moves the window. But when I do
xdotool getactivewindow windowmove -40 0 windowsize ...
0
votes
1
answer
397
views
xdotool Desktop issue
I am very new to this, so I hope not to offend.
I am trying to create Desktop.desktop icons for my HTPC (Home theatre PC). Each icon, once pressed should open the URL and maximise the screen. My code ...
1
vote
0
answers
1k
views
xdotool send mouse move action to background window?
I've been using xdotool click and xdotool key with --window $win1 as argument to control a window that's in the background. How can I perform a click on a specific button in the background window? ...
6
votes
1
answer
4k
views
Setting terminal window's title: wmctrl versus xdotool
Edit: I am not looking for other ways or better ways to change a window's title or to add titles to tabs in terminals. The answers in the proposed duplicate do not in any way come close to addressing ...
4
votes
0
answers
564
views
Why is there a delay when typing certain characters with xdotool in 18.04?
Using xdotool type or xdotool key with certain characters makes Gnome Shell lock up. For example typing a single slash with xdotool type / or xdotool key slash takes a second or two, but for something ...
1
vote
1
answer
2k
views
Is it possible to identify windows using regular expressions in xdotool?
OS: Ubuntu 18.04
Say I have the following five open windows with mozilla in their title:
$ wmctrl -lx
0x03e00018 0 Navigator.Firefox kububb Ubuntu Manpage: xdotool - command-line X11 automation ...
6
votes
1
answer
4k
views
xdotool how to select desktop send F5 and return?
It sounds simple; xdotool selects desktop, simulates F5 key press and returns focus to calling window / program.
After googling though it doesn't sound simple anymore.
I need to do this from bash / ...
0
votes
1
answer
261
views
xdotool export bad variable name
I have a probably very simple problem, but it's taking a lot of time and I can't seem to find a good solution.
I'm using fusuma on my laptop to use gestures on my touchpad and for that I want xdotool ...
16
votes
1
answer
5k
views
How to determine if window is maximised or minimised from bash script
I have a bash script that moves my windows from the left screen to right screen in dual-screen setup. Currently the way it works is cycling through the window ids that are given by xdotool search --...
1
vote
1
answer
3k
views
How to make xdotool auto-click repeatedly?
How to make xdotool auto-click repeatedly where I place the cursor?
I need the auto-click to start when I press the left button of the mouse + a key, for example AltGr. And to stop when I leave the ...
2
votes
1
answer
3k
views
wmctrl && xdotool as keyboard shortcut [duplicate]
In my workflow I always have tab 1-3 of chrome as specific pages that never change.
I want to make a keyboard shortcut that will navigate to the second tab with Super+Shift+S.
If I execute the ...
2
votes
0
answers
833
views
xdotool getwindowfocus windowclose
What's the difference between xdotool getwindowfocus windowclose and the command executed by Alt+F4?
Firefox complains when being closed by the former method but doesn't complain when using Alt+F4, ...
0
votes
0
answers
454
views
Why are the characters that I typed missing or out of order?
Sometimes when I use LUbuntu 18.04 to type my questions here, the editor echos what I type very slowly. I always believe it is because of memory running out (e.g. too many opened webpages), but ...
4
votes
1
answer
3k
views
Why do `xwininfo` and `xdotool` give different window ids for the same window?
In a tab of a terminal emulator (lxterminal) on Lubuntu 18.04, I try to find out its window id by clicking the same place (where the shell is shown) inside the tab, either by xwininfo
$ xwininfo -...
2
votes
1
answer
3k
views
"import: unable to read X window image: Resource temporarily unavailable"
On Lubuntu 18.04, I am trying to take a screenshot of the current focused window. I am using import from Imagick following https://stackoverflow.com/a/32165476.
It fails in a tab of lxterminal
$ ...
1
vote
1
answer
1k
views
What are the differences between `key` and `type` commands of xdotool?
The xdotool manpage says:
key: Type a given keystroke.
type: Types as if you had typed it.
It is beyond my understanding. Could you explain how they differ?
5
votes
1
answer
8k
views
Does `xdotool key --delay` pause for specified delay between typing every two consecutive keys?
manpage of xdotool says
-- delay milliseconds Delay between keystrokes. Default is 12ms.
I thought that key string will type each character in the string once, and --delay is for pause between ...
4
votes
0
answers
1k
views
What is the purpose of `--sync` with `xdotool mousemove` command?
manpage of xdotool says
--sync
After sending the mouse move request, wait until the mouse is
actually moved. If no movement is necessary, we will not wait. This is
useful for scripts that ...
1
vote
1
answer
234
views
xdotool Up displaying extra characters
I'm trying to use xdotool to configure touchpad gestures on Ubuntu 18.04 with Gnome.
This works fine:
xdotool key ctrl+alt+Down
However this:
xdotool key ctrl+alt+Up
does not change workspaces ...
0
votes
2
answers
2k
views
control xdotool script from keyboard or mouse
I'm using xdotool in a loop controled by an external condition (in the simplest case : ctrl-c). My problem is that my loop is fast and can make it quite tricky to go to my terminal to control my loop ...
4
votes
0
answers
2k
views
xbindkeys and xdotool does not work for Enter or Return
I try to bind some keys to other keys via xdotool commands in .xbindkeysrc. Everything works fine but I cannot simulate Enter by any key. Neither of the following commands work.
"xdotool key KP_Enter"...
1
vote
0
answers
51
views
autotype 'q1' in turn on to 3 terminal windows every hour
I need write a script that can type q1 on 3 terminal windows, then q2, q3, ... , q0 every hour.
how to correct write it?
0
votes
2
answers
437
views
18.04 headphone jack no sound after installing remotemouse
So recently I was able to plug in my headphones to my Ubuntu 18.04 laptop, but now I am not getting any sound. I think it may because I did an apt install of "mono-complete", "xdotool" and "...
0
votes
1
answer
3k
views
xdotool How do I automate click to click 30 times each delayed by 30 secs then repeat again hourly?
Here is a code I have tried:
while sleep 3600; do xdotool mousemove xxx yyy click --repeat 30 --delay 60000 1; done
--clearmodifiers - reset active modifiers (alt, etc) while typing
--window ...
3
votes
1
answer
2k
views
keyboard shortcut to switch to next window
How can I configure shortcut to switch to next window? I use Ubuntu 18.04 with GNOME. I know that I can press Alt + Tab, but pressing It again returns me to previous window instead of next.
Holding ...
32
votes
1
answer
41k
views
xdotool: what are "class" and "classname" for a window?
In light of https://unix.stackexchange.com/a/254854/674 and https://unix.stackexchange.com/questions/458895/how-can-i-bring-a-background-gui-job-to-the-front-of-my-desktop, there is an example from ...
1
vote
0
answers
1k
views
Does xdotool not work with any Windows program?
On Lubuntu 18.04, I have a Windows GUI program running under wine-3.0.2, and its process id is 20709.
When I run:
xdotool search --pid 20709
it doesn't output anything. I was expecting its window ...
2
votes
2
answers
486
views
xdotool type all in uppercase
I have installed xdotool (version 3.20150503.1) in Ubuntu Server 16.04 "Xenial Xerus" LTS (64bits). When I send the command:
xdotool type test
The result is:
TEST
The same with xdotool ...
0
votes
2
answers
2k
views
xdotool - segmentation fault (core dumped)
I installed xdotool in Ubuntu. But it says segmentation fault (core dumped) when I inputted command xdotool getmouselocation. How to solve it?
3
votes
2
answers
985
views
Command for restoring minimized windows
Anyone knows the command to restore minimized windows? I need that command to configure Easystroke. For some reason, misc option is not working in that app so I need to enter the command manually. I'm ...
2
votes
0
answers
2k
views
Why does xdotool seem to fail in Ubuntu with gnome 3?
I'm using gnome 3 with Ubuntu 17.10. I'm trying to open my text-editor of choice and gnome-terminal on startup and have them snap to the right resp. left corner of the screen, as seen in the picture ...
2
votes
1
answer
839
views
xdotool search window of Gedit doesn't work
Need to bind an F key to perform Ctrl-S in Gedit and reload page browser. Can't get xdotool to find Gedit window on Ubuntu 17.10
$ xdotool search --name "Opera" | tail -1
58720257
$ xdotool search --...
2
votes
1
answer
1k
views
17.10 workspaces, xdotool, and wmctrl
Under (not-yet-installed) 17.10, I want a fixed number of
(not dynamic) workspaces; whether they're presented
horizontally or vertically I don't care. Under Ubuntu 16.10
I'm running now, I had do a ...
1
vote
1
answer
321
views
how to redraw or invalidate ubuntu desktop programmatically by c or python
I am now using ubuntu16.04 with GNOME desktop environment. I can change attributes(eg metadata::nautilus-icon-position) of files on desktop by c or python, but desktop display does not update. Then i ...
3
votes
1
answer
3k
views
xdotool how to send Ctrl + mouse wheel up to a program?
In the text editor SciTE, you have to use Ctrl + Mouse Wheel up/down to temporarily change the font size; however, my mouse wheel is broken, so I thought of sending this command through a terminal ...
4
votes
2
answers
2k
views
Alternative to xdotool which is already installed on Ubuntu
I need to use xdotool to quickly automate some click at specific locations of my screen. I could use the following script:
#! /bin/bash
sleep 0.5
xdotool click 200 150
sleep 0.5
xdotool click 200 175
...
3
votes
1
answer
3k
views
xdotool not working after Ubuntu 17.10 upgrade [duplicate]
This is my first day after upgrading from 17.04 to 17.10. I've noticed that xdotool is not working as it used to. For example:
xdotool type "Lorem ipsum" types nothing.
xdotool key ctrl+shift+t ...
1
vote
1
answer
569
views
Command for open terminal to a specified path
I am using a tool which has an option to set up the command to open a custom terminal. I want to open a terminal to a specified folder (i.e - "/home/user/Desktop"). So far I have just been able to ...
0
votes
1
answer
2k
views
How do I fix xbindkeys keyboard to mouse button, repeating key presses when held?
I have a Logitech MX Revolution mouse that has a XF86Search keyboard key on it. I used xdotool to map it as a middle mouse button inside my xbindkeys file.
This mouse click no longer acts like a ...
29
votes
4
answers
12k
views
Equivalent to xdotool for Wayland
I'm looking for a solution working in Wayland to get mouse position, move it and click inside a bash script, all things xdotool can do for X server.
xdotool getmouselocation
is still working, but
...
6
votes
1
answer
25k
views
xdotool script to perform mouse moves and clicks
I'm new to xdotool and I have a bash script to do some automated clicks for me, but the clicks don't seem to be occurring. I think it's because I'm not selecting the window, though I'm not very ...
2
votes
1
answer
3k
views
Trying to use 'xdotool' in a bin/bash shell - help?
We have a '.sh' file that opens chromium browser, then opens an application via an 'http' address, then waits at a login screen for user input (clicking on button) to sign in. I am trying to use ...
3
votes
1
answer
516
views
xdotool type error. Can't type a field starting from - (hyphen/dash) with . (dot) in the same field
$ xdotool type -14.7873
type: unrecognized option '-14.7873'
Usage: type [--window windowid] [--delay milliseconds] <things to type>
--window <windowid> - specify a window to send keys ...
-1
votes
1
answer
474
views
How do I make a shell script loop through multiple if statements forever?
I've made a shell script based on a bunch of snippets and tutorials I've read. I just can't figure out how to fix a syntax error and make it work. Terminal output is:
./afkscript.sh: 2 ./afkscript.sh:...
3
votes
0
answers
623
views
Click & drag with keyboard shortcut
The "click down" key on my laptop touchpad requires too much force, making it difficult to click & drag. I would like to solve this by holding down a keyboard shortcut while dragging along the ...
3
votes
2
answers
1k
views
Type in gedit using xdotool in a script
I want to type a character in a shell and have xdotool send that character's signal to gedit, so that character will be typed in gedit.
I have written this script:
#!/bin/bash
gedit -s &
GEDPID=$...