Questions tagged [xdotool]

fake keyboard/mouse input, window management, and more

www.semicomplete.com/projects/xdotool:

This tool lets you simulate keyboard input and mouse activity, move and resize windows, etc. It does this using X11's XTEST extension and other Xlib functions.

Additionally, you can search for windows and move, resize, hide, and modify window properties like the title. If your window manager supports it, you can use xdotool to switch desktops, move windows between desktops, and change the number of desktops.

165 questions
0
votes
1 answer

Concatenate float with a string inside the arguments

Right off the bat, no this is not a duplicate. I have been searching for hours to do this but it might be simple as I started coding a few weeks ago. How do I concatenate a string with a float inside the arguments? I want to be able to do this, but…
user7973034
0
votes
1 answer

how to use variables in xdotool command

i have the following code. when i execute the code my mouse pointer move to 0 0 coordinate. i need to move the cursor to x1 y1 position. the value of x1 y1 is integer. int x1,y1; for(int i=0; i
0
votes
1 answer

I run a program in a shell script. How do i know if it has loaded? (Linux)

I wrote a shell script that runs a python program. Then I want to load a file into the program using xdotool. Right now this is my code: #!/bin/bash cd ~/Folder python program.py & sleep 10 WID=$(xdotool search --onlyvisible program) .... I really…
MilloMille
  • 35
  • 1
  • 8
0
votes
1 answer

Is it possible to use xdotool to enter a web console command?

Is it possible to use xdotool to enter a web console command like this command: $("#var2").css("move", - 44 + "deg")
alberto
  • 29
  • 6
0
votes
1 answer

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 dot key is pressed and trigger my bash script to…
Egene
  • 183
  • 1
  • 7
0
votes
2 answers

Python automate key press of a QtGUI

I have a python script with the section below: for index in range(1,10): os.system('./test') os.system('xdotool key Return') What I want to do is to run the executable ./test, which brings up a QtGUI. In this GUI, a key press prompt buton…
user1431515
  • 185
  • 1
  • 10
0
votes
1 answer

Check for duplicate application in Linux BAT

I am trying to create a .bat file for Linux that: Checks for an existing instance of an application, then Launches an initial instance of the app or calls the existing instance forward. I currently have a .bat (below) that works on one Linux…
Tim
  • 1
  • 1
0
votes
1 answer

running xdotool script in order

I have this script to make a gnome window bar-less. It simply moves the window up so the bars disappear. The problem is that it doesn't work in order sometimes, unless I add sleep 0.2 after every command! Is there any way to force running next…
0
votes
1 answer

In linux, get window class raise "X Error of failed request: BadWindow (invalid Window parameter)"

here is my code, I get "X Error of failed request: BadWindow (invalid Window parameter)" xdo_t *xdo = xdo_new(":0"); XWindowAttributes attr; XClassHint classhint; Window window; XGetWindowAttributes(xdo->xdpy, window, &attr); if…
pozklundw
  • 505
  • 1
  • 9
  • 16
0
votes
2 answers

when use libxdo, it raise "error: unknown type name ‘useconds_t’"

here is my CMakeLists.txt: cmake_minimum_required(VERSION 3.3) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") add_executable(ex ex.c) target_link_libraries(ex xdo) the full code is here of…
anxvonial
  • 61
  • 1
  • 2
  • 10
0
votes
3 answers

How to make xdotool work with matchbow-window-manager?

I have trouble using xdotool to simulate simple keypresses in my browser. Now my browsers starts up on boot by adding the following code in '/home/pi/.xintirc' #!/bin/sh xset -dpms xset s off xset s noblank // not sure if this is needed. killall…
jvjefke
  • 21
  • 5
0
votes
1 answer

Focus chrome window in linux when running using xvfb

I am using the following shell script for to get the focus on a specific chrome window: #!/bin/sh WIDId=`xdotool search "Test page"` xdotool windowactivate --sync $WIDId sleep 2 xdotool windowactivate $WIDId xdotool key --clearmodifiers ctrl+a It…
dfordevy
  • 161
  • 1
  • 15
0
votes
2 answers

os.system python function in a while loop

I am trying to make a simple python script to automatically click in ubuntu 14.04. here is my code #!/usr/bin/python import os clickCounter = 0 while clickCounter == 0: timeNow = os.system('date +\"%s\"') if timeNow > 10: …
0
votes
1 answer

Running xdotool movewindow from a python script

I am writing a python script to run a movie using ffplay, and then move the ffplay window to a specific location on the screen. The script I am basing this one is located here -…
mr mojo risin
  • 555
  • 4
  • 15
0
votes
2 answers

ubuntu 12.40 get mouse position from SSH

i need to obtain the position (x,y) of pointer, but i need this from external connection (SSH). In desktop, works with this: xdotool getmouselocation But when i run the command from SSH (remote), giveme the error: Error: Can't open display:…
CRIMUVI
  • 121
  • 1
  • 10
1 2 3
10
11