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

Using screen to startup a minecraft server(linux debian)

I tried alot of things and got alot of errors, what i try to do is open a screen session on startup, start a minecraft server in it and then detach it so i can SSH to it with screen -r. The first command works fine, the problem is after the first…
knowndead
  • 80
  • 8
0
votes
2 answers

If Statements in xdotool & bash

I need make a small script in bash using xdotool. And I have problem with if statements. How to write correctly this instruction. if [xdotool click 1] then ./myScript.sh fi % If I make mouseclick I want to execute bashscript Please help.
Gugu
  • 17
  • 1
  • 8
0
votes
2 answers

In Python how to use variables in call function?

I am using Python on Ubuntu. call(["xdotool", "mousemove", "500","600"])works fine. But if x=500, y=600, call(["xdotool", "mousemove", "x","y"]) does not work. What should be the syntax of x and y?
Sam
  • 79
  • 2
  • 10
0
votes
1 answer

xdotool code works only if the program was terminated by "killall' command

if leafpad is open.. and i close it via terminal killall leafpad then this xdotool code will work just fine. it opens a file, waits 2 seconds, searches for the title, and then activates it and moves it around. leafpad '/media/1/AAA' sleep…
user2694706
0
votes
2 answers

XDOTOOL won't pass clicks to a particular window

Just having some problems with xdotool here - great program, but unfortunately hasn't been behaving. from Tkinter import * import os class Ed: def __init__(self,parent): self.button = Button(parent,command=self.passthrough) …
slyaer
  • 241
  • 4
  • 10
0
votes
2 answers

Automatically invoke xprop at a named point on the desktop (X11, Ubuntu)

xprop | grep WM_CLASS\(STRING\) After typing that into a terminal, I have to click onto a window to get a result. I want to automatize this. I'd like to get the WM_NAME-Window name at a named position, say, x=10 and y=40 (BFB). xprop | grep…
user2366975
  • 4,350
  • 9
  • 47
  • 87
0
votes
2 answers

how to escape characters in xdotool

I have this script to open a new console, ssh into a server, run a deploy command. I pass to the script the version of the deploy xdotool key ctrl+alt+t sleep 3 xdotool type "ssh myserver" xdotool key Return sleep 10 xdotool type "password" xdotool…
user2427
  • 7,842
  • 19
  • 61
  • 71
-1
votes
1 answer

Controlling an X-Window from a different virtual desktop without entering that X-Window's virtual desktop?

I'm using the XFCE4 desktop environment under Ubuntu 20.0.4. I have several virtual desktops set up, each of which containing one or more applications which are running. Is there any way I can run an X-Windows-based command from one desktop and have…
HippoMan
  • 2,119
  • 2
  • 25
  • 48
-1
votes
1 answer

Activate window in Ubuntu 20.04 and send key combination

In Ubuntu 20.04, I am trying to write a very small script to bring a specified window to the foreground and then send a key combination on this window. For that I am using: #!/bin/bash xdotool search --onlyvisible --class windowactivate…
codeKiller
  • 5,493
  • 17
  • 60
  • 115
-1
votes
1 answer

How to type "+" sign with xdotool automation utility?

How to type "+" sign with xdotool automation utility on Linux machines?
molsson
  • 1,227
  • 11
  • 19
-1
votes
1 answer

xdotool key does nothing inside .sh script

I have this script to launch nmon; I want the window to be aligned on the right of the screen as I launch it. To do so I have the shortcut sup+right that works if done manually but does nothing inside the script. It is very simple: su export…
yhurt
  • 11
  • 2
-1
votes
1 answer

Linux Ubuntu 16.04 remote click by http request

Is there any way to perform remote click, from let's say Android device, to current linux session with simple HTTP request? So far I've managed to get Apache working with PHP7, and xdotool to perform left click by calling a shell script on Ubuntu…
Denis Črnič
  • 117
  • 2
  • 9
-1
votes
1 answer

Bash xdotool writing output to variables

Heyo guys. I am using bash script to get current location of my mouse, but I stuck with this. when I do: xdotool getmouselocation x:688 y:411 screen:0 window:98568199 I got my output as a string, I am kinda newbie. How can I get values of x and y…
ChynaJake
  • 51
  • 1
  • 6
-1
votes
1 answer

Linux xdotool Key Stuck

I've been making a script which makes you unable to exit the terminal, unless you enter "yes". I've used this command to disable the Alt key temporarily. xdotool keyup Alt_L Alt_R I am now unable to "release" the key and my Alt key doesn't work…
-1
votes
1 answer

Simulating keyboard presses using python in linux

I tried simulating with xdotool but an exception is raised like Error: Can't open display: (null) even after trying with export DISPLAY=':0.0'. What am I missing?
Jeyashree
  • 26
  • 3
1 2 3
10
11