Stack Exchange Network

Stack Exchange network consists of 175 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

Questions tagged [xdotool]

a command line tool that can simulate X11 keyboard input and mouse activity and manipulate windows

6
votes
1answer
715 views

xdotool and xbindkeys

I have an Acrobat reader that does not zoom on Control+plus but rather on Control+acute (Control-plus annoyingly rotates the document). I would like to fix this using xbindkeys and xdotool but the ...
0
votes
0answers
25 views

Multiple keyboard simulations for multiple programs using xdotool

I have a program that display a set of picture randomly with xdotool: it display a picture in a folder and sometimes it press left arrow,sometimes it press right arrow with xdotool. WHAT I WANT: Now ...
0
votes
2answers
29 views

Trigger a certain key combo with another one

Can anyone suggest me on what would be the best way to trigger a certain key kombo with another one. Say, I'd like to send CTRL+= while pressing CTRL+[. Basically I want to workaround zoom for Google ...
-1
votes
0answers
31 views

On i3 how to simulate natural pressing on key

I use the xdotool commands into my i3 configuration to simulate key pressing and automate my key bindings. I'm on ubuntu but i don't think that change the behaviour of i3 and xdotool. Example, ...
0
votes
1answer
30 views

How to automate a series of keystrokes involving two GUI applications

I have two windowed applications that I need to send a series of keystrokes to. I need to Alt-Tab back and forth between the apps, and I'd like to be able to reduce the number of keystrokes from six ...
3
votes
0answers
79 views

A shrug ¯\_(ツ)_/¯ in awesome key bindings

This is the code I currently have: -- Silly shrug emoji. awful.key({ modkey }, "F12", function () awful.util.spawn("xdotool getactivewindow type '¯\\_(ツ)_/¯'", false) end, {...
3
votes
1answer
220 views

xdotool messes up keyboard input

I'm trying to create some scripts using xev and xdotool to allow me to record and re-play macros in linux. I've got the recording working with xev, and the replaying mostly works but appears to leave ...
0
votes
0answers
36 views

Gnome-terminal's opened after first one is opened & minimised, open but don't come to focus

I am running Arch, tint2 & Openbox with all the latest updates. I have the following snippet in Openbox which is a keyboard shortcut; <keybind key="w-t"><action name="Execute"><...
1
vote
0answers
55 views

Eliminate xdotool delay?

I have assigned the key F2 to the command bash -c "sleep 0.1;xdotool type --clearmodifiers $(date +%Y%m%d%H%M%S)" There is a delay of half a second (not because of the sleep 0.1 command that should ...
0
votes
1answer
1k views

Install problem for xdotool

Since I have problems with my Internet connection I'm not able to always run command apt-get install xdotool in Terminal, so I would like to download the xdotool package manually from website in .zip ...
9
votes
2answers
16k views

How to get window id from xdotool Window Stack

I need id of window which is active or focused. I try to use xdotool command. There is command: xdotool getactivewindow the result is saved to window stack. I want to get widnow id from this window ...
0
votes
0answers
63 views

xdotool getmouselocation and getwindowgeometry Y location inconsistency

I have been working with automating some of the user actions using xdotool and java in Ubuntu 18.04.1 LTS x64 Desktop. I am using java robot to move my mouse and xdotool (via Java Process.exec) to ...
0
votes
0answers
33 views

Use mouse click as keyboard key archlinux + xfce 4.12, no action

Based on this : #!/bin/bash set -x exec &>/tmp/log id=$( xinput list | awk '/Dell USB Keyboard/{print gensub(/.*id=([0-9]+).*/, "\\1", "1")}' ) xdotool mousedown $1 while IFS= ...
0
votes
2answers
258 views

How do I assign WM_CLASS when launching an application

I am using mupdf-gl, and using xprop I don't get the value of WM_CLASS. But if I use mupdf-x11, I do get a value for WM_CLASS. The output of xprop for mupdf-gl: _NET_WM_DESKTOP(CARDINAL) = 2 ...
0
votes
0answers
13 views

how to focus menu window on the object (instead the mouse cursor position) with a xdotool?

I use xdotool key Menu with super R key to show menu. But when i press Super R - menu appears at the current mouse cursor position. Can i make it appears at the current file position
0
votes
0answers
28 views

xdotool type and stty occasionally cut off first letter of input

I defined a simple function prepend (below) that should automatically place a repeated term of a bash command in the following input prompts. For example, by typing prepend git in the terminal, all ...
0
votes
1answer
210 views

how do I make xdotool press ctrl c and ctrl v

xdotool key ctrl+v or ctrl+c does not work (I am on rpi3b+)
0
votes
0answers
82 views

Why do `xwininfo` and `xdotool` give me different window ids?

In a tab of a terminal emulator (lxterminal), I try to find out its window id by clicking in the tab and the process which "owns" the window (I am still not sure what is the word to describe the ...
2
votes
1answer
455 views

Why xdotool is not clicking when restoring position?

Why xdotool is not clicking when restoring position? xdotool mousemove --sync 4000 1000 click 1 mousemove restore If I don't restore the position, it works, example: xdotool ...
0
votes
1answer
52 views

How to break a bash script initiated with xbindkeys?

I initiated a bash script by xbindkeys as "sleep 1;bash /home/scripts/loop.sh" KP_Add How can I bind another key, which can break this bash script? For example, if loop.sh is 1,000 clicks by ...
5
votes
1answer
183 views

XDoTool Command to Wait For Process to End

I use the program VisiPics to delete dupicate pictures. The processing time for deletion varies dependent on the number of pictures and duplicates. I created an Xdotool command to carry out certain ...
0
votes
1answer
194 views

xbindkeys does not bind xdotool key command for a key

I add the xdotool commands to .xbindkeysrc. The commands for mouse work, such as "xdotool mousemove 200 200" q but I keys do not work, such as "xdotool key x" q What can be the reason that the ...
1
vote
1answer
462 views

xdotool: command to resize current active firefox window?

I have multiple firefox windows, I'd like to use a shortcut of current window manager to resize curent active firefox's window to specific size and position. How xdotool command to achieve this? ...
0
votes
1answer
78 views

How can I bring a background GUI job to the front of my desktop?

In Lubuntu 18.04, I have many background GUI jobs running in a bash shell. Among them, I have a evince process running in background: $ jobs | grep evince [29] Running evince ...
4
votes
0answers
1k views

More than one WIDs associated with “Chrome” and with “evince”?

I am running Google Chrome browser with 17 tabs. $ xdotool search --name "Google Chrome" 79691777 Why does the following return 7 WIDs? 7 doesn't match any of the fact that I have 17 tabs in a ...
0
votes
0answers
137 views

Linux Mint 19 - xdotool not minimizing the terminal windows invoked by shortcut

I am using Linux Mint 19. Default terminal is gnome-terminal I created a custom shortcut In Keyboard -> Shortcut with the command gnome-terminal -e /home/ismail/Documents/Translate/screen_ts_short....
1
vote
1answer
695 views

Is it possible to automate clicks with xdotool to control a different GUI session from the one being currently used?

The xdotool command allows us to create scripts controlling the graphical user interface of the system very easily. I can e.g. open my Chrome browser in the following desktop by executing xdotool ...
0
votes
0answers
44 views

Can I unbind a key when a certain window has focus in the sway window manager?

Can I pass some keys for a specific window? I could not find in Sway's man pages or the issues on Github. At the moment, I'm executing a script with bindsym XF86Forward exec sway-next (requires jq ...
7
votes
4answers
15k views

xdotool: How to search for window by title and class with different patterns (similar to AutoHotkey)

xdotool lets you search for windows using its search subcommand. I need to locate a window, that has class 'gvim' and title containing word 'TODO'. How do I do this? What I've tried: You can do ...
0
votes
0answers
70 views

linux mint xdotool type web link

I am trying to use xdotool to type a URL and instead of: https://www.sample.com/sales/search?facet=T&facetT=45259587&facet.T=44143327&facet.T=25866782&facet.T=260287 I get: https;/...
1
vote
1answer
143 views

Error when automating type option via xdotool

I want to open Chromium browser and then open a couple of web pages, let's say "google.com", and "stackexchange.com". My code for the same is below. #!/bin/bash #website 1 chromium-browser xdotool ...
1
vote
2answers
1k views

How to set absolute mouse cursor position in Wayland without using mouse?

The question is pretty straight forward. What I would have used under X [xdotool] obviously does not work moving forward, and no obvious new solutions have arisen given the relative new adoption of ...
0
votes
1answer
245 views

Can't get x forwarding to work with android

I'm trying to send keystrokes from my android to my Retropie using ssh. After a lot of searching I found that I have to use ssh with the -X flag which was already a hassle as most apps don't support ...
0
votes
1answer
1k views

How to close epiphany through a script with cron?

I have been making scripts to open and close a specific website with a cronjob on the raspberry Pi. The opening script works perfectly. It is as follows: #!/bin/bash export DISPLAY=:0 && ...
1
vote
1answer
562 views

Xdotool action without focusing

Is there a way to automatically click at a specific place in specific window without getting the window focused?
1
vote
0answers
425 views

XBindkeys and Mouse key's giving keyboard numbers (0-9)

XINPUT ➜ xinput --list ⎡ Virtual core pointer id=2 [master pointer (3)] ⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)] ⎜ ↳ ...
21
votes
1answer
5k views

What are the differences between xdotool and xautomation?

xdotool and xautomation are two command line X11 automation tools. I've used the former for a while and only recently found out about the existence of the latter, and I'm curious to know what someone ...
1
vote
1answer
2k views

Mapping mouse events to key presses using xbindkeys

I want to map various mouse actions to key presses using xbindkeys. All my attempts to do this in my .xbindkeysrc file have failed. Attempts have been made using xte and xdotool. Below is a summary of ...
2
votes
1answer
724 views

`xdotools type` mangles carriage returns

I would like to setup a paste functionality allowing to paste copied text (like scripts and configuration files) to any kind of application, including virtual guests and remote sessions running ...
6
votes
2answers
2k views

Keyboard emulation in Wayland

Is there a way to make xdotool or xte or any other alternative to work in Fedora 26? I'm trying to emulate keypresses (using xbindkeys), e.g. pressing Alt+B would emulate pressing Ctrl+Shift+B. But ...
1
vote
1answer
2k views

run command on user display as root isn't working as expected

I'm trying to execute a xdotool operation (move mouse) on the user's display from a root shell but I get: # DISPLAY=:0 mousemove_relative 1 1 No protocol specified Error:Can't open display: (null) ...
2
votes
2answers
402 views

Does xdotool have a log?

I'm using xdotool to securely type out a password (as opposed to using the clipboard) from a password manager (pass) and I'm wondering if xdotool has a log somewhere, which would obviously make it ...
3
votes
0answers
614 views

xdotool prints 8 instead of Tab

I'm currently working on a "autotype"-script for pass. In oder to do that, I need to type the username, press 'Tab' and then type the password. For testing I'm using the following code: WID=$(...
3
votes
0answers
634 views

Keyboard shortcut to open a new terminal if one doesn't exist on this desktop. Otherwise, focus the current one

I would like to create a keyboard shortcut that will open a new terminal window only if none exists on the current desktop. Otherwise, the currently existing one will be focused. I just upgraded from ...
10
votes
1answer
4k views

How to copy text from command line to clipboard without using the mouse?

I'm trying to figure out a way to copy the current text in a command line to the clipboard WITHOUT touching the mouse. In other words, I need to select the text with the keyboard only. I found a half-...
3
votes
0answers
370 views

How to launch an application as a dock on openbox

If i do obxprop|grep dock and click on gnome-panel for example, my result is : _OB_APP_TYPE(UTF8_STRING) = "dock" For the rest, it's : _OB_APP_TYPE(UTF8_STRING) = "normal" How can i force a ...
1
vote
1answer
248 views

A tool that let's you draw rectange on screen, gives dimensions + X-Y? [closed]

a tool like: xprop wmctrl xdotool but it needs to permit me to draw a shape on the screen. then it should tell me the dimensions + the x-y coordinates is there such tool ?
7
votes
3answers
11k views

How to get window ID from process ID

This command will get the PID of the xterm process launched: xterm & export APP_PID=$! How can I get the window ID associated to that process (the xterm window ID)? I mean, the ID that xdotool ...
7
votes
1answer
5k views

How can I press the Windows key with xdotool

How can I press the start key with xdotool? By start key, I mean the key with the Windows icon.
2
votes
1answer
728 views

Simulate PrintScreen key press

I want to write a script that changes the window focus, and sends keyboard commands, such as print screen, and arrow keys, to the system. As in I need print screen to capture my desktop, not the ...