Questions tagged [xdotool]

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

Filter by
Sorted by
Tagged with
1
vote
1answer
17 views

xdotool issues with keyboard layout configurations having non-US defaults

I tried using the xdotool commandline on a Chrome window in Debian, typically by doing: sleep 2 && xdotool type "2" # Switch to the Chrome window and focus on the relevant text field # before ...
2
votes
0answers
43 views

key binding running xdotool unexpected behaviour

I've programmed a key to run xdotool when it's pressed. But for some unknown reason xdotool is only sending keystrokes when the binded key is released, except when a non-active window is sent the ...
0
votes
0answers
50 views

xdotool sending keydown to inactive window

I am trying to get my pc to hold down a key in a specific window. I have tried using the following xdotool command: xdotool keydown --window 0x36000fc 'q' But this command seems to only work in a ...
0
votes
0answers
107 views

Release modifier keys after using xdotool

I use the following command in a bash script file: xdotool type --clearmodifiers $(xclip -o -sel c) I invoke it with a shortcut such as CTRL+SHIFT+e The action works as expected. However, after it ...
3
votes
1answer
53 views

Parsing “shell friendly” output

I would like to get output from xdotool getactivewindow getwindowgeometry --shell to local variables in bash. Thought I might could do something like: declare -A wp=( $(xdotool getactivewindow ...
0
votes
0answers
36 views

xdotool send keystroke even when windows does not have focus

I've written the attached script in order to keep my external monitor alive while I'm not typing on it. I'm using fvwm, and have multiple named windows open. The script successfully types A every ...
0
votes
0answers
59 views

xdotool not bringing active window in front while VLC is fullscreen

VLC media player has two options to show video in fullscreen. The first is called "fullscreen mode" F11 shortcut and the second is "fullscreen" with "f" shortcut. Both modes appear the same, but the ...
0
votes
1answer
163 views

How to create a kill switch for xdotool?

I used xdotool to automate some actions. It takes data from a spreadsheet, and "types" it into a Web site, instead of me having to manually copy and paste all of that data over, saving hundreds of ...
2
votes
0answers
171 views

xdotool and new terminal windows

I recently discovered the amazing xdotool command and was going to make a bash-script to open four windows, resize, and reposition them for work. Before, I could use the command xdotool key ctrl+...
0
votes
0answers
34 views

how to reliably automate tasks using xdotools when key strokes are dropped?

I'm trying to use xdotools to automate feeding commands to an application. However, I have found that there is a noticable non-deterministic lag in the user interface such that even with unreasonably ...
0
votes
0answers
17 views

How to use entr and xdotool to refresh firefox on *.css file updates?

I am trying to get the livereload work find . -name '*.css' -print | entr xdotool search 'firefox' key Control_L+R When i edit the css files I only get same output without firefox reloading. ...
2
votes
1answer
145 views

Xclip command works in shell but not in keyboard shortcut

I have to paste my email often during the day, and typing it is time consuming. That is why I am searching for a way to do this with a button press. The following command works to place my mail on my ...
0
votes
0answers
24 views

How can I check that Cinnamon is in Tile mode in command line?

There is a window selection mode, or Tile mode in Cinnamon, enabled with ctrl+alt+down_arrow by default. In my bash script I need to check that this mode is currently active (user pressed shortcut ...
0
votes
0answers
111 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
1answer
74 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 ...
4
votes
0answers
185 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
2answers
45 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
49 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
390 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
2answers
1k 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
74 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
1k 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
1answer
221 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
103 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
442 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
368 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
1k 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
2answers
256 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 ...
1
vote
1answer
1k 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
90 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;/...
2
votes
1answer
227 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
2k 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
570 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
578 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
3k 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
1k 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
1k 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 ...
1
vote
1answer
4k 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) ...
7
votes
2answers
3k 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
878 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
2answers
947 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
2k 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
542 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 ...
2
votes
0answers
408 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
336 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
5k 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
17k 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
7k 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
554 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
4k 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 ...