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
The results are in! See what nearly 90,000 developers picked as their most loved, dreaded, and desired coding languages and more in the 2019 Developer Survey.

Questions tagged [xdotool]

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

3
votes
0answers
62 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, {...
0
votes
1answer
17 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 ...
0
votes
0answers
31 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
36 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
0answers
54 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
29 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
172 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
25 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
140 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
64 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 ...
0
votes
1answer
46 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 ...
0
votes
1answer
158 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 ...
5
votes
1answer
169 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 ...
1
vote
1answer
395 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
69 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 ...
0
votes
0answers
124 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
648 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
39 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 ...
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
130 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
229 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 ...
1
vote
0answers
405 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)] ⎜ ↳ ...
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 ...
1
vote
1answer
492 views

Xdotool action without focusing

Is there a way to automatically click at a specific place in specific window without getting the window focused?
2
votes
1answer
682 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 ...
0
votes
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) ...
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 ...
3
votes
0answers
591 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 ...
3
votes
0answers
583 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=$(...
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 ...
3
votes
1answer
206 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 ...
3
votes
0answers
363 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
221 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 ?
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-...
7
votes
3answers
10k 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
4k 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
383 views

Make 'read' work when not focused on terminal

I have the following script which spams a button in a program when the V button is pressed #!/bin/bash winid=$(xdotool search "application name here" | head -n1) while true; do read -rsn1 input if [ "...
1
vote
3answers
3k views

minimizing & raising a window from a shell script

I am trying to run a script that will check internet speed on a linux machine with gui, bring the terminal window down and when the query is finished , the window will come up with the answer. as for ...
0
votes
1answer
282 views

Bash script. Create monkey testing tool [AntergOS]

I has this error when I run bash script that run another bash scripts and recursively run itself. In scripts I use xdotool, create counters and in each script I use $RANDOM call (even is a file that ...
1
vote
1answer
357 views

Reactivate stored pid of a window with xdotool

First, I store the pid of an active window. active_window_pid=$(xdotool getactivewindow getwindowpid) Second, I click on another window, which is actually function below. mouse_click 4000 1000 ...
2
votes
1answer
434 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 ...
3
votes
1answer
961 views

xdotool sleep 1 vs sleep 1, any difference?

Is there any difference between these two sleep commands: Either: xdotool sleep 1 Or: sleep 1 Example: #!/bin/bash while : do xdotool mousemove --sync 1000 500 xdotool click 1 ...
5
votes
1answer
856 views

X: Find out if a window is visible to the user i.e. not covered by others

I only want to execute a certain action with xdotool if the window is not visible to the user, this includes minimized windows, but also windows which are 100% covered by other windows (if no ...
1
vote
0answers
119 views

How to combine conditions with xdotool?

Is it possible to search for both the --class and --name using xdotool? xdotool search --all --onlyvisible --class "some_val" --name "another val" The above returns an error because the first ...
7
votes
4answers
14k 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 ...
4
votes
1answer
1k views

Is there a problem using xdotool to direct keystrokes to Java windows?

I'm running Fedora 22 (Linux) and have a Java application written by others that I want to send keystrokes to. I have tried to use xdotool in various ways, but I can neither set focus to the Java app ...
2
votes
2answers
397 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 ...
2
votes
0answers
807 views

How to detect whether a window is in focus?

I'm not experienced in scripting but I've made this script: #!/usr/bin/env bash # hint: use "xdotool getmouselocation" to get values if xdotool getwindowfocus getwindowname | grep -Eq " - ...