Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Make your voice heard. Take the 2019 Developer Survey now

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.

0
votes
0answers
30 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 ...
3
votes
1answer
41 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 -...
0
votes
1answer
67 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 $ ...
0
votes
1answer
32 views

What are the differences between `key` and `type` commands of xdotool?

Manpage of xdotool 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? Thanks.
0
votes
0answers
105 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 ...
3
votes
0answers
54 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
1answer
41 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
0answers
25 views

xdotool with the --sync option can take a few seconds in bash script

I am working on some scripts to tile windows on portion of the scripts. Something similar to the keyboard shortcuts available to tile windows, but with my own sizes. I would like to use the --synch ...
0
votes
2answers
190 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 ...
0
votes
0answers
36 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
0answers
19 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
1answer
73 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
1answer
98 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 ...
0
votes
1answer
157 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 ...
3
votes
2answers
913 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
0answers
125 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 ...
0
votes
0answers
83 views

Automatize loggin with Telegram-CLI

I am trying to automatically register for Telegram with Telegram-CLI (https://github.com/vysheng/tg) in two different ways, but without success: 1 - xdotool: When prompts the phone number: xdotool ...
0
votes
1answer
73 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 commando: xdotool type test The result is: TEST The same with xdotool keydown ...
0
votes
0answers
58 views

How to run a command with xdotool on screen edge?

My goal is to set to move workspace to the previous/next when the mouse moves to left/right edge of the screen. My attempt: First I used aliases move_workspace_left/right for myvar=$(expr `xdotool ...
0
votes
2answers
324 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?
1
vote
1answer
53 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
0answers
194 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 ...
1
vote
1answer
201 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 --...
0
votes
0answers
254 views

wmctrl and xdotool on awesomewm working in terminal in a bash script, not when starting up

i run this script fine from terminal, from a .sh file: xdotool search --class chromium set_desktop_for_window %@ 4 & wmctrl -r \"chromium\-browser\" -t 4 & #sleep2 xdotool search --class ...
2
votes
1answer
515 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 ...
0
votes
0answers
124 views

Paste a password on login screen

I've set up a small server with Ubuntu 16.04 LTS and I'm accessing it remotely with teamviewer 12 as it is enough for my needs. I like working with graphical interfaces (as well as with ssh), so ...
1
vote
1answer
146 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 ...
1
vote
0answers
704 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 ...
1
vote
0answers
572 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 ...
1
vote
1answer
985 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
1answer
122 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
1answer
403 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 ...
13
votes
1answer
1k 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 ...
0
votes
1answer
2k 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 ...
0
votes
1answer
611 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 ...
2
votes
1answer
117 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
1answer
237 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:...
2
votes
0answers
125 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
2answers
448 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=$...
5
votes
1answer
465 views

Let xdotool type some text using a different keyboard layout

My situation: I have a notebook with German keyboard layout running Ubuntu 16.04. It hosts an Android VM through QEmu/KVM, which is configured for German keyboard layout as well. When I'm typing ...
1
vote
0answers
34 views

Obtain last active time of window from ID

Distribution used (if that helps): Ubuntu 16.04 LTS with Gnome 3.18.5 I am trying to automate raising a specific application window using a keyboard shortcut. My requirements: Use keyboard shortcut ...
0
votes
0answers
115 views

xdotool output gets intercepted by xbindkeys

I have a broken key on my keyboard, The dot "." to be specific. It behaves very oddly, about 7/10 times the keyboard types a double dot ".." when clicked once. I use xbindkeys to intercept when the ...
1
vote
2answers
2k views

xdotool press key by keycode (press option key)

so I'm trying to make a keyboard shortcut using xdotool. The only thing that I'm missing and that can't find out how to do is this: How to press the option key on my keyboard. In more general case, ...
0
votes
1answer
174 views

Media control with terminal

I've been trying to control my computer's media with terminal commands. The only way I've seen is to emulate a media key using xdotool, which is doesn't work when the screen locks. Is there a lower ...
0
votes
0answers
46 views

How to type xdotool to type double zero or triple zero at a time? [duplicate]

I want to use andromouse to create a number pad. I linked a button to a shortcut to trigger a shell script that contains xdotool type '00' but it does not work. If you guys have solution please ...
5
votes
2answers
545 views

It seems that there is no PID for the window. How do you kill this PIDless window?

I am trying to get the PID of a window "A : Fluid Flow (Fluent) - Meshing" on the right side of this image. The commands that I have found are below. They don't work after I have clicked on the window....
0
votes
1answer
1k views

Alternate for 'clip' command in ubuntu [duplicate]

I am using a python program to copy an input and pasting the output to chrome browser input field . For windows there is the 'clip' command that pastes the data. name = "งดดา" command = 'echo ' + ...
6
votes
2answers
2k views

How to create a shortcut that executes an xdotool command to simulate a key press?

I'm trying to simulate a media key press using a custom shortcut. So far, I've been able to achieve the simulation I need using the command: xdotool key XF86AudioPlay It works perfectly, it pauses ...
0
votes
2answers
1k views

xdotool - how do I select text using shift+Home or shift+End?

I'm trying to get text selection working the way I want on my laptop using Ubuntu 16.04. I don't have home/end keys on my laptop, so I installed xdotool and using the keyboard settings I mapped Super+...
2
votes
0answers
71 views

Can xdotool be used with sub-pixel resolution?

I have a graphics tablet (ug-1200b) which I'm using with Ubuntu. I have written a (somewhat ugly) script which uses libusb to take the raw input and xdotool to emulate mouse movements and clicks. This ...